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.
I know this error has been reported but not solved in many other areas, and probably for a variety of causes, but I had it occur specifically when I enabled a page panel as 'available to other pages' in D7. After attaching the panel to other pages the content within was blank/gone. I deleted the 'master' copy of the panel and got render errors until I hunted down all orphaned panels and deleted them, then everything reverted to normal.
Comment | File | Size | Author |
---|---|---|---|
#6 | ctools_1167938_htmlspecialchars.patch | 1.68 KB | mstrelan |
#2 | ctools-1167938-backtrace.html_.txt | 1.97 MB | jwilson3 |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedThe actual cause of this error is check_plain() being given an array, not a string. It can be hard to track down precisely where the error is coming from.
Getting a backtrace from the line in question when the variable is an array could be helpful. Otherwise there's not much I can do without being able to reproduce this.
Comment #2
jwilson3I was able to confirm this error, and have backtraces to boot.
Steps to recreate:
The object, exported to code via features looks like this: Note the two different settings called 'format':
A backtrace (placed at check_plain) shows me that it is being passed the "body" array. I believe that somehow the logic in ctools is trying to pass the body because the format.
Interestingly enough, changing the outer-most format setting to 'full_html' in my feature does remove this error, but adds a different one in a different place (I won't mention that now, because I dont think its the proper solution in the first place, just something I tried to see if it would fix it quickly).
I've attached the backtrace, formatted with krumo, for your convenience, just download the html.txt file and remove the txt to display it properly in a web browser.
Comment #3
jwilson3Note: changing the exported settings to the following, solves the immediate issue, removing all error messages.
Comment #4
jwilson3I'm running 1.x-dev btw.
Comment #5
mstrelan CreditAttribution: mstrelan commentedSame issue as #2. Setting to major because it can result in loss of data, ie. if you set a pane to reusable and that pane had content the only way to see that pane again is to delete it and re-add it.
Comment #6
mstrelan CreditAttribution: mstrelan commentedThe attached patch will fix the issue for #2 and shouldn't break existing functionality if this is working anywhere else.
Comment #7
mstrelan CreditAttribution: mstrelan commentedSorry for the 3 posts in a row, changing status.
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted a different version of this patch that corrects the problem in every place I ran into it.
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedNote that technically the data wasn't lost, so this commit will 'restore' lost data if you didn't save it again. I think the data is truly lost if you tried to save the broken pane, though.