Closed (fixed)
Project:
Scald: Media Management made easy
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2015 at 17:05 UTC
Updated:
23 Apr 2015 at 22:44 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
gmclelland commentedI'm going to try and reproduce on simplytest.me
Comment #2
gmclelland commentedActually this doesn't have anything to do with the paragraphs module.
Steps to reproduce the problem:
- goto http://simplytest.me/project/scald_galaxy/7.x-1.x
- goto /admin/structure/types/manage/article/fields/field_image
- change the "Rendering context" to "Preview Representation" and change the Number of Values to "Unlimited"
- goto /node/add/article
- open the scald drawer and add three image atoms
- add one of the image atoms to the "Image" atom reference field on the article node
- Notice the "Operation" link in the upper right hand of the webpage?
I'm not sure what the best way to title this issue?
Comment #3
nagy.balint commentedHi!
So far i cant reproduce the problem.
Comment #4
nagy.balint commentedOkey i got it.
The issue is only related to the preview representation, if you set that rendering context to anything else it works fine.
Generally the preview representation is used only for the qtip preview in dnd, not exactly sure if it was intended to be used anywhere else .
Comment #5
nagy.balint commentedComment #6
nagy.balint commentedThe issue is that, the preview representation is not parseable, and it cannot be set parseable on the UI, so i think its safe to say that it was not inteded to be set up as rendering context in that area.
So the only thing we can do is to remove that representation from the list, as we already remove the library representation.
But of course you can make your own representation that can be made parseable and displays all the information you need. If you need help with that let me know.
Comment #7
nagy.balint commentedThe patch to remove the preview repr. from the list.
Comment #10
gmclelland commentedGood thinking @nagy.balint. To be honest, I still don't quite understand the difference between "Scald context" and "Rendering context"?
I also notice the behavior with the "Rendering context" set to "Title". We should probably hide that as well, right?
Scald Galaxy includes scald 7.x-1.x-dev
Comment #11
gmclelland commentedTested the patch and it does remove the "Preview Representation" from the "Rendering context"
Comment #12
nagy.balint commentedThere is no real difference. Its just Atom reference fields do not support non parseable contexts (mostly the internal contexts like library and preview). You can find their definitions at scald_dnd_library_scald_contexts().
And the rest of the system contexts are defined at _scald_system_contexts()
And indeed, you are right, that it would be a better check if we checked whether a context is parseable or not, instead of picking a few.
Comment #13
gmclelland commentedI tested the patch in #12 and it does remove the parseable contexts.
Can you further explain what the difference between "Scald context" and "Rendering context" does?
I see that the "Rendering context" changes how the atoms are displayed on the atom reference field when editing the node, but what does the "Scald context" do?
Comment #14
gifad commentedShould not the check be updated in
atom_reference_field_widget_form()too ?But please don't filter out the title context in manage/display (I'm using it in teaser view mode)
Comment #15
nagy.balint commentedWow, you might have uncovered a merge issue ...
Comment #16
nagy.balint commented@gifad in manage display thats the title formatter, so that wont be harmed :)
Comment #17
nagy.balint commentedI believe we have one too many context selections.
At the moment as I see the scald context widget setting is used to populate
$element['#preview_context'] = $preview_context;But thats it.
It was to be used on display as well, but then we commited the patch to add view and edit links to the atom reference.
And unfortunately that patch overrode the display, and added another context selection on the instance level.
And so now everything works with this field instance level context, but the widget level context introduced by @yched is still there.
So maybe the easiest is to delete the widget based context selector.
Or we can remove the instance level one and rework the other code to always use widget settings.
What do you think?
Comment #18
nagy.balint commentedIt seems to me that it makes more sense as a widget setting, as basically that context is only to define the render on the widget itself, and has nothing to do with any other display. Going to make the adjustments like that.
Comment #19
nagy.balint commentedAttaching the patch that does that.
Since this new rendering context was only added after the last stable (1.3), and in 1.3 there is only this widget setting, and i kept the name of the original widget setting, and we kept the original widget setting even if someone upgraded to the dev, likely we dont have to do any migration here.
Comment #20
gmclelland commentedSounds like a good idea. Patch seems to work for me.
Comment #21
gifad commentedWorks for me too...
To answer my question at #14
the select box here is rebuilt in atom_reference.js from
Drupal.settings.dnd.contexts[], built (and filtered) in dnd.moduleComment #22
nagy.balint commentedYes but that is different, because that is the context override for the display of the atom reference. While this patch only changes the context setting for the field widget on the edit form. And the two are different.
Thats why the formatter wont be modified here either, cause the formatter is for the display, while this patch here is for the form widget only.
Comment #24
nagy.balint commentedThanks for finding this issue!
Fix committed.