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

Comments

Projects
None yet
3 participants
@XhmikosR
Copy link
Contributor

commented Jul 20, 2018

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

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

@XhmikosR

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2018

Awesome, thanks!

@XhmikosR

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2018

@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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2018

@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

This comment has been minimized.

Copy link
Member

commented Jul 24, 2018

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

@XhmikosR

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2018

Thanks, guys, all good now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.