Panel Node creation and panel content type edition fail

jcmarco - May 3, 2009 - 23:07
Project:Panels
Version:6.x-3.0-beta2
Component:Panel nodes
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

When adding a new panel type node (a panel node), the edition screen is broken with a first created page with an error and again the panel node type form.

There is a bug using empty() function, that function doesn't return false if the variables is not defined. So when creating an empty node it check if there is a layout set in the $node,
if not then it reads the next argument (#3) after node/add/panel. If the argument doesn't have choose-layout then is not coming from the layout selection form and then go to this layout form selection.

AttachmentSize
panels_node_module.patch552 bytes

#1

jcmarco - May 3, 2009 - 23:33
Title:Panel Node creation fails» Panel Node creation and panel content type edition fail

When editing the content type panel, there is the same error because the condition that checks if it's creating a new node (empty($node->nid)) doesn't differentiate from creating a new node than editing the content-type, so added a new check about the existence or not of $params)
Deleted a lost debugging line and an empty line.

That patch includes last one as well

AttachmentSize
panels_node_module.patch 976 bytes

#2

jmesam - July 2, 2009 - 23:00
Version:6.x-3.x-dev» 6.x-3.0-beta2

edited: ----- wrong post -----

#3

quadbyte - July 8, 2009 - 14:45

Patch tested and working here.
However the patch should be submitted against Panels 6.x-3.0-beta2. So here it is.

AttachmentSize
panels_node.fix_node_form.patch 752 bytes

#4

merlinofchaos - July 21, 2009 - 21:23
Status:needs review» fixed

Committed.

#5

merlinofchaos - July 21, 2009 - 21:32
Status:fixed» reviewed & tested by the community

Reverted.

This patch completely broke creating new panel nodes.

And now that I look at it, I have no idea what the problem it's trying to solve is.

#6

merlinofchaos - August 7, 2009 - 20:32
Status:reviewed & tested by the community» needs work

Can you explain what this is trying to do?

#7

quadbyte - October 22, 2009 - 14:01

This patch doesn't work anymore.

I guess the issue discussed here is how to avoid the systemic redirection to choose a layout when executing hook_form on panels_node when $node->nid is empty/undefined.

For example, there is a conflict with the Vertical Tabs module which executes hook_form() via drupal_retrieve_form() to pull form data from the content type when visiting admin/content/types/panel/edit, then panels_node module attempts to redirect to the 'choose layout' page and everything ends up showing a 404 - page not found.

In the meantime I found a cheap fix checking if arg(2) != 'types' to avoid this redirection, but I don't really like it.

#8

Zoltán Balogh - February 23, 2010 - 14:06

subscribe

 
 

Drupal is a registered trademark of Dries Buytaert.