- Posts: 22
COMMUNITY FORUM
Missing "/" in image extra field path
- Carlos
-
Topic Author
- Offline
- Junior Member
We noticed that after updating to 2.8, the initial "/" in the path of the image extra field is not added automatically anymore after selecting an image file in the file manager popup as in previous versions.
Is this a bug? Any way to fix?
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
I am using J 3.7.5 and K2 2.8 with php7
When i add a picture to and extra fields with type of image and save it
images/jones.jpg
is what is saved using the select image link and it is stored in the table as
{"id":"18","value":"images\/jones.jpg"},
It displays correctly in the front end.
When i add a /
/images/jones.jpg
into the extra field manually and save it, the beginning / is saved and the front end continues to display correctly after refresh and it is stored in the table as
{"id":"18","value":"\/images\/jones.jpg"}
In other words my test seems to work both ways without error and there must be code either adding or stripping a / because if i manually put // at the beginning the image does not diaplay and the name or alias is displayed where the picture was.
IS your site working or are you getting an error.
Please Log in or Create an account to join the conversation.
- Carlos
-
Topic Author
- Offline
- Junior Member
- Posts: 22
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Is there a link to your site available?
Please Log in or Create an account to join the conversation.
- Carlos
-
Topic Author
- Offline
- Junior Member
- Posts: 22
It's a development site, it's offline.
Path in the Image extra field box looks like this: images/gmap1.png
Output is like this:
<img src="/~clwimages/gmap1.png" alt="My image">
Correct output should be:
<img src="/~clw/images/gmap1.png" alt="My image">
We've tested on another development site with the same result, but I just checked on a site with a real domain and eventhough the k2 extra field doesn't add the "/" the image path is fine and the image gets displayed.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Once you move into production you won't have an issue.
Please Log in or Create an account to join the conversation.
- akhtar ali
-
- Offline
- New Member
- Posts: 6
Akhtar
Please Log in or Create an account to join the conversation.
- Carlos
-
Topic Author
- Offline
- Junior Member
- Posts: 22
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- Fábio Jordan
-
- Offline
- Senior Member
- Posts: 59
Live website, some places dont display the image extrafield properly.
The error appeared after the update to Joomla 3.8.1 and K2 2.8.
Example here: www.cafecomfilme.com.br/filmes/duro-de-matar
Before, K2 extrafield image inserted the slash automatically in front of the path, right now it doesnt.
I dont know what has changed, but some areas are getting the wrong URL like:
www.cafecomfilme.com.brimages/capa/1017/streetfighteraultimabatalha600.jpg
Instead of:
www.cafecomfilme.com.br/images/capa/1017/streetfighteraultimabatalha600.jpg
Any hint to solve that?
Thanks in advance!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Is this a new item (inserted after the upgrade)?
Please Log in or Create an account to join the conversation.
- Fábio Jordan
-
- Offline
- Senior Member
- Posts: 59
All the new items dont get the first slash in the images extra field.
So, it get broken images. Right now, i'm fixing it by adding the slash manually, but we have a bunch of people in our team, and sometimes they forget to add the slash, so it would be good to fix that.
Any hint?
Thanks!
Please Log in or Create an account to join the conversation.
- Fábio Jordan
-
- Offline
- Senior Member
- Posts: 59
Krikor wrote: Did this happened our of the blue?
Is this a new item (inserted after the upgrade)?
Any progress on that matter @Krikor?
Thanks in advance.
Please Log in or Create an account to join the conversation.
- Fábio Jordan
-
- Offline
- Senior Member
- Posts: 59
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.