Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna created an issue. See original summary.

DamienMcKenna’s picture

mr.baileys’s picture

larowlan’s picture

DamienMcKenna’s picture

@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.

DamienMcKenna’s picture

Issue tags: +Needs tests

Some support already exists, need to add tests to cover all meta tags that support multiple values.

nikunjkotecha’s picture

I'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?

nikunjkotecha’s picture

FileSize
2.17 KB

I checked dev version and don't see any code for the support, adding patch to allow support for property based meta tags.

nikunjkotecha’s picture

Corrected output.

nikunjkotecha’s picture

DamienMcKenna’s picture

Status: Active » Needs review

@nikunjkotecha: Thanks for putting that together! Lets see what the testbot says.

Status: Needs review » Needs work

The last submitted patch, 9: 2628934-9.patch, failed testing.

nikunjkotecha’s picture

Hi 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.

nikunjkotecha’s picture

Status: Needs work » Needs review
FileSize
2.33 KB

Refactoring to get it passing in tests.

Status: Needs review » Needs work

The last submitted patch, 14: 2628934-14.patch, failed testing.

flyke’s picture

This patch cannot be applied against the latest dev version (8.x-1.x-dev)

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
2.18 KB

An attempted reroll.

Status: Needs review » Needs work

The last submitted patch, 17: metatag-n2628934-17.patch, failed testing. View results

smaz’s picture

I'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.

smaz’s picture

I 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.

smaz’s picture

Status: Needs work » Needs review

Updating status.

Status: Needs review » Needs work

The last submitted patch, 20: metatag-n2628934-20.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

smaz’s picture

The 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?

Status: Needs review » Needs work

The last submitted patch, 23: metatag-n2628934-23.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

e.escribano’s picture

I think if the changes are applied to the class MetaNameBase directly, any of the extended classes will handle multiple values.

DamienMcKenna’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 25: metatag-n2628934.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

e.escribano’s picture

DamienMcKenna’s picture

Status: Needs work » Needs review

Thanks.

BTW please try to remember to change the status to "needs review" after you upload a patch.

That last patch fails again.

DamienMcKenna’s picture

Status: Needs review » Needs work
ZapevalovAnton’s picture

Patch #25 not work for me. Metatag 8.x-1.x-dev

idebr’s picture

#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

caspervoogt’s picture

the patch from #32 works well for me

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.