You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
The nojs PHP view for tags doesn't use the discussion slugger introduced in #2456
With the default driver selected, this causes the ID to be repeated twice and therefore the wrong canonical URL to be used. With a custom slug driver, URLs would be broken.
Steps to Reproduce
Enable tag extension
Create discussion in tag
View source code of <flarum url>/t/<tag slug>
Observe wrong links being rendered in the <noscript> section
Expected Behavior
The links should be rendered identically to Flarum core's index nojs content.
The excluded links have a URL structure that I don't understand on Google Search Console. What could be the reason for this? Currently discussion id is repeated.
@ayyilmaz yes your issue is very likely coming from this as well.
Google will likely index these incorrect URLs, and then find out that it's a duplicate URL when it later visits the page and sees the meta canonical tag on the page.
This is tangential, but I don't like that we duplicate "discussion list" code between core and tags. Could we use an "included" template for both? IIRC this is possible with blade. We might also want to look into overridability of cores blade templates.
Bug Report
Current Behavior
The nojs PHP view for tags doesn't use the discussion slugger introduced in #2456
With the default driver selected, this causes the ID to be repeated twice and therefore the wrong canonical URL to be used. With a custom slug driver, URLs would be broken.
Steps to Reproduce
<flarum url>/t/<tag slug>
<noscript>
sectionExpected Behavior
The links should be rendered identically to Flarum core's
index
nojs content.Core nojs which has been updated to work with the slugger:
https://github.com/flarum/core/blob/f1ba5e7b7081767a6bfcef4a2736728cf35b9b0e/views/frontend/content/index.blade.php#L9-L13
Tag nojs which hasn't been updated:
https://github.com/flarum/tags/blob/7c9a3ca8d7de5c9d4b6aa7f0275f4b6f2ec20667/views/frontend/content/tag.blade.php#L10-L14
Screenshots
Screenshot of https://discuss.flarum.org/t/extensions source HTML
Environment
Possible Solution
https://github.com/flarum/tags/blob/master/views/frontend/content/tag.blade.php needs to be updated to work like https://github.com/flarum/core/blob/master/views/frontend/content/index.blade.php
Additional Context
Reported here https://discuss.flarum.org/d/28599-tag-pages-seo-issues
The text was updated successfully, but these errors were encountered: