- ๐ฉ๐ชGermany Internetter Erfurt, Thรผringen
Perhaps other also use svg_image, than you must perhaps use this patch: https://www.drupal.org/project/svg_image/issues/3337927#comment-14898139 ๐ Image links with multiple query parameters have ampersand encoded in REST view Fixed
- First commit to issue fork.
- ๐จ๐ญSwitzerland cburschka
Huh. I'm surprised we've even been using a #markup array there, instead of just using the same SerializedData object as immediately above. It looks like this is the only place in the entire module where a field formatter can return something that isn't wrapped in SerializedData.
(Git annotations show I wrote this part in the first few days while designing the module. My guess is that the plugin was only created in the first place to handle the case where alt and title attributes needed to be exported, and that this else branch was rarely used.)
Thanks for the patch! I'm going ahead and replacing that section with
else { $elements[$delta] = [ '#type' => 'data', '#data' => SerializedData::create($uri), ]; }
for consistency, which from local testing seems to also fix it.
(Note for future reference: Maybe counterintuitively, the $uri variable here - from the moment it is retrieved from Entity::getFileUri() - is a string, not an instance of Drupal\Core\Url. Just noting that in case core changes that in the future and breaks this.)
- Status changed to Needs review
almost 2 years ago 12:59pm 2 February 2023 - @cburschka opened merge request.
-
cburschka โ
committed 1f85e020 on 3.0.x
Issue #3176391: Image links with multiple query parameters have...
-
cburschka โ
committed 1f85e020 on 3.0.x
- @cburschka opened merge request.
-
cburschka โ
committed a5831506 on 2.0.x
Issue #3176391 by cburschka, rahulrasgon: Image links with multiple...
-
cburschka โ
committed a5831506 on 2.0.x
- Status changed to Fixed
almost 2 years ago 1:07pm 2 February 2023 -
cburschka โ
committed c272a8c0 on 3.0.x
followup to Issue #3176391: Remove unused import.
-
cburschka โ
committed c272a8c0 on 3.0.x
Automatically closed - issue fixed for 2 weeks with no activity.