The latest update 7.x-3.3+63-dev introduced a series of the following bugs that show up in the "Panel content" tab:

Notice: Undefined index: visibility in panels_renderer_editor->get_pane_links() (line 481 of /Library/WebServer/Documents/loudcloud2/sites/all/modules/panels/plugins/display_renderers/panels_renderer_editor.class.php).

where for each panel pane you get 3 bugs: one with "visibility", another one with "lock", and the third one with "cache"

Comments

costinius’s picture

Update: I am not an expert at php errors, but it has something to do with user permissions. If I allow a user to "Configure access settings on Panel panes", "Configure caching settings on Panels", and "Use panel locks", the error disappears.

costinius’s picture

I think I've got to the bottom of the issue. Basically, if a user doesn't have the rights mentioned in the comment above, the $links[] array does not get the keys 'visibility', 'lock', 'cache' etc. However, in line 481 the code runs through these keys anyway and that causes an issue.

So, I've changed the code a bit to check whether these keys exist in the array by adding the following instruction:

if (array_key_exists($category, $links))

and the whole code now looks like (starting line 469):

    $dropdown_links = $links['top'];
    foreach (array(
	  'style' => 'Style',
	  'visibility' => 'Visibility rules',
	  'lock' => 'Locking',
	  'cache' => 'Caching'
    ) as $category => $label) {
       if (array_key_exists($category, $links)) {
		  $dropdown_links[] = array(
			'title' => '<hr />',
			'html' => TRUE,
		  );
		  $dropdown_links[] = array(
			'title' => '<span class="dropdown-header">' . t($label) . '</span>' . theme_links(array('links' => $links[$category], 'attributes' => array(), 'heading' => array())),
			'html' => TRUE,
			'attributes' => array('class' => array('panels-sub-menu')),
		  );
       }
    }
chris burge’s picture

StatusFileSize
new1.55 KB

I ran across these same errors, which led me to this issue. My testing confirms the three permissions you identified. Changing the code in panels_renderer_editor.class.php as you suggest fixes the errors for me. Attached is a patch created from #2.

chris burge’s picture

Status: Active » Needs review
xaa’s picture

patch working. thank you.

bradjones1’s picture

Status: Needs review » Needs work

Needs code formatting fixes at the very least.

johnnydarkko’s picture

Status: Needs work » Needs review
StatusFileSize
new1.71 KB
new1.77 KB

Rerolled the patch to follow drupal coding standards.
Thanks for the patch, Chris Burge! Works great for me too!

johnnydarkko’s picture

StatusFileSize
new1.77 KB
new550 bytes

Darn... forgot a comma.

chris burge’s picture

Testing of #8 patch was successful. Thanks @johnnydarkko.

johnnydarkko’s picture

Status: Needs review » Reviewed & tested by the community
d0t15t’s picture

patch #8 works for me.

axroth’s picture

patch #8 works for me as well.

jackalope’s picture

The patch in #8 works for me as well. Thanks so much!

danepowell’s picture

Yep, #8 works.

weri’s picture

Patch #8 works for me also.

pietrocap’s picture

Patch #8 woks, even if applied to 7.x-3.4

func0der’s picture

Merge, merge, merge! :D

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the testing, committed to dev.

  • japerry committed 61f4c16 on 7.x-3.x authored by johnnydarkko
    Issue #2189069 by johnnydarkko, Chris Burge: Undefined index: visibility...

Status: Fixed » Closed (fixed)

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