You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116946 Double slashes in intro image

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by ugd on Wednesday, 13 November 2024 10:55 GMT

ugd

Hello JCE Support,
I have an issue in Joomla where the URL for the intro image in articles adds an extra local URL path and double slashes (#joomlaImage://local-images/...), which isn't ideal for SEO and creates duplicate content! Is there a way to configure this in the JCE Media Manager to avoid it, or is this a general Joomla bug?

Best regards Ulric

Ryan

I have an issue in Joomla where the URL for the intro image in articles adds an extra local URL path and double slashes (#joomlaImage://local-images/...)

This extended URL value is not present when the image is rendered in the front-end, it is only used by the Joomla layout to render the image, and for editing the image.

This extended URL is required for the Joomla Media Field, and is also created in this way by the Joomla Media Manager.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

ugd

I use Ahrefs as a tool for optimizing larger sites, and it detects these `#joomlaImage://local-images/` in the frontend code. Ahrefs is definitely not happy about them from an SEO perspective, especially concerning duplicate content issues also. Is this just something we have to live with in Joomla, which is, by the way, the leading CMS for duplicate content? 😉

Regards Ulric

Ryan

Which Joomla version are you using?

Please post a link to an example article on your site.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

ugd

Joomla 4.4.9
Latest JCE PRO editor

Thank you for your response, Ryan.
Here is an example: https://knudsenkilen.dk/en/assignment-types.html – but it’s not consistent, which is very puzzling.

Best,
Ulric

Ryan

Here is an example: https://knudsenkilen.dk/en/assignment-types.html – but it’s not consistent, which is very puzzling.

Should all the images in that display have the extended URL? Do they all have the extended URL when edited?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

ugd

Yes, all intro images selected in the backend for intro image get this extended URL, apparently as part of Joomla 4’s lazy-loading feature. But this shouldn’t appear on the frontend – that’s clearly incorrect!

Ryan

If your template is using a layout override for the image field, then it may not be including the cleanup routine required to remove the extended URL value.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

ugd

Thank you for the hint, Ryan – that certainly sounds correct. Most of the intro images date back to Joomla 3 and earlier versions of Joomla 4, and they don’t have the extended URL. But this issue occurs when creating new articles in Joomla 4.4.9, so it’s apparently something new.

I’m using the standard T4 Framework with the standard T4_bs5_blank template, so this must be where the "cleanup routine" you mentioned isn’t working! Could you specify where exactly this "cleanup routine" takes place? Then I can contact Joomlart T4 framework about it, as it’s clearly quite a significant bug!

With much appreciation,
Ulric

ugd

Sorry Ryan, there is a template override on the "Tags" layout, but not specifically for the image field, it’s more for adding classes for the flex layout. But isn’t the whole point of Joomla to enable template overrides? So isn’t it still an error from T4 that this can’t be done? – T4 or Joomla should include the "cleanup routine" for all template overrides, shouldn’t it?

Best regards Ulric

Ryan

In Joomla 4 and 5, the cleanup is in the layout - https://github.com/joomla/joomla-cms/blob/4.4-dev/layouts/joomla/html/image.php#L23

I’m using the standard T4 Framework with the standard T4_bs5_blank template

I've tested this too, and I'm not getting the issue even when I comment out the cleanup in the Joomla image layout, so I assume T4 must be doing it somewhere. Do you have the latest version of the T4 framework installed?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Ryan

The T4 framework does the clean up in plugins/system/t4/themes/base/html/layouts/joomla/html/image.php on line 21.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

ugd

I usually use the latest versions of everything, including T4.

I commented out my tag override (`default_items.php`) in `templates/T4_bs5_blank/local/html/...` and inserted the original file from T4, just adding "(ulric)" at the beginning of the file to check if it was active, which it was. I then changed the intro image on an article, and the extended URL error appeared in the code again. So, I commented out the entire `com_tags` folder in my local HTML folder – and then the cleanup routine you mentioned worked. I’ll need to reach out to Joomlart to ask about this.

Thanks, Ryan, for helping with troubleshooting on this issue! Huge help, thank you!