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.
After a while I updated modules on my app which is using superfish module and it started to throw notices:
Notice: Undefined index: title in theme_superfish_menu_item_link() (line 2170 of /var/www/elbe/ver/initial/sites/all/modules/contrib/superfish/superfish.module).
Notice: Undefined index: href in theme_superfish_menu_item_link() (line 2170 of /var/www/elbe/ver/initial/sites/all/modules/contrib/superfish/superfish.module).
I figured out that it is doing only when unchecking "Add cloned parent links to the top of sub-menus" option for Superfish menu. In the code I realized that $clone_parent is set to NULL instead of FALSE and then it won't pass many conditions like this:
if ($clone_parent !== FALSE) {
array_unshift($menu, $clone_parent);
}
Don't know if this is problem only on my side, but if this options is enabled, the $cloned_parent value is OK, being cloned parent.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2680401-fix-notices-due-to-clone-parent-not-being-false.patch | 555 bytes | hideaway |
Comments
Comment #2
hideaway CreditAttribution: hideaway commentedI am resolving the issue by setting FALSE value for $clone_parent variable if it is just empty
Comment #3
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented