Closed (fixed)
Project:
Nodequeue Extras
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2012 at 13:13 UTC
Updated:
25 Sep 2014 at 15:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damienmckennaFYI the error only happens if both the Page and Block options are unchecked on the Create View page.
Comment #2
damienmckennaThis verifies that the $view object isn't empty before trying to load the display, which resolves the error.
Comment #3
damienmckennaAdded a comment.
Comment #4
jpstrikesback commentedFixed a whitespace error and updated paths as it wouldn't apply (for me), otherwise this fixes the build error, thanks!
Comment #5
jweowu commentedRe-rolling #4 against nodequeue_extras git repository.
Comment #6
jweowu commentedI've inverted the new condition in order to reduce the level of nesting (and consequently make the patch much simpler).
FWIW, I think the whole function would probably benefit from being refactored in this way -- instead of introducing so many levels of nesting, invert the test conditions and
returnorcontinuewhen they succeed, and then let the rest of the code carry on at the original nesting level.I'm attaching two patches. The first version applies to the current HEAD; the second version applies after the coding standards patch from http://drupal.org/node/1619400#comment-6427070
Comment #7
jweowu commentedI've posted a new patch at #1920700: Refactor nodequeue_extras_contextual_links_view_alter() which incorporates this one.
Comment #8
azinck commentedMerged to 1.x-dev. Thanks!