- Issue created by @smokris
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 8:58pm 21 September 2023 - last update
about 1 year ago 50 pass - Status changed to Needs work
about 1 year ago 10:55pm 21 September 2023 - 🇮🇩Indonesia gausarts
> because the $this->blazyOembed->build($data); call overwrites $data['#entity']
An obvious mistake, thank you. I lost my Paragraphs works to notice it early. Thank you.> Check both the media entity as well as the wrapper entity.
You have clearly identified the mistake, many thanks, what about removing those mistaken overwrites instead?
Removing 2 lines is better than introducing extra entity wrapper with more IFs, IMHO?Thoughts?
- 🇺🇸United States smokris Athens, Ohio, USA
what about removing those mistaken overwrites instead?
Sure, removing unneeded code sounds good to me.
I'm not sure which lines to remove though. If I remove
BlazyEntityMediaBase::withElementDetail()
's call to$this->blazyOembed->build($data);
, then the paragraph content doesn't show at all. Could you clarify what you have in mind? - 🇮🇩Indonesia gausarts
I thought about your mentioned overwrites here:
https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Media/BlazyO...
https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Media/BlazyO...Perhaps that is all.
We'll figure out translated entity later, once you see it working as it was.
- 🇮🇩Indonesia gausarts
Specific for the translated one:
https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Media/BlazyO...Perhaps better a check, something like:
if ($build['#entity'] instanceof MediaInterface) { $build['#entity'] = $media; }
- 🇮🇩Indonesia gausarts
@smokris, Blazy has 3 caption types: lightbox, inline and overlay.
Which one you were referring to?
I just found out more issues specific to paragraphs captions.overlay.
Is this caption overlay what you were referring in the OP, or regular inline captions?If overlay, mind check out the latest DEV, if it is fixed another way round:
https://git.drupalcode.org/project/blazy/-/commit/17c2c6080fe0a2865a17ca...If inline, please update your patch. We'd love it to be in before 2.18 release this weekend.
Thank you.
- Status changed to Needs review
about 1 year ago 2:32am 23 September 2023 - last update
about 1 year ago 50 pass - 🇺🇸United States smokris Athens, Ohio, USA
Thanks for the feedback. My scenario is like this:
- I have a Content Type called "Paragraphs Page" that has an Entity Reference Revisions field that allows referencing Paragraphs
- The referenced Paragraph Type has these fields: Media (Entity Reference), Title (Text), and Link (Link)
- The Content Type uses the Slick Paragraphs Media formatter, with these Fields selected: Main Stage "Media", Title "Title", and Link "Link", with Layout "Caption bottom"
I tested the latest 2.x branch (a3186b7a, without any patches), but the Title and Link are not being rendered.
Commenting out these 2 lines fixes the problem (the Title and Link are now properly rendered): https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Media/BlazyO...
I've attached a new patch that removes those lines.
- Status changed to Needs work
about 1 year ago 2:52am 23 September 2023 - 🇮🇩Indonesia gausarts
Hm, that would remove regular media/oembed formatter displays?
You can have Blazy Media and other blazy-related paragraphs formatters side by side.
The first will be not render oembed, etc. due to being removed with the latest patch.If anything fails, your #2 is less problematic, only need to reuse
#parent
entity here if they are similar to your#wrapper
entity:
https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Field/BlazyE... - 🇮🇩Indonesia gausarts
> Slick Paragraphs Media formatter
What above its latest DEV? We got a fix there, too:
https://git.drupalcode.org/project/slick_paragraphs/-/commit/78af7a9029a...Does your issue still stand with the latest Slick Paragraphs?
- 🇮🇩Indonesia gausarts
What about reordering?
Move:
$this->blazyOembed->build($data);
https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Field/BlazyE...Here:
https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Field/BlazyE...Does that work for your use case?
- Status changed to Needs review
about 1 year ago 6:49am 23 September 2023 - last update
about 1 year ago 50 pass - 🇮🇩Indonesia gausarts
Let's get back to your initial identification, which is correct. And we'll fix it from there.
-
gausarts →
committed d4aa9748 on 8.x-2.x authored by
smokris →
Issue #3388977 by smokris, gausarts: After updating from Blazy 2.16 to 2...
-
gausarts →
committed d4aa9748 on 8.x-2.x authored by
smokris →
- Status changed to Fixed
about 1 year ago 7:19am 23 September 2023 - 🇮🇩Indonesia gausarts
This will do for now.
We got a deadline to meet this weekend :)Other regressions if any may follow as usual.
Committed. Thank you for contribution.
- 🇺🇸United States smokris Athens, Ohio, USA
I've confirmed that, with the combination of blazy 2.18 + slick 2.10 + slick_paragraphs 2.4, our captions are properly rendering again. Thanks, @gausarts!
- 🇮🇩Indonesia gausarts
Thanks for spotting this on and confirming, @smokris :)
Automatically closed - issue fixed for 2 weeks with no activity.