Executive summary ;-)
To avoid WSOD on php 5.4: In panels.module change
function template_preprocess_panels_pane($vars)
to
function template_preprocess_panels_pane(&$vars)
This fix is committed but a release isn't coming soon since nobody is maintaining the 6.x branch (see #1774796: Plan for Panels v6.x-3.11 release (PHP 5.4 fix) where someone actually volunteered to maintain it).
----------
I'm in the process of updating some physical servers which use Windows 2008 R2 as their OS (due to software requirements of the WebApp being hosted) and as such they use the Uniform Server as their secured-for-production WAMP stack.
Once I ported one such WebApp to its new server with the latest Uniform Server (version Coral 8.4.0), everything came up as expected with the only exception being all Panels Pages and Panels Nodes were empty. One such Panels Page that uses the rounded rectangle style for each of the blocks or Views it displays shows up with empty rounded rectangles.
Now, the blocks and Views in the Panels pages appear to be getting called because logic I have in the blocks is getting executed even though the Panels Pages appear empty.
The "only" difference between the version of these sites where Panels behaves normal and where the pages are empty are:
- Updated PHP from version 5.3 to version 5.4
- attempting to see if its fixed in a new version, the "bad" version is running Panels 6.x-3.x-dev 2012-Jan-21
I tested the pages in IE9 and Firefox 10.0.2, getting the same result. Reading a recent post here around a single column Panels display, I went and verified that the panels CSS is being loaded fine, and well as no javascript errors seem to be getting triggered...
I also have another version of the same site, on the same physical server, running a previous version of Uniform Server. That version's Panels Pages and Panels Nodes display fine...
I've attached a screen shot of one such empty Panels Page (the one that uses rounded rectangles for each block).
Comment | File | Size | Author |
---|---|---|---|
#4 | panels.module.diff | 460 bytes | Nigel Cunningham |
empty_panels.jpg | 14.16 KB | bsenftner |
Comments
Comment #1
Nigel CunninghamSame seen here - seems to be PHP 5.4 specific. Working on finding the cause at the moment, and have it narrowed down to panels-pane.tpl.php not seeing the variables set as it expects.
Comment #2
Nigel CunninghamUpdate title since the PHP version seems to be the issue.
Comment #3
Letharion CreditAttribution: Letharion commentedFWIW, I run 7.x-3.0 on a stack of LAM + PHP 5.4 without issues.
Comment #4
Nigel CunninghamGot it. The definition of template_preprocess_panels_pane is wrong - it's missing the ampersand that is needed to make its argument be passed by reference.
[Edit: typo]
Comment #5
ptoly CreditAttribution: ptoly commentedWorks for me...AND php 5.4 appears faster too!
Comment #6
Nigel CunninghamComment #7
Letharion CreditAttribution: Letharion commentedComment #8
tim.plunkettThis was fixed yesterday in http://drupalcode.org/project/panels.git/commit/d3f1f074
Comment #10
ir4georgia CreditAttribution: ir4georgia commentedThanks, I recently upgraded to PHP5.4 and this was driving me crazy, since it didn't work but logged no PHP error
Comment #11
hansfn CreditAttribution: hansfn commentedDoesn't this bug warrant a new release? This is a show stopper for anyone using or planning to upgrade to PHP 5.4.
Comment #12
slewazimuth CreditAttribution: slewazimuth commentedGood catch with the & ampersand missing to change $vars to &vars and have it pass by reference.
Comment #13
amitkeret CreditAttribution: amitkeret commented+1 for posting a new release!!
I've been banging my head against the wall for the past two days trying to figure out what's wrong here.
Thank you so much for pinpointing the problem so beautifully.
I have a website on a live environment and a local environment. I recently wanted to work on something locally when I found that all my panels are empty. In my search for the culprit, I'd found issues talking about a problem in "Default" style for panes, in combinations with Views Slideshow... etc.etc.etc. Eventually I found this post, that fixed the issue immediately with a single ampersand character.
Reasons for deploying a release immediately would be:
I believe this should be released ASAP.
Comment #14
Antonin Brunon CreditAttribution: Antonin Brunon commentedThat bug gave me headache !
Please do poste a new release, I guess we're not 2-3 people facing that issue :)
Comment #15
jhm CreditAttribution: jhm commentedThank you #4
Comment #16
willbxl CreditAttribution: willbxl commentedThank you very much, I was looking for a solution for weeks!!!
Comment #17
eyenology CreditAttribution: eyenology commentedI used the most recent 6.x.3.x-dev install and still needed to patch to work -- but the patch did work succesfully.
Comment #18
markdl58 CreditAttribution: markdl58 commentedIs there an idiots guide to applying a patch on a shared hosting environment?
I've tried editing the panels.module file and adding the &, but I still have no content appearing in Panels. Any help gratefully received as I've been tearing my hair out for the last three days since the host upgraded to PHP5.4!
Comment #19
p4trizio CreditAttribution: p4trizio commented#4 works perfecly thank you
Comment #20
ratbagash CreditAttribution: ratbagash commented#4 worked a treat - NigelCunningham Nice one ninja
Comment #21
augiem CreditAttribution: augiem commentedThis is an absolute CRIME this has not been updated in 2 years! I spent the last 5 hours (and its 5 AM) screaming and banging my head on the wall. (Okay, that's exaggerating, but I was sweating very hard...) I didn't even realize PHP was updated when Apache was rebuilt with EasyApache in WHM, so this was next to impossible to even search on Google for until I traced it to PHP 5.4 by finding unrelated PHP errors in the log from Views, then seeing people got those errors on 5.4, then aha... I knew what to search for. Geez!!!
Every web host is deprecating 5.3 now. Soon there will be hordes of unmaintained sites breaking and nobody will have a clue why.
Comment #22
hansfn CreditAttribution: hansfn commentedYes, it is a crime so I created an issue back in September 2012 requesting a new release: #1774796: Plan for Panels v6.x-3.11 release (PHP 5.4 fix) I even volunteered to make the release ... I think issue 1774796 is the right place to raise your voice as that issue isn't closed.
Comment #23
mr.andrey CreditAttribution: mr.andrey commentedYep... thanks for the patch in #4.
What I tried to do before I stumbled on the holy grail of that patch:
* Upgraded Pressflow
* Upgraded Panels
* Upgraded Ctools
* Did yoga
* Meditated upon the nature of emotions
* Ate two qusadillas and tried not to think about coding
Who knew that the little squiggly "&" was all it took... such is life.
Comment #24
bib_boy CreditAttribution: bib_boy commentedAgain, had me stumped till I read this. Ampersand fixed it and that is the latest Panels release!
Comment #25
jessehsAdding "PHP 5.4" tag and upping priority to "critical" since this is a show-stopper for 6.x users.
Comment #26
OliverColeman CreditAttribution: OliverColeman commentedWasted several hours here, too. I upgraded to latest Ubuntu (Saucy 13.10) which includes PHP 5.4 by default. New release please! :)
Comment #27
pcoucke CreditAttribution: pcoucke commentedComment #28
hansfn CreditAttribution: hansfn commentedComment #29
hansfn CreditAttribution: hansfn commentedComment #30
Jamie Holly CreditAttribution: Jamie Holly commentedReopening this in hopes that it can get committed. I've tested the patch in #4 and it works great.
Comment #32
Funksmaname CreditAttribution: Funksmaname commentedTHANKS! The little code change worked for me...
Comment #33
ajayg CreditAttribution: ajayg commentedthat patch failed because the original file need to be as it is in the source. It has been renamed (the a file) as panels.module.orig which is why the patch failed.
Comment #34
alar CreditAttribution: alar commentedI'm holding off upgrading a couple of D6 sites. Should I avoid PHP 5.4 if I can?
Comment #35
Funksmaname CreditAttribution: Funksmaname commentedNot for this issue alar (imho), adding the 1 line of code in the first post fixed this particular issue.
If it aint broke though, don't fix it - but you might find your hosts will force you to upgrade php at some point (happened to us on quite a few sites)
Comment #36
c4rl CreditAttribution: c4rl commentedSince this has been committed, I'm marking it as a duplicate of #1774796: Plan for Panels v6.x-3.11 release (PHP 5.4 fix)
Let's follow-up there, please. :)
Comment #37
bnadem CreditAttribution: bnadem commentedThank you so mush.
This worked for me as a charm ;)
Comment #38
coreyp_1 CreditAttribution: coreyp_1 commentedYour "Executive Summary" just saved me *a lot* of time. Thanks!
Comment #41
Wappie08 CreditAttribution: Wappie08 commentedThank you very much for the fix & summary!
Comment #42
ianthomas_ukPer #36
Comment #43
MyriamB CreditAttribution: MyriamB commentedThank you NigelCunningham for your patch on comment #4. It worked for my sites.
Comment #44
mikekimi CreditAttribution: mikekimi commentedAwesome stuff...worked for me.
Comment #45
bramvandenbulcke CreditAttribution: bramvandenbulcke commentedThanks for the executive summary fix!
Comment #46
lunk rat CreditAttribution: lunk rat commentedThe executive summary was just the medicine I needed for what seemed like a nightmare day of endless troubles ... thanks all!
Comment #47
mellenger CreditAttribution: mellenger at Mellenger Interactive commentedExecutive Summary saved the day. Now I can eat dinner and sleep!