-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not make TL_HEAD tags unique #1214
Comments
Imho you should add all 3 tags for one Image into one TL_HEAD entry |
Allthough I agree with @backbone87 's comment, why do we use Regarding og/social images, it would be nice to have some abstraction for that. Contao modules itself add og tags in some places (e.g. image and description on a newsreader detail site) but the core does not support it by default in the BE (and that might be a good decisison). This is leaving opengraph extensions with the need to regex/tokenize the existing entries to eventually alter/overwrite them. |
The array_unique is there because of modules and content elements adding tags multiple times. Imagine 5 elements on the same page, each adding a certain head tag. |
There are some plans: contao/core#8787 (comment) |
@backbone87 that's a good idea, I will use it! @discordier at some point that is true but if you have N elements on the same page, it's likely that each of the scripts should check and overwrite a certain head tag. That's not the case here because for the |
I don't think we can do much about it; this is how |
The
TL_HEAD
tags that are being added to the page are first filtered out of duplicates. This is could be a problem for OpenGraph tags where you can define the arrays – http://ogp.me/#array.https://github.com/contao/core-bundle/blob/master/src/Resources/contao/library/Contao/Controller.php#L898
So if you would have two images and if their dimensions would be the same the output code should look like this:
But because the
array_unique
is called, some of the image size tags would be stripped:Contao 3 is affected as well. Also see codefog/contao-social_images#19
The text was updated successfully, but these errors were encountered: