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

Trailing slash in files with addTrailingSlashesToUrls #3123

Closed
XhmikosR opened this issue Jul 20, 2018 · 10 comments
Closed

Trailing slash in files with addTrailingSlashesToUrls #3123

XhmikosR opened this issue Jul 20, 2018 · 10 comments

Comments

@XhmikosR
Copy link
Contributor

Description

I originally reported this on nystudio107/craft-seomatic#173 because that's where I noticed it. But judging from @khalwat's comment there, it seems this is done in core.

Steps to reproduce

  1. Set addTrailingSlashesToUrls to true
  2. Install craft-seomatic plugin
  3. Visit domain.tld/sitemap.xml and see that the internal link to the sub-sitemap includes a trailing slash like: https://foo.bar/sitemaps/1/section/pages/1/sitemap.xml/

Additional info

  • Craft version: 3.0.16.1
  • PHP version: 7.2
  • Database driver & version: N/A
  • Plugins & versions: SEOmatic 3.1.2
@khalwat
Copy link
Contributor

khalwat commented Jul 20, 2018

It's done in core, I'm just not sure if its intended behavior or not.

I’d think it would not add the trailing slash if the URL ends in a file extension?

@brandonkelly
Copy link
Member

I’d think it would not add the trailing slash if the URL ends in a file extension?

I suppose we could make that happen.

@khalwat
Copy link
Contributor

khalwat commented Jul 20, 2018

@brandonkelly I can just trim it myself too; I guess I'm just confused about what the expected behavior would be here?

@brandonkelly
Copy link
Member

As of the next release the expected behavior is to not add a slash for sitemap.xml URLs :)

@XhmikosR
Copy link
Contributor Author

Awesome, thanks!

@XhmikosR
Copy link
Contributor Author

@brandonkelly: no pressure, just wondering if there's an ETA for this? It's hurting SEO because the image URLs also have the trailing slash resulting in a 404.

@khalwat
Copy link
Contributor

khalwat commented Jul 24, 2018

@XhmikosR I can make a fix for you that will take care of this in the interim if needs be.

@XhmikosR
Copy link
Contributor Author

@khalwat: if it's going to take a long time, we could use a workaround for sure. If it's going to take like a couple of days, not worth going through the trouble of releasing a new version and stuff :)

Thanks!

@brandonkelly
Copy link
Member

We usually cut releases on Tuesdays, and today is Tuesday.

@XhmikosR
Copy link
Contributor Author

Thanks, guys, all good now!

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

No branches or pull requests

3 participants