- Issue created by @ishore
- Assigned to flashwebcenter
- πΊπΈUnited States flashwebcenter Austin TX
Hello,
On the demo site I followed the steps. I logged in as an editor and created a new 3D carousel, but I was able to see the carousel.
What you have, it could be permissions issue or some conflict with Javascript. I would recommend debug the site, check permissions, create 3D carousel with simple text.Best wishes,
Alaa - πΈπ¦Saudi Arabia ishore
I can re-create the same problem on two different environments - one running Drupal 9 and one running Drupal 10. I will investigate further.
- πΈπ¦Saudi Arabia ishore
Did a diff of the Source of the unauthenticated (visible) and the authenticated (not visible), and there was some differences in the HTML that deals with the image display:
Unauthenticated (Visible):
ImageAuthenticated (Not Visible):
div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item">
ImageI changed the names of the image file names in the HTML output here, but other than that, this is the actual HTML. I see the same differences for each image in the Carousel. Might this explain why there is a difference in the two displays?
- πΊπΈUnited States flashwebcenter Austin TX
Hello,
I don't see in the bod-snippet.txt "w3-img-wrapper". Not sure if the custom template is uploaded. You will need to enable twig debug and check the which template is used.Best wishes,
Alaa - πΈπ¦Saudi Arabia ishore
Hi Alaa
Please ignore the previous data provided. I've been able to spend more time looking at the differences between the "good" (displays image and image title in Carousel) and "bad" (display only image title in Carousel"), and, for the carousel section of the page HTML, I performed a diff and find only a small difference in the div lines.
For the purposes of diplaying the HTML correctly here, I will replace < and > with { and }:
Good:
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"{{div}
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div}
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div}
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div}Bad:
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div class="contextual-region"}
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div class="contextual-region"}
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div class="contextual-region"}
{div class="w3-row field field--name-w3css-content-image field--type-entity-reference field--label-hidden w3-bar-item field__item"}{div class="contextual-region"}Would you still recommend checking the twig template?
- πΈπ¦Saudi Arabia ishore
After enabling Twig debug, I see the following in the "bad" display:
{!-- BEGIN OUTPUT from 'core/modules/media/templates/media.html.twig' --}
{div class="contextual-region"}
{div data-contextual-id="media:media=7:changed=1657692050&ds_bundle=w3css_media_image&ds_view_mode=w3css_media_view_image&langcode=en" data-contextual-token="sVhirvZqyDeR27EfgUAHwsh3TGrKiRYJwyDIp4K3JBY"}{/div}{!-- THEME DEBUG --}
and this in the "good":
{!-- BEGIN OUTPUT from 'core/modules/media/templates/media.html.twig' --}
{div}{!-- THEME DEBUG --}
- πΈπ¦Saudi Arabia ishore
After further investigation, it seems that the images are not visible only to users with the role "Content Editor". I can remove the role from the user, refresh the page, and the images in the Carousel become visible.
- πΊπΈUnited States flashwebcenter Austin TX
Hello,
You can try different methods for debugging like:- Login as a content editor and create a carousel.
- Create a new role in the system and use it to create a new carousel.
- Create a new paragraph bundle with image and use it when you logged in as a content editor.
- Login as a content editor and an admin in two browsers and start to disable modules one by one. You cans start with the 3D carousel.
If the output for for the field does not have any html, mostly it is permissions.
Best wishes,
Alaa - πΈπ¦Saudi Arabia ishore
Firstly, my testing has so far only found an issue with the 3D Carousel. W3CSS Cards and Images don't exhibit the same issue.
The problem does seem to be related to the combination of W3CSS 3D Carousel in combination with the Media Directories module. When I try to add a W3CSS image to the carousel from a Media Directories sub-directory, the image doesn't display. But when I add the same image but from the root directory, it displays correctly.
Anyway, at least I now have a fix, even if the cause of the problem is not clear.
- πΊπΈUnited States flashwebcenter Austin TX
Hello,
I am closing since you have a fix.
Best wishes,
Alaa - Status changed to Fixed
over 1 year ago 4:03pm 18 June 2023