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.
json output broken when using 1.4.2 of jQuery, this patch fixes it
Comment | File | Size | Author |
---|---|---|---|
ctools-jquery142.patch | 1.06 KB | realityloop |
Comments
Comment #1
voxpelli CreditAttribution: voxpelli commentedAs it's drupal_json() that's broken - shouldn't this be posted as a bug towards Drupal core?
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedYes, but we can fix it separately too.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedTo be fair I haven't decided if we *should* fix it separately.
Comment #4
voxpelli CreditAttribution: voxpelli commentedShould be a back port of the functionality in Drupal 7 then I think: http://api.drupal.org/api/function/drupal_json_output/7
Remove charset - according to the JSON-spec it shouldn't be there.
Why replace \r and \n? Drupal 7 doesn't.
Powered by Dreditor.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedWe looked at that. The Drupal 7 version is PHP 5 only, and we continue to support PHP4.
Comment #6
voxpelli CreditAttribution: voxpelli commentedIsn't this patch PHP 5.2+ only as well? It uses json_encode().
If Ctools should support PHP 4 then this patch should look more like what is discussed in #479368: D7: Create RFC compliant HTML safe JSON.
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedUm. Ok that's not the patch I thought it was. I guess realityloop took the Drupal 7 version after all instead of the Drupal 6 version of drupal_to_js().
Comment #8
realityloopI think i must have accidentally used it from pressflow.. but the patch in #6 which i reviewed yesterday fixes the issues with Views I was going to move on to after we spoke yesterday anyway so I'm pretty sure it will resolve issues with ctools as well.
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedI'm torn if we should just point to the core patch or implement our own until core fixes itself.
Comment #10
realityloopI'd suggest pointing to the core patch as draggable sorts will still be broken in the 'content types' section under manage fields without it anyway, if implementing own fixed all D6 issues with jQuery 1.4.2 then I'd say go.. but it won't so I think the core fix is better..?
Comment #11
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedJust a quick question coming from #1067290: Fix jQuery 1.7 for Drupal 6.
A lot of users report that Panels Drag and Drop is broken after updating to jQuery 1.5.2 ( and applying the json fix to core that comes with it ).
Using Chromes DevInspector it actually seems like some CTools js is breaking after the patch. Maybe its just a small adjustment to ctools that would make it compatible. Help would be much appreciated :)
Comment #12
klonos...subscribing.
Comment #13
merlinofchaos CreditAttribution: merlinofchaos commentedI admit I have had no reason to try jquery 1.5 with Drupal 6, and I don't know what the actual differences are.
Comment #14
jthomasbailey CreditAttribution: jthomasbailey commentedSame problem with 1.4.4, if that means anything. In 1.5.2 on the panels edit page you can drag the panels but you can't drop them anywhere. But I'm not seeing any errors, unlike #11.
I'm poking at Ctools but I still haven't found the drag and drop js, any help would be appreciated. Probably a simple solution but for now I'm swapping Jquery versions whenever I need to rearrange panels.
Comment #15
gcornoiu CreditAttribution: gcornoiu commented+1
Comment #16
joelpittetTriaging the 6.x issues, it's no longer supported.