getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.51k stars 1.41k forks source link

Admin errors when changing param_sep to custom value #1039

Closed JeffStarr closed 8 years ago

JeffStarr commented 8 years ago

The default value ( : ) of param_sep is a reserved character according to RFC spec (more info). Fortunately Grav provides a way to change the default value via user/config/system.yaml.

Unfortunately, doing so results in a 404 for the admin area (if using a custom admin location via the admin plugin settings: "Administrator path"). Or, if not using a custom admin location, changing the value of param_sep results in the following errors:

Possibly other errors, etc.

rhukster commented 8 years ago

Would you mind opening this issue here: https://github.com/getgrav/grav-plugin-admin/issues

Thanks! (btw i confirmed, but want to address this in the correct repo).

flaviocopes commented 8 years ago

This is a non-issue.

From the doc you linked:

The characters “;”, “/”, “?”, “:”, “@”, “=” and “&” are the characters which may be reserved for special meaning within a scheme. No other characters may be reserved within a scheme.

:, along with ? and & and the others, is reserved for this exact purpose we're using it for.

flaviocopes commented 8 years ago

BTW, Admin should work when changing it, so worth opening the isssue

JeffStarr commented 8 years ago

Changing it to a hyphen breaks a lot of stuffs in the admin, as confirmed by rhukster.

flaviocopes commented 8 years ago

I don't think using hyphens is ever going to work, or any other char that is not encoded when used as parameter.

JeffStarr commented 8 years ago

So only : or ; for param_sep, correct?

flaviocopes commented 8 years ago

Correct

JeffStarr commented 8 years ago

Thanks, but according to other people on your team, users are allowed to use any character, even multiple characters and emojis.

But honestly it doesn't matter because I've decided to not invest any serious time into Grav. Your other team member's contemptuous, arrogant, unhelpful attitude changed my mind. Definitely not something I want to support with my efforts.

I do, however, appreciate your response on the matter, even if it still conflicts with what other Grav devs are saying.

rhukster commented 8 years ago

If you don't want to use Grav then fine, but I do want to clear up a couple of things that have come about from this discussion:

  1. This is an open source project developed by a small team of people working in different countries in different timezones. We don't all sit in a room together, we communicate via GitHub, Gitter, Slack, etc. So sometimes we don't speak with the exact same voice.
  2. We are not all english speakers! This is not an excuse but on the internet you have to understand that the subtlety of sarcasm and nuance in the written word is not always fully appreciated. For example, you initially made some pretty snarky and sarcastic comments, that Djamil (being Italian) might not of fully understood. You thought his reply was being sarcastic back, but frankly he was stating some facts as he understood them.
  3. The fundamentals of this issue are unchanged. We tested : and ; because : is the default and ; is a workaround for a bug in Apache on Windows. The admin ONLY provides those two options, which why Flavio is saying use those. However, I was saying that it's not actually limited to this in the core, and Djamil confirmed by testing various other wild scenarios include emoji's and multiple-characters.
  4. Djamil elaborated on our recommendations of : and ; and further explained that while no character was explicitly denied it was upon the user to understand the ramifications of changing this. Using a hyphen - as you suggested is not a great choice because you could easily pass a slug for a param (e.g. my-page-name), so Grav wouldn't know if your hyphen was the seperator or part of the value. Hence the explanation the gave here: https://github.com/getgrav/grav-plugin-admin/issues/774#issuecomment-247146394. Everything was pretty civil up to this point, but your reply: https://github.com/getgrav/grav-plugin-admin/issues/774#issuecomment-247179666 is where you start getting snarky and rude calling his reply "nonsense" and Grav is not "well documented" and doesn't "work properly". Your entire reply seems to purely be antagonistic in nature, and you seem to be looking to argue every thing from this point on.
  5. I did confirm the Admin plugin was broken when I tried =. It was not "a lot of stuff" as you stated, but was due to one minor bug (that was mine alone) when I recently added the newsfeed functionality. Djamil fixed this with: https://github.com/getgrav/grav-plugin-admin/commit/8e483f101bddbdbe291cadcf23700cac4d650a99. This simple fix addressed the only issue I saw and it worked fine again after the fix.
  6. We believe your fundamental assumptions about not using : are invalid. We read it as the reserved characters are intended to be used for the exact things we use them for, i.e. differentiating name/values in this case (just like = does in request params). I didn't want to get into it initially as frankly it's your choice, and if you don't want to use : we're not stopping you, and I don't really have the time to get into a debate about it the intricacies of RFC specifications.

Anyway, clearly this is a non issue at this point. You are the only one that has ever brought up this particular issue and as you have stated, you are going to use WordPress. There was a minor bug (as we don't test it often), it's been fixed, it's no longer an issue. Thanks for bringing that to our attention at least. Other than that, I think we can mark this issue closed (again).

I'm sure you'll want the last word, so go ahead, but there's no point us wasting more time on this non-issue.

JeffStarr commented 8 years ago

Actually, it was an issue to me, which is why I bothered to report it in the first place. Never thought I would be treated with such contempt for trying to help. I sincerely wanted to learn more and get involved. It's too bad that you guys have managed to turn such a simple bug report into a full-blown defensive action, complete with 10-paragraph retorts and the whole nine yards.

But yeah, like you said, I'm moving on to better platforms, WordPress and otherwise. There are so many great content management systems to choose from, I would highly encourage anyone reading this thread to check out the alternatives like Pico, Monstra, Bolt, Kirby, Statamic, any others (there are so many great choices, don't feel stuck with one or the other).

Anyways, likewise and back atcha -- feel free to reply, I've always got more to say :)