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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

samiullah’s picture

Assigned: Unassigned » samiullah

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

brunodbo’s picture

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.

populist’s picture

Status: Active » Needs review
FileSize
558 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.

populist’s picture

Status: Needs review » Fixed

Reviewed and committed to dev.

Status: Fixed » Closed (fixed)

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

suldan’s picture

Issue summary: View changes

Get the same errors when I try to change the menu settings for an existing landing page. In my case from 'normal menu entry' to 'no menu entry'. Have 1.13 installed.

But this was the last time using the menu settings in the page manager anyway. There are other disadvantages, not related to Panopoly.

dsnopek’s picture

Status: Closed (fixed) » Active

@suldan: If this is happening for you with Panopoly 1.13, this issue should be changed to Active! Thanks.

dsnopek’s picture

Assigned: samiullah » Unassigned
Status: Active » Closed (won't fix)

When #2293947: Make "Landing Page" into node + Panelizer (rather than a Page Manager page) is committed we'll be using nodes for landing pages rather than page manager pages. So I'm going to close as "won't fix".