Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#16 | panels-dpm.jpg | 243.36 KB | othermachines |
#6 | panels-undefinied-handler-2786251-6.patch | 544 bytes | dsnopek |
Comments
Comment #2
the.tai.pen@gmail.com CreditAttribution: the.tai.pen@gmail.com at FFW commentedProviding the patch
Comment #3
the.tai.pen@gmail.com CreditAttribution: the.tai.pen@gmail.com at FFW commentedComment #4
dsnopekHm, 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.
Comment #5
japerryComment #6
dsnopekHere'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.
Comment #7
dsnopekSo, I can't figure out how to reproduce this:
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...
Comment #8
jastraat CreditAttribution: jastraat at Technivant commentedI believe they mean a basic panel page - not something that is overwriting the /node/[nid] path.
Comment #9
dsnopekCan you give steps or a link to create a "basic panel page" because I don't really understand what that's referring to. Thanks!
Comment #10
dsnopekPostponing 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.
Comment #11
mygumbo CreditAttribution: mygumbo commentedI 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.
Comment #12
mlhess CreditAttribution: mlhess as a volunteer commentedComment #13
dsnopek@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
Comment #14
mygumbo CreditAttribution: mygumbo commented@dsnopek: Thanks, yes, updated to 7.x-3.7. Seems resolved. Thanks for the quick fix.
Comment #15
mygumbo CreditAttribution: mygumbo commentedSpoke 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.
Comment #16
othermachines CreditAttribution: othermachines commentedThis 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.
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):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.
Comment #17
dsnopekThere 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.