Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Also fixed these errors inside of krumo.js
Fixed undefined errors with el.className
TypeError: (intermediate value)(...) is not a function
Comment | File | Size | Author |
---|---|---|---|
#36 | devel-2376849-36-fix-krumo-D7.patch | 3.25 KB | Ievgen Antonovych |
#33 | advagg-2376849-32-fix-devel-dsm.patch | 840 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedComment #3
mikeytown2 CreditAttribution: mikeytown2 commentedPatch that doesn't ignore whitespace changes....
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedMight as well fix all the tabs...
Comment #16
Albert Volkman CreditAttribution: Albert Volkman commentedWorks well for me.
Comment #17
travelerttWorks for me as well.
Comment #19
dasginganinjaThanks. I used this fix on 7.x-1.5 to restore the Krumo is not defined and the krumo.over errors associated with a dsm() call.
Comment #20
salvisI wish we could get the testbot to give a result. I'm unable to apply the patch to 7.x-1.x-dev...
Please explain in a few words where this bug comes from and why we suddenly need this patch.
Comment #21
salvisKrumo doesn't follow the Drupal coding conventions in many ways, because it used to live as a separate project. We wanted to keep our version as close to the original one.
This still holds and we want to keep maintenance of Krumo at an absolute minimum. Please do not introduce any unnecessary diffs. AFAICS (at least in #1 you've changed only three lines and you shouldn't have more diffs than that.
Here's a re-roll of #1 — since I can't apply #4 I can't tell whether you've changed more than those three lines...
The question is still open: what are we fixing here? How can we reproduce the issue? Does it take a specific PHP version?
Comment #22
jcnventura CreditAttribution: jcnventura commentedI'm not sure why this is needed, but indeed it works.. Krumo simply doesn't expand without this patch.
Comment #23
Albert Volkman CreditAttribution: Albert Volkman commentedComment #24
mxr576rtbc++
#21 patch worked for me too.
Comment #25
osopolarPatch from #21 works for me too, thanks.
Comment #26
salvisI won't commit this as long as I cannot at least reproduce the error that it's supposed to fix.
Comment #27
Albert Volkman CreditAttribution: Albert Volkman commentedI just figured out what was causing the issue in my case. If you have AdvAgg installed, navigate here-
admin/config/development/performance/advagg
Selecting anything but "Move JS to the footer" > "All (might break things)" resolved the issue. Perhaps there's an issue with how the JS is added?
Comment #28
mxr576Blaming Advagg also makes sense to me too. I had this problem only on those sites where advagg and "Move JS to the footer" is enabled.
Comment #29
mikeytown2 CreditAttribution: mikeytown2 commentedI'll take another look at this in regards to making this work when the JS is in the footer and/or defered. Sometimes this can't be fixed in AdvAgg and it must be fixed in the JS file.
Comment #30
hey_germanoI also needed this patch to get Krumo to expand when using the dev release of Devel - the one in #21 worked for me until I enabled JS aggregation this afternoon. We're just using Drupal core aggregation though, not AdvAgg.
With JS aggregation enabled, I started getting the "TypeError: (intermediate value)(...) is not a function" error and traced it back to krumo.js. The fix was to add semicolons after all the functions in there.
This is a better explanation of why that was needed than I could give - http://stackoverflow.com/a/1834674/1940172 - but the gist is that while you don't need the semicolons in a JS file itself, you might need them when combining files so that functions are explicitly terminated and not accidentally combined.
Anyways, here's another patch that includes the changes in #21, plus adding semicolons after each function in krumo.js.
Comment #31
mikeytown2 CreditAttribution: mikeytown2 commentedAdvAgg will auto add semicolons to the aggregated files when combining, which is why it wasn't needed in the patch.
@hey_germano
What happens if you just add the semicolons to the krumo.js file? Will it work in your case?
Comment #33
mikeytown2 CreditAttribution: mikeytown2 commentedThe issue can be fixed in AdvAgg. The setting that triggers this issue is the "Put a wrapper around inline JS if it was added in the content section incorrectly" checkbox. The following patch has been committed and should make devel work without a devel patch.
Comment #34
Albert Volkman CreditAttribution: Albert Volkman commentedWorks for me. Thanks!!
Comment #36
Ievgen Antonovych CreditAttribution: Ievgen Antonovych at Drupal Ukraine Community for Levi9 commentedUpdate changes for devel 7.1.7
Comment #37
Ievgen Antonovych CreditAttribution: Ievgen Antonovych at Drupal Ukraine Community for Levi9 commented