If the Title module is used to replace titles in fieldable panels panes then when add that pane through IPE's modal have notice & warning:
Notice: Undefined index: title in panopoly_widgets_form_alter() (line 191 of /path/to/modules/panopoly/panopoly_widgets/panopoly_widgets.module).
Notice: Undefined index: link in panopoly_widgets_form_alter() (line 197 of /path/to/modules/panopoly/panopoly_widgets/panopoly_widgets.module).
Warning: Invalid argument supplied for foreach() in element_children() (line 6549 of /drupal_root/includes/common.inc).
Warning: Invalid argument supplied for foreach() in element_children() (line 6549 of /drupal_root/includes/common.inc).
It seems that that is because Panopoly Widgets unsets the title & link. However, the Title module is already hiding the title & link field... which causes the problem.
Steps to reproduce:
1) Install Entity Translation and Title modules
2) Set a content type up so that it can be translated using Entity Translation, with URL language negotiation.
3) Set up a translation of a node from the above content type so that you can test. For example have EN and ES
3) Replace Titles in one of your fieldable panels pane types
4) Create an FPP entity with a title through IPE's modal, then click Add
5) You will receive above warnings & notices
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2507123-panopoly_widgets-support-Title-module-1.patch | 1.11 KB | HaiNguyen007 |
| error_Title.png | 135.57 KB | HaiNguyen007 |
Comments
Comment #1
HaiNguyen007 commentedRelated issue: Panopoly Widgets - support the Title module
Comment #2
HaiNguyen007 commentedThis patch prevent above notices & warning from appearing.
Comment #3
dsnopekThanks! Sounds like a bug, so I changed the Category.
This might be a duplicate of this issue:
#2314059: Panopoly Widgets - support the Title module
Have you tried the patch there? If so, please comment there and let's see if we can't get that merged. :-)
Comment #4
HaiNguyen007 commentedComment #5
HaiNguyen007 commentedComment #6
HaiNguyen007 commented@dsnopek: the patch in #2314059: Panopoly Widgets - support the Title module not work because that patch don't check $form['title'] & $form['link'] keys exist or not.
Comment #7
dsnopekOk. But is it the same problem? If so, please put your patch on that issue and let's work on it over there rather than having two issues for the same thing in the queue. :-) Thanks!
Comment #8
HaiNguyen007 commentedAnd this use case is broader than #2314059 ; this bug appear everywhere ctool's modal use to add content to a panels, mini-panels, panelizered entities,... ; entity translation enable or not; single language / multiple language or not.
Comment #9
HaiNguyen007 commentedAnd I also posted this patch on that issue for your convenience : https://www.drupal.org/node/2314059#comment-10029931 :)
Comment #10
HaiNguyen007 commentedanother related issue: #2049441 Support title module
Comment #11
HaiNguyen007 commentedSome intergration ideas from fieldable panels panes: Commit f89fb413: Issue #2457995 by B-Prod: Fixed compatibility with the Title module.