Closed (fixed)
Project:
FileField Sources
Version:
8.x-1.x-dev
Component:
General
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2020 at 20:21 UTC
Updated:
18 Nov 2021 at 13:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
douggreen commentedAttached patch converts the theme functions to twig templates. I'm unfamiliar with this module, so this needs thorough review. I'm particularly concerned with using
|rawin the element template, as this might have security implications.Comment #3
bohus ulrychHi,
FYI this patch removed warnings, but also broke functionality.
No error on the page, in watchdog or console log.
Tested with D9.1.5 and module version 8.x-1.x-dev updated 15 Jan 2021 at 18:15 UTC
Thanks
Comment #4
bohus ulrychHello @douggreen
I believe I've found where is the issue.
In you patch you are replacing
- return '<div class="filefield-sources-list">' . implode(' | ', $links) . '</div>';with
+<div class="fieldfield-sources-list">You see? There is different class name filefield-sources-list VS fieldfield-sources-list
And this class name is then used in JavaScript file, with wrong class name it doesn't work.
After correcting this it works.
Comment #5
rivimeyI've made a new patch, based on current HEAD, that implements the change in #4.
Comment #7
rivimeyOops. sorry, let me format that again..
Comment #8
gnugetHere a new version of #2 with the changes suggested at #4.
This is looking good.
I will give it a few days and then I will commit it.
Thanks!!!
Comment #9
bohus ulrychTested (D9.1.7), works. Thanks
Comment #11
gnugetComment #13
aiphesI'm facing off this issue with
File Field Sources (filefield_sources) 8.x-1.0-alpha4on D9.2.7.User deprecated function: Theme functions are deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of theme_filefield_sources_list(). See https://www.drupal.org/node/1831138 in Drupal\Core\Theme\Registry->processExtension() (line 498 of core/lib/Drupal/Core/Theme/Registry.php).which version do I use to avoid this warning ?
thanks