Closed (fixed)
Project:
Scald: Media Management made easy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2015 at 15:45 UTC
Updated:
12 Jun 2015 at 08:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
DeFr commentedThat seems to work for me as a minimal fix.
That being said, the fact that there's 3 AJAX callbacks that tries to fetch extract some metadata about an atom, and that all of them fills Drupal.dnd.Atoms[sid] with slightly different datas seems both error prone and wastefull. Namely, there's
Comment #3
DeFr commentedRe-roll against latest dev.
Comment #4
nagy.balint commentedThanks for the patch.
However i found one issue on code review:
+ $output = $context ? scald_render($atom, $context, $options) : scald_render($atom, 'title');But then we have
if ($context) {So it seems that even though output will be set to the title render, it will never be returned as the context is still not evaluates to true.
Comment #5
DeFr commentedIt won't be returned, but it's still needed to get correct result from theme('sdl_editor_legend', as mentionned in the code comment above and in scald_dnd_library_add_item.
We probably should add a preprocess function to theme_sdl_editor_legend, that ensures that at least scald_prerender got called before trying to output the legend, but that feels a lot like scope creep that I'd rather avoid, and a source of potential issues in the future (right now theme_sdl_editor_legend in Scald core only relies on properties added in the prerender phase, but up to now we've always tried to give it a fully rendered one).
Comment #6
nagy.balint commentedOkey then, its fine for me.
Comment #7
DeFr commentedPushed as 3a5950e