Closed (fixed)
Project:
Scald: Media Management made easy
Version:
7.x-1.x-dev
Component:
Scald core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2014 at 13:37 UTC
Updated:
20 Apr 2015 at 20:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
NiRaDo commentedComment #2
davidhk commentedDo you see the changes if you clear Drupal's cache (admin/config/development/performance)
I'm currently testing Scald, and used Display Suite to make some changes to the layout of an Atom. I found that Scald caches the Atom's display, so it didn't show changes made in Display Suite, or any changes to Display Suite fields.
My temporary workaround is to disable Scald's caching by selecting the 'Always rebuild rendered content' option at admin/config/content/scald
Comment #3
NiRaDo commentedHi davidhk. Thanks for your answer.
I have tested what have you said on simplytest.me with last versions of scald and field group. It doesn't work.
Comment #4
fxfx commentedhaving same problem doesnt work with display suite nor with panels layouts
Comment #5
fxfx commentedany update on this?
Comment #6
jcisio commentedComment #7
jussil commentedHello, our team also stumbled upon this issue. We really felt that current scald atom render pipeline is lacking in terms of altering and options how to do the actual output. As we are using Display Suite for content itself, we wanted to use it for scald atoms, as the display part configuring is already working with DS just fine (or with little hiccups).
We went through what DS needs in order to be used in entity rendering and borrowed code and style from node. DS implements hook_theme_registry_alter that adds DS specific variables for entities. In order for DS to add these variables there must be theme that have name of entity which in this case is "scald_atom". Also when it does rendering of the scald_atom, there must be "content" so that DS can pick the content into its own regions.
What we added:
This patch works atleast for 1.3 and for dev version for now. This is somewhat tested in basic rendering from fields and when used within wysiwyg via dnd. There can be some issues with atoms being cached which is another issue, but the patch seems to solve most of the rendering needs that we have right now.
I bet that the patch wont be mergeable as it is, but should be a good starting point if you are looking for a more finely tuned control over atom rendering, just like for any other entities.
Comment #8
gifad commentedComment #9
jussil commentedToken with Display Suite requires scald_atom (entity name) in the template variables that points to actual entity (currently atom, as everywhere), so I added it. Right now there is atom and scald_atom keys pointing to same object which is not that cool I guess, but atleast Tokens work better and without bunch of notices.
Comment #10
nagy.balint commentedAs far as I understand, the problem is mainly with the view page of an atom, when the user clicks the "view" link in the dnd, and then gets to a view page where the design is currently not entirely controllable with display suite.
In wysiwyg however the complete render is done by representations, and not by fields, and therefore, not sure why the patch would have anything to do with wysiwyg.
Comment #11
nagy.balint commentedIndeed field group works fine after this patch.
There is a cache problem as indicated above, maybe after a save on the DS UI we should somehow empty the scald cache.
Comment #12
shiraz dindarSuper thankful for your patch, Jussil! I have my field groups back!
Incidentally, field groups in scald atoms using DS worked fine up until field groups 1.1. In version 1.2 they did a major refactor (merged in 2.x branch), and it's from that point onwards that field groups were no longer rendered for scald atoms.
I'm hoping this patch gets rolled, as, aside from the fact that it fixes fieldgroups, I agree that the "scald atom render pipeline is lacking in terms of altering and options how to do the actual output". Up until now I've actually had to hack atom_reference_field_formatter_view directly. I may be able to unhack that now this patch is in.
Comment #13
nagy.balint commentedThe patch is in a good shape to get in, however we still need to solve the cache issue.
If someone can contribute the code for that, then we can get this into scald core.
Of course more testing would not hurt :)
Comment #14
nagy.balint commentedHere is a new patch that should solve the cache issue.
It will also work when the instances are updated programmatically.
Comment #16
nagy.balint commentedThanks, Committed.