Is there any reason why Panels returns NULL?
As far I can see in API and index.php:
http://api.drupal.org/api/function/menu_execute_active_handler/6
http://drupalcode.org/viewvc/drupal/drupal/index.php?revision=1.94&view=...
It should return one of valid values: MENU_SITE_OFFLINE, MENU_ACCESS_DENIED or MENU_NOT_FOUND.
This issue is raised because of incompatibility with WSOD module (from Diagnostic Tool) #717416: Incompatibility with Panels/Page Manager module when panels have "Disable Drupal regions" selected
And I was wondering if it's expected.
Comment | File | Size | Author |
---|---|---|---|
#16 | panels_node.module-939040.patch | 813 bytes | kenorb |
#7 | panels_node.patch | 891 bytes | kenorb |
#5 | panels_node.module.patch | 652 bytes | kenorb |
#4 | panels_node.module.patch | 691 bytes | kenorb |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedYes. The only way to set the show_blocks flag to theme('page') is to call it manually. There is no way to tell the menu system to add that flag to theme('page').
It is a perfectly valid workflow to call print theme('page', $show_blocks) and then return NULL to indicate that you have rendered the data yourself. WSOD module is making an error an assuming that a NULL is a crash.
Comment #2
kenorb CreditAttribution: kenorb commentedIs there any way to define its own constant?
Current:
When you do in ./panels_node/panels_node.module
Or just return this:
Most of the code which has broken menu callback, return just NULL and it's confusing.
Note: If you return 0, isset() will still return false, and page will not be rendered.
See: http://php.net/manual/en/function.isset.php
Comment #3
kenorb CreditAttribution: kenorb commentedRaised a new ticket against 7.x core:
#940264: Define new menu status code to ignore page rendering in index.php
Comment #4
kenorb CreditAttribution: kenorb commentedPlease check the following patch.
For you it doesn't change anything, for me yes.
Because there is a difference between NULL and 0
Thank you.
Comment #5
kenorb CreditAttribution: kenorb commentedPatch as I can see in API way:
http://drupal.org/node/224333#theme_page
It's the correct way to pass already rendered page with custom arguments?
Comment #6
kenorb CreditAttribution: kenorb commentedComment #7
kenorb CreditAttribution: kenorb commentedIgnore patch #3, check this.
Sorry, I couldn't test it.
Comment #8
kenorb CreditAttribution: kenorb commentedSource: http://drupal.org/node/224333#theme_page
Isn't exactly what we trying to achieve here?
"Return page output for Drupal, hide blocks"?
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedWhen you do that, don't you get the page theming twice? Certainly you used to. I don't remember hearing about any changes to that.
Comment #10
kenorb CreditAttribution: kenorb commentedI'm not sure, I've to test it as well.
http://drupal.org/node/428744#comment-1617886
Comment #11
kenorb CreditAttribution: kenorb commentedTested in index.php:
It does duplicate.
This doesn't:
So the patch #4 will work.
Comment #12
merlinofchaos CreditAttribution: merlinofchaos commentedI'm ok with patch in #4, I think, but it needs a comment to explain why it's returning 0.
Comment #13
EvanDonovan CreditAttribution: EvanDonovan commented@kenorb: As per merlin's request, can you add the comment?
It could say something like:
"Return 0 rather than NULL so modules that are invoked later in the page request can know that page content rendered."
Comment #14
kenorb CreditAttribution: kenorb commentedReturn 0, because if there is assignment in index.php
code expecting that function (menu handler) will return anything.
Zero, because we don't want to execute none of the block within index.php with following conditions: is_int($return), isset($return).
Zero, rather than NULL, because module that are invoked later know that page content has been rendered correctly.
Comment #15
merlinofchaos CreditAttribution: merlinofchaos commentedI mean...comment in the code.
Comment #16
kenorb CreditAttribution: kenorb commentedAh, sorry.
Commented in the patch.
Comment #17
EvanDonovan CreditAttribution: EvanDonovan commentedI think this is good. Might possibly want to also indicate in the code comment that returning 0 will still bypass block rendering.
Comment #18
Letharion CreditAttribution: Letharion commentedThis patch is both both really old by now, and for "Panel Nodes", a module that will be deprecated in favor of Panelizer shortly. #1353542: Upgrade path from Panel Nodes to Panelizer. Because of it's ago, and soon to be irrelevance, I'm closing this issue.
Comment #19
EvanDonovan CreditAttribution: EvanDonovan commentedI don't think the patch should exclusively be for Panel Nodes; as far as I know, the issue happens on regular panels pages as well, and still causes an endless loop if Diagnostic Tools is enabled. Thus, I think it is still needing a more comprehensive fix.
Comment #20
Letharion CreditAttribution: Letharion commentedComment #21
DamienMcKennaComment #22
vijaycs85We might need to update the issue summary with some details, perhaps steps to reproduce the issue.
Comment #23
DamienMcKennaBumping to the next release, but I suspect it may never be fixed.
Comment #24
japerryClosing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)