#2222711: meta tags not working with taxonomy terms (Views page) added metatags handling for /taxonomy/term/% when implemented as a views page instead of a core menu callback, however, the default view provided by the views module actually accepts an optional second argument making the menu callback /taxonomy/term/%/%. A URL like /taxonomy/term/123 should and does have metatags but the equivalent URL /taxonomy/term/123/all currently does not. I believe it's also reasonable to consider /taxonomy/term/123/1 or other depth modifiers for tid 123 as the entity's page and thus insert metatags there.

This can be handled with an additional special case in _metatag_entity_is_page() which checks for a second URL parameter for this specific view. We can't check that the parameter is either an integer or the string "all" since that default can be overridden (eg. on non-English sites), so we just accept any value. If there are more parameters in the URL we assume the user has some special view or other page set up and do nothing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mvc created an issue. See original summary.

mvc’s picture

DamienMcKenna’s picture

Status: Needs review » Needs work

That patch file contains the HTML for a login page, not a git diff.

mvc’s picture

Status: Needs work » Needs review
FileSize
542 bytes

D'oh! Let's try that again.

  • DamienMcKenna committed 9f9ff3a on 7.x-1.x authored by mvc
    Issue #3108311 by mvc, DamienMcKenna: Meta tags not working with...
DamienMcKenna’s picture

Status: Needs review » Fixed
Parent issue: » #3102474: Plan for Metatag 7.x-1.27

This is a good improvement, thank you.

I modified the comment slightly to make it clear what types of paths were affected.

Status: Fixed » Closed (fixed)

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