Hi, I've created a new ECK type on a clean Drupal 8.1.1 website. The ECK has been called "rows" and I've assigned a layout from the default provided. I've also created a new entity reference field to "rows" on the default page content type.
The ECK content is not rendered using the assigned DS. Drupal simply prints the fields ignoring the DS layout.
I've tried to create a specific visualization mode and I've assigned it on the entity reference field visualization settings but with no difference.
Finally I've tried to print the ECK using views, even in this case the DS layout is ignored.
I've tried to use layouts referencing standard nodes and everything works as expected. The bug looks isolated to ECK entities.
Thanks for your feedback.
Comment | File | Size | Author |
---|---|---|---|
#9 | Report-2017-04-27.pdf | 69.89 KB | waspper |
Comments
Comment #2
FiNeX CreditAttribution: FiNeX as a volunteer commentedComment #3
FiNeX CreditAttribution: FiNeX as a volunteer commentedAfter digging into new Drupal 8 internals I've found that ECK doesn't define a view builder for the custom entity types.
In order to accomplish this task it should be implemented the
EntityViewBuilderInterface
or extendedEntityViewBuilder
. Unfortunately I've not yet the knowledge to develop a patch like this (I need more studying of Drupal 8), but I'm available to help with testing if needed.Thanks for your support.
Comment #4
jzavrl CreditAttribution: jzavrl at NDP commentedRight now I'm using Drupal 8.2.3, ECK alpha2 and DS 2.6 and I can create custom view modes, and also use them to generate the output. It worked when I referenced the new entity from a node and also when I displayed from a view.
Would probably be good for someone else to test this, but then I guess we can close this one :)
Comment #5
DamienMcKennaThere probably should be tests to confirm it works as intended.
Comment #6
andres.torres CreditAttribution: andres.torres commentedHi!
I can confirm the issue with ECK 8-x-alpha 3, Drupal 8.2.6, DS 8.2.6
Just created a fresh drupal install, added a custom view-mode to a new eck entity bundle, on this view mode i enabled Display suite layout and reorder fields etc. Tried to pull eck entries using a view and the view-mode created, Views ignore the view.mode/display suite config as well as trying to see the entity on its own landing page, the view mode is not working
Comment #7
andres.torres CreditAttribution: andres.torres commentedpromoting to Bug due to its importance
Comment #8
andypostNow it could support field_layout core module
Comment #9
waspper CreditAttribution: waspper as a volunteer and at Skilld commentedComment #10
DamienMcKennaComment #11
andres.torres CreditAttribution: andres.torres commentedCan confirm that the issue is still present on Drupal 8.3.2, running DS 8.x-3.0-rc1 and Boostrap Layouts 8.x-5.x-dev.
Eck entities are not being rendered using whatever view mode defined when using display suite layouts, they always render in like a default view mode.
Comment #12
isalmanhaider CreditAttribution: isalmanhaider as a volunteer commentedI would recommend to use Bricks for ECK, a good friend to ECK.
https://www.drupal.org/project/bricks
Comment #13
MLZRHi isalmanhaider,
well, I have Bricks in use and this issue is affect Bricks also.. since Bricks uses ECK I think .. :-(
I have a Brick and on the page
/admin/structure/eck/entity/brick/types/manage/[name of brick]/display I can chose a different layout of a Brick bundle. And when I chose one, I can move the fields arround. So it looks like it's working. Bud the output of the brick is NOT with the layout I chosen.. It seems the layout '- none-'.
So it seems the problems with ECK and DisplaySuite affect Bricks also.
I use: Drupal core 8.4.0 / Bricks 8.x-1.6 / Display Suite 8.x-3.1 / Entity Construction Kit (ECK) 8.x-1.0-alpha3
This versions are the 'recommended' versions this moment.
Marchello
Comment #14
isalmanhaider CreditAttribution: isalmanhaider as a volunteer commentedHi marchellodepello,
Understood. Forget bricks and DS.
Found this perfect module i.e ECK Page Manager, already used it on 5+ websites and ECK forms. Great to theme you add/edit and view ECK forms, works with panel pages.
https://www.drupal.org/project/eck_pm
Comment #15
MLZRI am working with Drupal 8 and this module is only available for version 7.
For other projects I am using https://www.drupal.org/project/paragraphs
For me I saw the Bricks module and thinking this is more flexible. I give it a try.
But I was experience to much things not working in my setup, or not working I was expecting.
So for now for this project I used Paragraphs to create a flexible way for the end- user to set up configurable pages.
I will see sometime in the future if there is time for Bricks to grow/evaluate if I test it again, and for the module 'ECK Page Manager' if there is a Drupal 8 version.
Thanks for your reply/suggestion.
Marchello
Comment #16
MLZRUpdate.. I was somewhat struggling with bricks. Then I jumped back to something I know; Paragraphs as you can read above.
For this case I was not so happy with Paragraphs either. Mainly because it depends on the module “entity reference revisions”. I don’t use revisions and when deleting paragraph types not in use anymore you can’t delete them. Because of the older revisions who live forever when the parent is deleted. I can’t control it and it feels like garbage in the database. For drupal 7 there are some modules for this, bud on this moment for drupal 8 not.
So I am back searching for a system who can build a page like paragraphs and bricks. I was looking on ECK and not happy with the absence of more than 1 display-view of the bundles..
But, there is a simple solution to this: https://www.drupal.org/project/eck/issues/2823571
It’s easy and working. So now exploring that path ..
View modes with DS #2823571 is working.. :-))
Update: now I am have the problem of this threat: "Display Suite / Layouts are ignored by ECK" .. With a quick little test I was thinking it was working. Bud now I do more complex things I see it's not OK.. :-\
Comment #17
MLZRUpdate... I was reading about the new module "Field Layout", ( https://www.drupal.org/node/2844297 ) and thinking 'maybe this will work with ECK'. I read also it is not working with DS, witch I had installed. So, DS uninstall and this module installed, and YES! the layout works.. fine; Top!!
Bud I miss all the goodies of DS ( special the field templates, witch I use to get rid of verry much HTML I don't want ) so I decided to install DS again to see If I did something wrong.. And now DS works also??! Hu? I don't know why.
I think I there was somewhere a configuration in DS wich killed the working together with DS/ECK.
I have seen this when I use the DS "expert" on the fields. Then all HTML is stripped so I have a clean field in the output. That's what I want bud seems sometimes not going well with other configurations / modules.
So for now, going to work with ECK and DS.
Also test with more than 1 view mode; this also works..
So, when expirience problems with ECK/DS? Try to re- install DS...
Comment #18
imclean CreditAttribution: imclean commentedMy suggestion would be to use the new Layout Builder experimental module in core. This allows you to select layouts, define your own layouts and modify/override existing layout templates.
It does seem to work with ECK, with the View Mode problem still present. What I mean is, you can create a new view mode under
/admin/structure/display-modes/view/add
but it won't automatically show as a tab under your ECK entity display mode page. Once you've created the view mode then enabled it within your ECK entity, a message will appear with a link to the new display mode. If you click on that you'll see the new display mode and the "Default" display mode tabs. You can modify it there but once you leave the view mode the tab won't reappear so you need to remember the URL for it.Comment #19
imclean CreditAttribution: imclean commentedOK it looks like my second paragraph can be ignored. The display modes appear nicely with the latest dev version of ECK.
Comment #20
squiggy CreditAttribution: squiggy at Kalamuna commentedUpdating the title to reflect remaining issue: Layouts are ignored by ECK.
I tested this and can confirm it allows selecting Layout Builder to take over a display mode, and editing the layout, but it doesn't render anything on the front-end.