-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Knowledge Base: Reserved Words #236
Comments
I've also seen |
Great job! Does laravel have reserved words? |
I had a relatively cursory search and couldn't find anything beyond PHP's list, and mention of |
We should list the context as well as it's different, for example, if you use |
Nice, a list like this would be helpful! You also should not use |
I looks like the word listings is reserved as well Created a collections called Listings - and hitting '/listings' returns However if I use the word 'Listing' then it will load perfectly fine If someone can also verify it ---- EDIT ----- ---- EDIT #2 ---- Changed the name to something else and we are all good |
apparently you can't use |
When you use {taxonomy} as a parameter in a route, it breaks (404). |
Arthur, if the field is not |
Jason I don’t think I understand your comment in this context, what are you referring to? |
it breaks because of Statamic's route/model binding |
Ah yes. That'd be it. Ignore my other comment. 😄 |
🎉 |
Seems with V3 theres a few more people having issues with accidentally using reserved words - leading to difficult to diagnose issues. I thought it might be good to have a list of reserved words in the docs? Not sure of the best way to structure this - or it might be better integrated as a running list of terms to prevent being validated/used in the admin. Or used as a list to generate more verbose errors in common contexts.
Theres been mention from @robdekort @damcclean @edalzell and @jasonvarga (on chat / forum / issues) that this should be documented somewhere.
Wildly imperfect list (primarily of restricted field names) from the issues I've seen recently:
Haven't had a chance to find the context for some (assume 'as' is a parameter), and many are just tags names
Also:
https://www.php.net/manual/en/reserved.keywords.php
And all tags (I guess)?
https://statamic.dev/tags
Apologies for the lack of a strong format for this, just kept seeing mention that someone should do this. Totally understand it might not be possible due to these restricted words being very context-specific.
The text was updated successfully, but these errors were encountered: