Closed (fixed)
Project:
ZURB Foundation
Version:
8.x-6.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2016 at 02:04 UTC
Updated:
3 Oct 2017 at 23:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bkhandruk commentedThis error occurs because when you're trying to view node revision, variable
$variables['node'], passed into template_preprocess_page, is not an object. It's a string within current node ID. So, to fix this error I've added a check whether the variable$variables['node']is an object. And if it's not, then this object is loaded by ID.Comment #3
tim_djAbove patch will still fail if you try to view a revision of a non-existing node id.
Also I think the correct function to add this suggestion would be "zurb_foundation_theme_suggestions_page_alter"
Comment #4
samuel.mortensonThis seems like an important bug to fix, I'm bumping the priority.
@tim_dj Can you explain why array_splice is being used here instead of the previous operation ($suggestions[] = ...)?
Comment #5
tim_djOtherwise the sequence of suggestions would be out of order:
array_splice
$suggestions[]
Comment #8
samuel.mortensonThank you @tim_dj! Committed to the 6 and 5 branches.
Comment #10
ressaThis is not related to the ZURB foundation theme, but I am posting this for others who find this issue, looking for help with
PHP Fatal error: Call to a member function bundle() on string:From: http://drupal.stackexchange.com/questions/145823/how-do-i-get-the-curren...
Comment #11
ressaI couldn't get the suggestions on the "Working with the Entity API" page to work, but making sure that
revisionswasn't present in the URL seemed to do the trick:Comment #12
guybrush threepwood commented@ressa, Thank you so much! This saved me.