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.

#115021 pdf icon searching from wrong address

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 Ryan on Wednesday, 25 October 2023 17:06 BST

FEAGRI
An article in joomla with pdf icon
https://www.feagri.unicamp.br/portal/a-feagri/destaques-feagri/premio-egresso-destaque-unicamp-2023
The icon address:
https://www.feagri.unicamp.br/portal/a-feagri/destaques-feagri/media/jce/icons/pdf.png
Should be:
https://www.feagri.unicamp.br/portal/media/jce/icons/pdf.png

How can I solve this?

I used the CSS solution below, but it will duplicate all the others that already existed

a[href$=".pdf"]::before {
content: "";
display: inline-block;
background: url('/portal/media/jce/icons/pdf.png') no-repeat center;
padding: 8px 12px 8px;
vertical-align: middle;
}

Attachments

Ryan
When I copy the url from the stylesheet using the browser console, it resolves to https://www.feagri.unicamp.br/portal/media/jce/icons/pdf.png

Ryan Demmer

Lead Developer / CEO / CTO

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

FEAGRI
Ryan,
The url of the icon image has the root address /media/jce/icons/pdf.png, but it must use the root of the site, which is /portal/media/jce/icons/pdf.png
The image is still wrong
https://www.feagri.unicamp.br/portal/a-feagri/destaques-feagri/premio-egresso-destaque-unicamp-2023

Attachments

Ryan
I think this has something to do with the lazy loading script you are running on your site. The url values for the icon are initially correct, and should be resolved correctly by the Joomla SEF Plugin. You could hide the img icon using css, eg:

a[href$=".pdf"] img {
    display: none;
}

Ryan Demmer

Lead Developer / CEO / CTO

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