You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
where $film->image has a UUID value from a filepicker field.
According to the Contao docs I would be able to use the insert tag with a UUID just like I did in the code quoted above:
This tag will be replaced with an image and various image sources depending on your image size preferences and if the size parameter is a valid ID (replace * with the database ID, UUID or a file system path)
This all worked fine until suddenly – after uploading a new image and inserting it in my content element – instead of the new image I see the code for the insert tag in the frontend.
I quickly found the problem: The UUID of the image looked like this:
}�³�ï��æ¯�tÔ5�^¹
The significant character being the }. This causes the insert tag to not work correctly.
I am not sure what to do about it though. I don't know if the insert tag could be modified to take into account these occurences or if it would be possible to change the way the UUID is generated and prevent it from containing these characters. But as the UUID is a binary field I think that would be rather difficult.
The text was updated successfully, but these errors were encountered:
Ah, great! Thanks! I knew about the StringUtil but didn't think to use it in my case because throwing the binary code at the insert tag worked in almost all cases.
Maybe it would be best (if possible) to throw an error message in the insert tag when using a binary value instead of a stringified UUID?
Hey,
I just came across a mean little but when using the insert tag for pictures.
In my template I had a line like this
where
$film->image
has a UUID value from a filepicker field.According to the Contao docs I would be able to use the insert tag with a UUID just like I did in the code quoted above:
This all worked fine until suddenly – after uploading a new image and inserting it in my content element – instead of the new image I see the code for the insert tag in the frontend.
I quickly found the problem: The UUID of the image looked like this:
The significant character being the
}
. This causes the insert tag to not work correctly.I am not sure what to do about it though. I don't know if the insert tag could be modified to take into account these occurences or if it would be possible to change the way the UUID is generated and prevent it from containing these characters. But as the UUID is a binary field I think that would be rather difficult.
The text was updated successfully, but these errors were encountered: