Closed (fixed)
Project:
Panelizer (obsolete)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2012 at 19:02 UTC
Updated:
20 Apr 2012 at 16:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedOther people have had this working, and I've never actually used the features integration myself, so I'm not sure I can actually help.
Comment #2
davidtrainer commentedStill 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.
Comment #3
msmithcti commentedI'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.
Comment #4
merlinofchaos commentedI'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.
Comment #5
msmithcti commentedEarl - I'm sure you have more experience on this than most! Could please you expand on:
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?Comment #6
merlinofchaos commentedSpecifically, Panelizer implements
panelizer_features_export_alterwhich is supposed to include those variables automatically with the export.Comment #7
msmithcti commentedI'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?
Comment #8
merlinofchaos commentedThey are meant to be exported along with the default, yes.
Comment #9
mstrelan commentedIf 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_layoutsetc. 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.
Comment #10
merlinofchaos commentedThis 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.
Comment #11
mstrelan commentedIt 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.Comment #12
merlinofchaos commentedI 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.
Comment #13
andypostfollow-up
Comment #14
merlinofchaos commentedThanks! Committed and pushed!