Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
Olivero theme
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Apr 2021 at 08:52 UTC
Updated:
9 Apr 2022 at 17:29 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
aaron.ferris commentedLikely because the images are floated when aligned left/right, ill take a look when I get 5.
Comment #3
aaron.ferris commentedI would propose Olivero uses a text-with-summary template that extends the field template, with some additional classes to handle fields that can contain formatted text (and thus floated elements)
This is similar to the way the likes of Bartik (and Classy) handle these fields. Although its slightly different over there as they use an extension of a different template. The result should remain the same,
clearfixis added to the field classes (which fixes this problem)Feedback welcome.
Comment #4
aaron.ferris commentedComment #5
abhijith s commentedApplied patch #3 and it worked fine.
Before patch:
After patch:
RTBC +1
Comment #6
djsagar commentedPosition issue is resolved after applied #3 patch "3209903-olivero-text-with-summary-3.patch" so moving on RTBC.
Comment #9
djsagar commentedComment #10
aaron.ferris commentedThis was passing tests up until recently, I'd need to look into the failures when I get 5 unless @djsagar gets there before me
Comment #11
aaron.ferris commentedReroll attached
Comment #12
aaron.ferris commentedComment #13
guilhermevp commentedPatch still works as intended and passes tests, so moving to RTBC
Just adding evidence:
Before
After
Comment #14
larowlanI'm not sure this is the right fix.
If you look at #2358529: Right-aligned images in CKEditor appear to the right of other fields you can see that the text module defines these templates already, and each already add the clearfix class.
So the question is, why aren't those template suggestions being picked up in olivero.
Can someone please look at that twig debug output in HEAD for that field and ascertain what theme suggestions are being used.
It may be that there's something else going on here, e.g. with theme suggestions in Olivero
Comment #15
larowlanComment #16
Agnesh Tank commentedVerified and tested patch#11(3209903-olivero-text-with-summary-11.patch) on Olivero 9.3.0-dev version with 9.3.x-dev Patch applied successfully and result is Acceptable.
Testing Steps:
1. Home>Administration>Structure>Content types>Article,under layout options check layout builder. (install the module)
2. Go to the article node, click on layout.(enable the layout option)
3. Add block, create a custom block & add content: title, body, and in the body add an image to align it to left and right.
4. Add that block on the article node-> Layout tab
5. Verify the before patch
6. Apply the patch from #11 comment (3209903-olivero-text-with-summary-11.patch)
7. Clear cache and reverify the FE output
Test result:
Patch worked as expected & custom block was properly displayed under the Image block when added on Article Layout
Status: Review & tested by Community
Comment #17
larowlanNo-one answered #15
Removing credit from @Agnesh Tank as there were already screenshots.
Please see how we give credit
Comment #20
indrajithkb commentedHi @larowlan I have checked the text module in 9.3.x
Ans:
Normally theme suggestion templates are only picked up when they are in themes. We explicitly define theme suggestions here so that the text field templates in core/modules/text/templates are picked up.But this fix is not with 9.3.x version
You can see the difference form the text.module file with this patch
Adding twig debug output here
Here am done the MR by checking the bartik theme and text module, Please review the merge request !983
Comment #21
mherchelComment #22
mherchelThis looks great! We need to remove the
.text-formattedCSS class, and then it'll be perfect.Comment #24
gauravvvv commentedMR updated as per #22, Removed .text-formatted CSS class from template.
Comment #25
gauravvvv commentedComment #26
mherchelLooks great. Thank you!
Comment #28
alexpott@lauriii's MR comments need addressing.
Comment #29
lauriiiComment #31
kristen polThanks for the update.
1. Reviewed the code and see it is similar to
starterkit_theme/templates/field/field--text.html.twig.2. Checked and the patch applies cleanly to Drupal 9.3, 9.4, and 10. Needs testing for all of these so tagging.
3. Removing
Needs migrationsince I don't think it's relevant.4. Updated issue summary wording, formatting, and steps to reproduce, and embedded screenshots.
Comment #32
kristen polOne more tweak to steps to reproduce.
Comment #33
Satyajit1990 commentedHi @kristen,
Verified the issue with the patch : https://git.drupalcode.org/project/drupal/-/merge_requests/983.diff
Version : 9.4 & 9.3
Testing result : After adding single image either left / right, Images are appearing inside the border but It will more precious if the images will be displayed just above the Add block level.
And when adding 2 block with images left and right , the 1st block images displayed as broken.
Overall result is Fail from my point of view
Screenshot fo reference :


Comment #34
Satyajit1990 commentedComment #35
kristen polThanks for testing @Satyajit1990 but I think the tool failed for you again... sigh. I assume you tried simplytest.me for that one.
I just tried testing with DrupalPod on Drupal 9.4 and it didn't apply the MR/patch automatically (even though I chose the branch) so I manually applied it from within DrupalPod. Then I tested by first trying Seven with the images and then switched to Olivero and tested again. They appeared to work the same.
Removing the testing tag as I just found out from @catch that when the patch applies to more than one version, we can just test on 9.4 or 10, i.e. we don't have to test on all versions... just ones with different MRs/patches.
This needs an issue summary update and then it should be good for RTBC.
Comment #36
kristen polForgot to attach my results:
Comment #37
kristen polUpdated issue summary to use the template. Marking RTBC based on the above.
Comment #40
lauriii#14: those templates were moved to Classy in #2422679: copy text template to classy.
Committed 48c0591 and pushed to 10.0.x. Also cherry-picked to 9.4.x. Thanks!