Here they are... shown after clearing caches and on while editing view.

Notice: Undefined index: view modes in PanelizerEntityDefault->hook_menu() (line 298 of /home/draswa/public_html/dev/ae/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
Warning: Invalid argument supplied for foreach() in PanelizerEntityDefault->hook_menu() (line 298 of /home/draswa/public_html/dev/ae/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
Notice: Undefined index: view modes in PanelizerEntityDefault->add_admin_links() (line 398 of /home/draswa/public_html/dev/ae/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
Warning: Invalid argument supplied for foreach() in PanelizerEntityDefault->add_admin_links() (line 398 of /home/draswa/public_html/dev/ae/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mansspams’s picture

Despite this issue, still there is these notices #1648040: Notices in Panelizer Upgrade Process

Very similar soution works in this case too, wrapping foreach() in if (!empty($entity_info['view modes'])) {}

mansspams’s picture

Status: Active » Needs review
FileSize
11.2 KB

Patch attached. Not sure why my windows git bash made patch so huge when only two lines added, but should work.

merlinofchaos’s picture

Status: Needs review » Needs work
+++ b/plugins/entity/PanelizerEntityDefault.class.phpundefined
@@ -395,138 +395,140 @@ abstract class PanelizerEntityDefault implements PanelizerEntityInterface {
-    foreach ($this->plugin['view modes'] as $view_mode => $view_mode_info) {

This makes no sense. There should always be plugin['view modes'] set during the process. So this is the wrong place to fix something.

merlinofchaos’s picture

So looking at panelizer_entity_plugin_process() the only way that $this->plugin['view modes'] should ever be empty is if $entity_info somehow doesn't exist, and if that happens i believe that hook_menu should never get called.

That leaves open a mild possibility that perhaps caches are not appropriatly cleared and you're getting stale plugin data?

jherencia’s picture

I have the same problem and in my case the warning appears in the plugin PanelizerEntityTaxonomyTerm. The reason is that I do not have taxonomy module enabled, it disappears once taxonomy module is enabled.

jherencia’s picture

Title: Notices after update from 2.x to 3.x » Notices when taxonomy module is not enabled
Status: Needs work » Needs review
FileSize
1.42 KB
1.03 KB

Here is the patch that has fixed all the warnings/notices I found because of taxonomy terms in panelizer.

jherencia’s picture

FileSize
1.09 KB
1.48 KB

Last patch was for 2.x, this is the correct one for 3.x.

MustangGB’s picture

Status: Needs review » Reviewed & tested by the community

#7: That does the job.

luisortizramos’s picture

Confirmed #7 works for me also.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to both 2.x and 3.x branches.

Status: Fixed » Closed (fixed)

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