Skip to content
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

REFACTOR canonical creation to utilize MetaComponents method #59

Open
muskie9 opened this issue Apr 6, 2021 · 0 comments · May be fixed by #64
Open

REFACTOR canonical creation to utilize MetaComponents method #59

muskie9 opened this issue Apr 6, 2021 · 0 comments · May be fixed by #64

Comments

@muskie9
Copy link

muskie9 commented Apr 6, 2021

Current implementation uses the MetaTags() extension method to alter the meta string. Alternatively, it's more reliable to use the MetaComponents() extension method as the meta tags are in an array, allowing for more consistent structure and easier, more reliable alterations to the metadata.

Similar update made in silverstripe/silverstripe-cms#2637

The underlying issue with the current implementation lies in VirtualPage which currently applies a canonical url to the CopyContentFrom page. The pull request noted above moves the canonical creation into MetaComponents() which should allow for a simple detection of an array key vs a regular expression of some type to prevent duplicate canonical tag generation in the case of VirtualPage (or any other custom page types that apply a canonical tag).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant