Closed (fixed)
Project:
Panelizer (obsolete)
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2016 at 12:55 UTC
Updated:
20 Jan 2017 at 21:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dsnopekOops! Forgot to remove a bit of text added by Dreditor.
Comment #3
dsnopekAdded parent issue: #2664584: [meta] Support all core content entity types
Comment #4
artreaktor commentedI implemented integration plugin, but stuck having 403 error when accessing
PanelsIPEPageController::getBlockPluginsroute:
panels_ipe.block_pluginsurl:
/admin/panels_ipe/variant/panelizer_field/taxonomy_term:40:full/block_pluginsI'm able to add first block (whatever type) to the term panelizer, as well as save the changes. But the error appears when I'm trying to add one more block (Manage Content) or change layout.
UPD: the panelizer stops working after the panel was saved as custom. Till that point I can add any number of blocks. In other words: it is fully-functional until first save-as-custom.
Also it's not possible to save the panel as default: the changes are lost on page refresh.
Comment #5
artreaktor commentedThis patch fixes the #4 "403" issue
Comment #6
floretan commentedRerolling the patch from comment #4 so that it applies cleanly with git. This doesn't provide the full functionality described in the issue description, but it's a usable starting point.
Comment #7
jlandfried commentedI've been using #6 for some time and have only had to make one minor change, and that is that the token for the page title should be [term:name] rather than [taxonomy_term:name]. Other than that this has been working well for several months for me.
I did adjust how the page title gets set so it mirrors how PanelizerNode does it, and added a functional test similar to the PanelizerNodeFunctionalTest.
The d7 version of the term display doesn't have any special handling for the default display (http://cgit.drupalcode.org/panelizer/tree/plugins/entity/PanelizerEntity...), so I don't really think anything's needed here, at least not for the initial implementation.
Comment #9
jlandfried commentedFwiw, the test failure is related to the node functional test. In the interest of not muddling the issue at hand I've created https://www.drupal.org/node/2820562 to address that.
Comment #13
hctomI took a look at patch from #7. Here are some notes/questions:
$entity instanceof RevisionableInterface? If this is really necessary, there are several more places in the module that use the same pattern'name' block...in// Remove 'title' block...commentnode(s)Comment #14
hctomAnd here is an updated patch with the noted changes (also with the unchanged
$entity instanceof RevisionableInterfacepart).Comment #15
hctomUse issue template to be able to outline remaining tasks better
Comment #16
jlandfried commentedHey @hctom, thanks for taking a look at this, and catching the references to node in the comments!
\Drupal\taxonomy\Entity\Termis an instance ofRevisionableInterface, since it extendsContentEntityBase, even though terms aren't revisionable themselves.setNewRevision throws an exception when it's called for an entity that isn't capable of using revisions.
With #14 applied, I receive the following error when trying to update the panelizer display for a taxonomy term:
Comment #17
hctomRemove
descriptionfield task, because it should be handled by thePanelizerEntityBasebase class alreadyComment #18
hctom@jiff Ah thanx for the explanation. So this is really a bug itself in the whole panelizer project ;) I created a new issue to keep this separated, because it also affects other parts of the code: #2828840: Handle revisionable entities better
Comment #19
phenaproximaDid a little research and updated the remaining tasks:
Taxonomy terms do have a view builder, but it only implements alterBuild()...and the Panelizer plugin in the latest patch does the same exact thing.
Taxonomy does not provide any block plugins of its own, so it seems safe to assume that there are no special blocks we need to handle.
Taxonomy does not implement this hook.
Grepping for "_view_alter" in taxonomy.module produces no results.
Comment #20
phenaproximaMarking for review so we can see if the tests passeth.
Comment #21
phenaproximaRe-upping the patch to trigger testing.
Comment #22
damienmckenna... why didn't the tests trigger?
Comment #23
damienmckennaComment #26
phenaproximaFamous last words, but this should pass the tests.
Comment #27
damienmckennaPS I've added a new issue for refactoring the entity tests: #2834851: Add generic entity tests, extend for each entity type
Seeing as this issue already has tests the refactoring can be done later.
Comment #29
damienmckennaCommitted, thanks everyone!