Okay, so this IPE is fantastic and we're really excited to debut it to some clients.

We wanted to pare down the options of content_types on the panels IPE. Now normally, that would be done through the Panels Settings forms. The first thing that came up was that the panels IPE wasn't asking what content_types it was allowed to display. We see in line 21-23 of of panels_renderer_ipe.class.inc

 if (empty($this->display->cache_key)) {
     $this->cache = panels_edit_cache_get_default($this->display, NULL, NULL); // [EDITORS NOTE] Nulls for emphasis
}

which if you follow that down will return you with a default list of content types, i.e., all of them.

So now, our brain gears are turning and we're thinking that we could really use a per renderer display of settings. The use case here is that an admin who has access to the IPE will probably have less permissions than someone who has access to the entire backend of panels.

So here's a patch that implements a panels_ipe set of options. Thanks to populist for doing the work for setting up the panels_commons_form().

Now there are immediately some redflags for me, but I wanted to get the conversation started.

  • cache_keys for panel_nodes are just the nid, this will lead to cache pollution between two people editing the same panel_node with two different interfaces. Now that's quite unlikely and we have the locking to prevent this, but I feel that expanding the cache_keys might be in order. Maybe something like $renderer_name:$module_name:$nid. Do you have a sense of how smart/hard this would be?
  • Are there other things that we are missing? Setting allowable content_types leads me to believe there are other permission/settings that were overlooked.
  • Is this the right place to be checking and setting the allowable_content_types
CommentFileSizeAuthor
#1 panels_ipe-886124.patch2.09 KBjonskulski
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonskulski’s picture

FileSize
2.09 KB

Here is the patch for the IPE settings.

merlinofchaos’s picture

Status: Active » Needs review

The allowed content should actually probably be part of the renderer pipeline, and not specific to panels_ipe -- of course, there's no UI for the pipeline at this time, but we could add a temporary UI to edit the allowed content for the default IPE.

This would also be true of allowed layouts.

Will need to talk to Sam about this. We have to weigh what's needed now against where we're going.

jonskulski’s picture

Absolutely. Definitely a larger conversation under the surface. This was mostly just to get it do what we needed it to do and track the issue. Thanks for the review, merlin.

StevenWill’s picture

subscribing

blackdog’s picture

Version: 6.x-3.7 » 6.x-3.9

This is a great patch, exactly what we needed.

DamienMcKenna’s picture

japerry’s picture

Version: 6.x-3.9 » 6.x-3.x-dev

Can anyone else vouch for this? It'd be great to go into 3.11 but I don't have a good enough test site to verify that its working as it should.

DamienMcKenna’s picture

japerry’s picture

Status: Needs review » Closed (outdated)

Closing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)