I created a landing page (/node/add/landing_page), and didn't assign it to a menu. When I go the page manager, and try to assign the page to a menu there when editing the page, I get the following error:

Warning: Illegal string offset 'type' in page_manager_page_form_menu() (line 741 of /home/bruno/workspace/bcadoption/bcadoption_git/profiles/panopoly/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc).
Warning: Illegal string offset 'title' in page_manager_page_form_menu() (line 748 of /home/bruno/workspace/bcadoption/bcadoption_git/profiles/panopoly/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc).
Warning: Illegal string offset 'name' in page_manager_page_form_menu() (line 759 of /home/bruno/workspace/bcadoption/bcadoption_git/profiles/panopoly/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc).
Warning: Illegal string offset 'weight' in page_manager_page_form_menu() (line 774 of /home/bruno/workspace/bcadoption/bcadoption_git/profiles/panopoly/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc).
An illegal choice has been detected. Please contact the site administrator.

When I create the page directly in the page manager, I can create a menu item and assign the page to a menu without problems.

Files: 

Comments

Assigned:Unassigned» samiullah

Will be Installing the panopoly distro on my local and will be testing it.

I narrowed it down to the way panopoly_pages_form_alter() is trying to set the menu item's parent (panopoly_pages.module, line 74).

According to http://drupal.org/node/648346#comment-2328060, "[t]he menu module stores its links in the database, but in order to be exportable into code, we can't use the database method, and the API does not allow direct selection of parentage. Instead it will try to discover that by path." (The aforementioned comment is about D6, but is still valid for D7).

Furthermore, selecting a menu item parent on /node/add/landing_page doesn't work for me in RC3: the menu item parent is not set when I select one.

If you look at parent selection in CTools' page manager, those parents are used for tabs, not for normal items.

I'm thinking it may be best to remove the parent selection form from /node/add/landing_page, since it doesn't seem functional/compatible with the way menu item's parents are handled in CTools page manager.

If that seems like the way to go here, I can roll a patch to do so.

Status:Active» Needs review
StatusFileSize
new558 bytes

The actual problem here is the custom validate function will push a parent item to the Chaos Tools Wizard cache if a "parent" value is present, which is going true since there is a default value on that field.

The attached patch just does cleaner checking here.

Status:Needs review» Fixed

Reviewed and committed to dev.

Status:Fixed» Closed (fixed)

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