Closed (fixed)
Project:
Metatag
Version:
8.x-1.x-dev
Component:
Other tags
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2015 at 14:40 UTC
Updated:
27 Aug 2018 at 14:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaComment #3
mr.baileysMarked #2664062: 'multiple' option not working correctly, e.g. og:see_also as duplicate.
Comment #4
larowlanI proposed #2589203: Explore moving to one field item per metatag instead of a serailized blob for this, but it was voted down
Comment #5
damienmckenna@larowlan: I was planning to follow D7's lead by just splitting on a comma, which would automatically make it compatible with tokens that return multiple values.
Comment #6
damienmckennaSome support already exists, need to add tests to cover all meta tags that support multiple values.
Comment #7
nikunjkotechaI'm trying to use og_locale_alternative but not able to get it working for multiple values, it simply shows one with all values, any idea if this is fixed already in dev version?
Comment #8
nikunjkotechaI checked dev version and don't see any code for the support, adding patch to allow support for property based meta tags.
Comment #9
nikunjkotechaCorrected output.
Comment #10
nikunjkotechaComment #11
damienmckenna@nikunjkotecha: Thanks for putting that together! Lets see what the testbot says.
Comment #13
nikunjkotechaHi Damien, seems for the change in MetatagManager related in failure; either we update the code to avoid suffixing with index for tags that are not multiple or update test case, I'm not able to confirm if other failures are because of this change, but I'll work on them tonight and keep the post updated. Please update here if you find some useful info.
Comment #14
nikunjkotechaRefactoring to get it passing in tests.
Comment #16
flyke commentedThis patch cannot be applied against the latest dev version (8.x-1.x-dev)
Comment #17
damienmckennaAn attempted reroll.
Comment #19
smazI've tried using the latest patch from #17, but this is just giving me empty tags for everything - just the opening & closing bracket.
I am testing with 8.x-1.2 on Drupal 8.3.5, but I've checked and the only changes between that & dev are modifications to tests - nothing that should affect this.
I'm stepping through things now to see if I can work out the cause.
Comment #20
smazI think there was too much nesting of arrays returned by MetatagManager::generateRawElements().
I've tweaked the patch from #17 slightly to reduce a level of nesting & everything appears to work as it should.
Comment #21
smazUpdating status.
Comment #23
smazThe test failures were because MetaItempropBase needed to handle multiple values too. Patch fixes that.
I also noticed that MetaItempropBase didn't check for replacing secure URLs, so I've added that in too (though maybe that should be a different patch?).
I'm not sure if this is enough though - do all of the base classes need this? And then potentially all of the classes that extend & overwrite this?
Comment #25
eescribanoc commentedI think if the changes are applied to the class MetaNameBase directly, any of the extended classes will handle multiple values.
Comment #26
damienmckennaComment #28
eescribanoc commentedNew patch
Comment #29
damienmckennaThanks.
BTW please try to remember to change the status to "needs review" after you upload a patch.
That last patch fails again.
Comment #30
damienmckennaComment #31
ZapevalovAnton commentedPatch #25 not work for me. Metatag 8.x-1.x-dev
Comment #32
idebr commented#28 introduced some code duplication over different base classes. Not sure why this was necessary. The 7.x Metatag makes no such distinction, so I moved this code back to MetaNameBase.
Attached patch introduces the following changes:
- Moved support for multiple values back to MetaNameBase
- Added test coverage for an og:image:url metatag with multiple values
- Rerolled against 8.x-1.x
Comment #33
caspervoogt commentedthe patch from #32 works well for me
Comment #34
damienmckennaComment #36
damienmckennaCommitted. Thanks everyone!