I'm trying to add my panelizer configuration to an existing feature, but when I go to the Recreate Feature page, Panelizer is not listed in the components dropdown.

I've also tried creating a completely new feature, and still did not find Panelizer components.

I'm using:

  • Panels 3.0
  • Panelizer 2.0-rc1
  • CTools 1.0-beta1
  • Features 1.0-beta6

Comments

merlinofchaos’s picture

Other people have had this working, and I've never actually used the features integration myself, so I'm not sure I can actually help.

davidtrainer’s picture

Still working on this. I had intended to create a panelizer configuration that does not provide a default panel, but after adding and configuring one, I found that it appeared on the Features components dropdown. So I exported the feature and installed it again, but the Panelizer configuration page at /admin/config/content/panelizer still did not show my node type as panelized.

msmithcti’s picture

Category: support » feature

I've posted a duplicate issue (now closed) #1452098: Make Panelizer settings exportable on this.

From what I can tell the Panelizer defaults are exportable but the configuration (i.e. this entitiy should be panelized, with only these layouts available etc.) is not.

I'm setting this to a feature request on the above assumption.

merlinofchaos’s picture

I'm not sure what to say; there is a hook for adding this information to the feature that is implemented. My personal experience with features on this is limited, so it's difficult for me to tell what might be wrong.

msmithcti’s picture

Earl - I'm sure you have more experience on this than most! Could please you expand on:

there is a hook for adding this information to the feature that is implemented

Is this suggesting that it's implemented but not working/we're not setting it up right? Should we be using an implementation of "hook_panelizer_settings()" hard coded into the feature?

merlinofchaos’s picture

Specifically, Panelizer implements panelizer_features_export_alter which is supposed to include those variables automatically with the export.

msmithcti’s picture

I've played around with this some more and I'm fairly certain only the Panelizer defaults can currently be exported, the settings under the 'Available Content' tab can't.

I've tried to wrap my head around panelizer_features_export_alter() but all it seems to do (that's related to this issue anyway) is to add some features variable entries into the .info file of the feature. Two of these variables, '_allowed_layouts' and 'allowed_types' seem to be the settings we're looking for however they don't include any data.

Are the settings under 'Available Content' meant to be exportable, in which case this is a bug?

merlinofchaos’s picture

They are meant to be exported along with the default, yes.

mstrelan’s picture

If I export separate panelizer_defaults to separate features, which are available to be applied to the same content type it seems that the code in panelizer_features_export_alter() forces strongarm to export variables that have already been exported.

Example: I have a news content type and a services content type. Each of these have their own views. I have created a feature for news and a feature for services. I also have a global feature that contains various variables, including panelizer_node:page_allowed_layouts etc. When I add my services default panelizer panel to my services feature and try to enable the feature it tells me that it conflicts with another feature.

In my mind panelizer_features_export_alter() should not exist, but if it has to then it needs to somehow check that the variables are available for export. You can't manually add the variables once they're exported, so there must be a way of checking that.

merlinofchaos’s picture

This is going to require the assistance of someone who understands how to work with features for something like this. It's entirely possible that we need to be more aggressive -- there are lots of issues with the features interaction that are just frustrating and I don't entirely know how to fix them.

mstrelan’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new898 bytes

It seems to me if you're going to automatically export panelizer variables you need to make sure not to export them twice. This is easily fixed by adding $variables = array_diff($variables, array_keys(strongarm_vars_load())); as per the attached patch.

merlinofchaos’s picture

Status: Needs review » Active

I committed and pushed this and then I remembered:

Do we need to ensure strongarm is available? This might crash, unless strongarm is required for this hook to even run. Do you know?

Moving back to active; this may need a followup patch.

andypost’s picture

Status: Active » Needs review
StatusFileSize
new610 bytes

follow-up

merlinofchaos’s picture

Status: Needs review » Fixed

Thanks! Committed and pushed!

Status: Fixed » Closed (fixed)

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