Currently the panel_node_form() function has a hard-coded dependency on arg(3) to find the intended layout. This prevents clever devs from doing magical things with drupal_get_form() and drupal_execute(). The attached patch resolves this by allowing the $layout string to be passed along as part of the initial $node object, which seems pretty harmless and efficient.

Ideally I'd rather pass it as an additional argument for the panel_node_form() function, but node_form doesn't really allow this. The param value is there, but the doc for hook_form suggests it's not for this (although some preliminary noodling suggests it could work also).

Anyway, if desired I can try to recalibrate to use $param. However, the existing patch works for both get_form and execute use-cases.

CommentFileSizeAuthor
panels_node_form_layout.patch1.16 KBjoshk

Comments

merlinofchaos’s picture

Status: Needs review » Fixed

Committed! Thanks for the patch!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.