I've updated the module to version 7.x-3.6
And when trying to update the basic page in settings I get the notice with text:
Notice: Undefined index: handler in panels_page_manager_handler_add_validate() (line 1811
It seems there is an unnecessary validation for the basic page, it checks for 'handler' which the basic page doesn't have. Providing a patch which removes the unnecessary validation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrei.colesnic created an issue. See original summary.

the.tai.pen@gmail.com’s picture

Status: Active » Needs review
FileSize
596 bytes

Providing the patch

the.tai.pen@gmail.com’s picture

Issue summary: View changes
dsnopek’s picture

Status: Needs review » Needs work

Hm, this validate callback is necessary for Panels handlers, so it can't just be removed. Probably some logic needs to be added to the validate callback itself.

japerry’s picture

dsnopek’s picture

Status: Needs work » Needs review
FileSize
544 bytes

Here's a patch that doesn't remove the validate handler. I haven't actually reproduced this issue, though. I'll poke around in a little bit and see if I can figure that out.

dsnopek’s picture

So, I can't figure out how to reproduce this:

It seems there is an unnecessary validation for the basic page, it checks for 'handler' which the basic page doesn't have.

What is meant by "basic page" here? There's the content type basic page, but this form alter affects Page Manager, and page manager always has a handler type...

jastraat’s picture

I believe they mean a basic panel page - not something that is overwriting the /node/[nid] path.

dsnopek’s picture

I believe they mean a basic panel page

Can you give steps or a link to create a "basic panel page" because I don't really understand what that's referring to. Thanks!

dsnopek’s picture

Status: Needs review » Postponed (maintainer needs more info)

Postponing on needing more info - I don't think we should commit a patch that only addresses the symptoms without steps to reproduce and knowing what the cause is.

mygumbo’s picture

I have custom pages (regular panel pages, not the content type Basic Page), and can no longer update them to change their url, for instance, without getting this validation error.

/admin/structure/pages/add - to create one

Additional info: I can create a custom page and save. If I edit an existing custom page (for example, the url) and try to save, I get the validation error.

mlhess’s picture

Issue tags: +MWDS2016
dsnopek’s picture

@mygumbo: Are you on Panels 7.x-3.7? If not, please update to that version, we fixed many of the regressions from 7.x-3.6

mygumbo’s picture

@dsnopek: Thanks, yes, updated to 7.x-3.7. Seems resolved. Thanks for the quick fix.

mygumbo’s picture

Spoke too soon. Still throws off a watchdog notice:

Notice: Undefined index: handler in panels_page_manager_handler_add_validate() (line 1799 of www/sites/all/modules/panels/panels.module).

Saves changes.

othermachines’s picture

FileSize
243.36 KB

This notice just showed up for me so I can provide a bit more info.

I'm using Panels 7.x-3.7 and Drupal 7.44.

Notice: Undefined index: handler in panels_page_manager_handler_add_validate() (line 1799 of C:\wamp\www\abc\sites\all\modules\contrib\panels\panels.module).

As far as I can tell, it only seems to occur when hitting 'Update and save' from admin/structure/pages/nojs/operation/page-[page_name]/settings/basic.

It happens on all of my custom pages.

I'll include output of $form_state['values'] in case it'll help ('analytics' is the name of my page):

dpm() output

Of course the isset() check in #6 patch will resolve the notice, but we should make sure $form_state['page']->storage_type doesn't need to be set (I have no idea).

Edit: Corrected text, added notice as displayed in 7.x-3.7.

dsnopek’s picture

There is another issue that completely removes this code and replaces it with a different approach to do the same thing:

#2787637: Page manager gives access denied when managing newly added variants to tasks other than 'page'

Since that other patch also fixes other problems, I think I'd rather see that merged rather than figure out exactly what's going on here. But let's keep this open until that one is closed just in case.