Comment 1 for bug 1896607

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstackdocstheme (master)

Reviewed: https://review.opendev.org/753285
Committed: https://git.openstack.org/cgit/openstack/openstackdocstheme/commit/?id=8e6b9c524460edf1c3127fb1861acd13b17455c3
Submitter: Zuul
Branch: master

commit 8e6b9c524460edf1c3127fb1861acd13b17455c3
Author: Stephen Finucane <email address hidden>
Date: Tue Sep 22 11:32:23 2020 +0100

    js: Don't attempt to set bug, PDF links without configuration

    Generating both the bug link and PDF download link requires some
    configuration in 'conf.py': specifically, the 'openstack_bug_project'
    and 'openstack_pdf_link' config options must be set. If these are not
    present, the template doesn't include the relevant tags, which means
    attempts to look these up via 'getElementById' will return 'null',
    causing ugly tracebacks like so in the console.

      Uncaught ReferenceError: bugProject is not defined
        <anonymous> http://localhost:8000/search.html?q=usage:395

    Simply surround these blocks with the same conditionals as the template,
    avoiding the issue entirely.

    Change-Id: I08ef0fc6c7ebd2c0e7ba89bc42cc92176fec8ab8
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #1896607