-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resurrect patches from unstable branch #44
Conversation
…l in the "disable my account" description
…ags only when present
Fix a hard dependency on the BMO extension. order_columns is set in Bugzilla::Extension::BMO, which might not be present / loaded.
The default_platform and default_op_sys Bugzilla::Product methods are installed by the BMO extension, so don't attempt to invoke them when it isn't present.
* instant-search.js: Don't fail if product map isn't loaded getProduct had a hard dependency on the 'products' object, which is provided by products.js from the GuidedBugEntry extension. Check if the products variable exists before attempting to use it. This can happen when loading products.js fails, which in turn can happen when the GuidedBugEntry extension isn't present. * Instant search: Don't load products.js without GuidedBugEntry Fixes a 404 if the GuidedBugEntry extension is not present. * instant-search.js: Use throbber.gif from core Fixes remaining dependency on GuidedBugEntry.
Basic functionality seems to be working. |
I'm seeing some test failures (some caused by patches in this PR, some not), will go through those first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`Found one small bug
@@ -7,5 +7,5 @@ | |||
#%] | |||
|
|||
[% PROCESS global/redirect.html.tmpl | |||
url = "https://developer.mozilla.org/docs/Mozilla/QA/Bug_writing_guidelines" | |||
url = "[% terms.BugWritingGuidelinesURL %]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url = "[% terms.BugWritingGuidelinesURL %]" | |
url = terms.BugWritingGuidelinesURL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I saw you fixed this previously in 01732ce :) I will apply that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guard on extensions is wrong. $recurse doesn't get reset when we early-return from the function. I've suggested changing this to a package-scoped localized variable, which should work better.
@@ -124,6 +125,14 @@ sub template_inner { | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our $in_extensions = 0; |
# (through this method or has_extension). | ||
# The extension list is not fully populated at that point, | ||
# so the results would not be meaningful. | ||
state $recursive = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state $recursive = 0; |
# The extension list is not fully populated at that point, | ||
# so the results would not be meaningful. | ||
state $recursive = 0; | ||
die "Recursive attempt to load/query extensions" if $recursive; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
die "Recursive attempt to load/query extensions" if $recursive; | |
die "Recursive attempt to load/query extensions" if $in_extensions > 0; |
@@ -133,9 +142,20 @@ sub extensions { | |||
push @$extensions, $package; | |||
} | |||
} | |||
$recursive = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$recursive = 0; |
# so the results would not be meaningful. | ||
state $recursive = 0; | ||
die "Recursive attempt to load/query extensions" if $recursive; | ||
$recursive = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$recursive = 1; | |
local $in_extensions = $in_extensions + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, applied these in #66
I ran a git filter-branch on a part of the old unstable branch to make cherry-picking easier. I'm including mostly my own commits, but more commits from the unstable branch can thus be resurrected from here (let me know if you would like me to add any particular ones):
https://github.com/CyberShadow/bmo/commits/unstable-reformatted
The commits here have all been previously reviewed (see the pull request references added by GitHub in the commit messages) and theoretically don't need further review but practically need to be retested due to bitrot (or e.g. mistakes during merge conflict resolution).
Opening as draft until I can test this as part of a full test deployment.