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

Prevent the use of '/actions' as a URI segment as it is reserved by the system #4154

Closed
brady-lapine opened this issue Apr 17, 2019 · 5 comments · Fixed by #4750

Comments

@brady-lapine
Copy link

commented Apr 17, 2019

Description

For our Craft site, a section was created named Actions, and the system automatically populated the "Entry URI Format" with actions/{slug} which lead to a great deal of confusion on my end when I tried to view the template I just created and was greeted with a 404 error.

After some research, I think that I have discovered that actions is a reserved URI segment by the system. If this is the case I would think that the system should prevent people from attempting to use it as part of their own URI formats.

Steps to reproduce

  1. Create a site section named "Actions"
  2. Make sure the Entry URI Format is actions/{slug}
  3. Try to access a template at that URI

Additional info

  • Craft version: Craft Pro 3.0.40
  • PHP version: 7.3.1
  • Database driver & version: MySQL 5.7.24
  • Plugins & versions:
@jan-dh

This comment has been minimized.

Copy link

commented Aug 13, 2019

Just ran into this. If it's reserved or you shouldn't be using this, please give a warning of some sort or just prevent me from saving this as a route.

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Just added this for today’s 3.2.10 release!

@jan-dh

This comment has been minimized.

Copy link

commented Aug 13, 2019

Thank you!

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Whoops, just saw @gtettelaar’s PR and realized I forgot to fix this for section URI formats. (I only fixed it for routes defined in Settings → Routes.) Will review his PR now and get that half of the fix in as well.

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Now definitely fixed :)

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