Note: The panelizer panel select tab does appear when editing pre-existing nodes. The problem only occurs when adding new nodes.
Repeatable: Always
Steps to repeat:
1. Install standard version of Drupal 7.15
2. Install Panelizer 7.x-3.0-rc1+1-dev, Panels 7.x-3.3+1-dev, Chaos tools 7.x-1.2+3-dev. (have also checked non-dev releases)
3. Tick: panelize, provide default panel, allow panel choice for the basic page (full page override) at admin/config/content/panelizer
3. Create an additional panel for the basic page at admin/config/content/panelizer/node/page.page_manager/list
4. Add a basic page at node/add/page
Expected Results:
Panelizer panel select tab with a select list allowing the user to select the default or other panel
Actual Results:
No Panelizer panel select tab
Thanks in advance for looking into this. And thanks for all your hard work! Am really excited about using panelizer in my future projects.
Andrew
Comment | File | Size | Author |
---|---|---|---|
#12 | 1790434-allow-choice-option-11.patch | 813 bytes | populist |
#8 | panelizer-fix-layout-choice-1790434-8.patch | 4.74 KB | szantog |
#5 | panelizer-fix-layout-choice-1790434-5.patch | 5.29 KB | das-peter |
#4 | panelizer-fix-layout-choice-1790434-4.patch | 4.41 KB | das-peter |
#3 | panelizer-fix-layout-choice-1790434-3.patch | 3.76 KB | das-peter |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedSame issue here
Comment #2
er_gaurav_sharma CreditAttribution: er_gaurav_sharma commentedHello there,
Me too have a problem. I enabled allow multiple panel layout and created three templates. But when i create a node there is no option appearing t hat allow me to choose from various panelized template. But surprisingly when i use panoply drupal distribution there it works. So if you really need that feature i advice choose panoply for now or upgrade an existing one to panoply distribution.
Thanks and Regard
Gaurav Sharma
Comment #3
das-peter CreditAttribution: das-peter commentedSame issue here.
As far as I can tell the issue has two parts:
PanelizerEntityDefault::hook_entity_load()
usesPanelizerEntityDefault::has_default_panel()
insteadPanelizerEntityDefault::is_panelized()
to determine whether it has to deal with defaultsPanelizerEntityDefault::hook_field_attach_form()
hides the vertical tab based on the last view mode processed in the loop and not per view mode. Correct would be to define the access per widget and the access to the vertical tab is granted as soon as one of the widgets is accessible.The attached patch does the necessary changes to fix the issues mentioned above.
Comment #4
das-peter CreditAttribution: das-peter commentedIt looks like this patch uncovered another issue.
panelizer_panels_cache_get()
callspanels_common_get_allowed_layouts()
, unfortunatelypanels_common_get_allowed_layouts()
doesn't ensure that the panels plugin is loaded (ctools_include('plugins', 'panels');
).Thus you can end up with a fatal error that complains that the function
panels_get_layouts()
couldn't be found.I've added
ctools_include('plugins', 'panels');
topanelizer_panels_cache_get()
in the updated patch to ensure the plugin is really available.However, I'm not sure if this not better should be part of
panels_common_get_allowed_layouts()
instead.Comment #5
das-peter CreditAttribution: das-peter commentedAdded other adjustments:
PanelizerEntityDefault::has_panel_choice()
didn't properly callPanelizerEntityDefault::is_panelized
. It was called with the bundle only even if a view mode was given.PanelizerEntityDefault::panelizer_access()
forchoice
, similar tosettings
andoverview
. Needs review!Comment #6
Andrew Edwards CreditAttribution: Andrew Edwards commentedGood stuff! It's working well for me. I don't have enough knowledge of panelizer to review the code unfortunately, but it's great to be able to use the layout choice functionality now. Thanks!
Comment #7
szantog CreditAttribution: szantog commentedHmm.. It was hard to apply this patch (twice), rerolled against the latest dev.
It works as well, if on content type settings Provide default panel is checked.
If not, then add a new node without panel, save, and edit, the default panel is set as 'default'. It means, if when a node was saved with panelizer, there isn't any chance to "depanelize" it.
Comment #8
szantog CreditAttribution: szantog commentedyep, forgot the patch.
Comment #9
populist CreditAttribution: populist commentedI did a review of this patch and it solves the problem I was seeing of the Panel Choice tab not showing up. The patch code looks straight forward enough, but might need another set of eyes.
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedThis part of the patch does not make sense to me. If there isn't a default (which is possible; if there is 'choice' and no 'default' then the default state is not panelized) we shouldn't be trying to load something. Please explain this change to me?
Comment #11
merlinofchaos CreditAttribution: merlinofchaos commentedThe above is particularly true because the reproduction instructions have you select "has default", so changing that test is very different from the reproduction instructions.
Comment #12
populist CreditAttribution: populist commentedHere is a more basic patch that just allows the selection box to be added.
Comment #13
populist CreditAttribution: populist commentedI tested this new patch with the following conditions and it works fine:
1.) Create a content type that is Panelized with multiple options
2.) When creating node select an option and make sure the specified layout/content configuration exists
3.) Switch the option later (if the page isn't overriddeN0
Comment #14
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted and pushed #12.
There are some pieces of the original patch that seem like they might be legitimate bug fixes in other areas. These should not be lost, but I need more information about what they are fixing.
Comment #15
das-peter CreditAttribution: das-peter commentedI don't know what information I should deliver. I've wrote down what and why I did in each post. However, all the changes I made were based on assumptions I made about how panelizer works, not on qualified knowledge.
So, let me know how I can provide the information needed and I'll do so.