Support » Requests and Feedback » conflict with permalinks and POST variables

  • I’ve written a plugin that is a part of a registration system for a hobby group. I use a series of html forms so that a registered WP user can register for a specific event. A user can fill in a variety of details about themselves and their equipment, including the year of manufacture.

    I ran into something I didn’t anticipate. The form wouldn’t work properly with a permalinks on. I would get a 404 back. After a couple of hours, I eventually determined that it was due to a field named ‘year’. I didn’t initially catch this, because I was being lazy with dummy values, only hitting a single letter (not number) while I was writing and testing the form. I eventually figured out that I received a 404 only if the year field had a number entered.

    You really don’t want to know what I went through before I figured out the problem was with the html form, and the use of a input field with a name of ‘year’. Anyway, I lived. 🙂 In my case, I’ve changed the name of the input field to theyear, and it now works fine with permalinks.

    I guess I’m to conclude that as it stands, if you use permalinks, you’ll have to carefully watch the field names you use with your own forms. These forms all use POST methods, and I did not expect a conflict here.

    If possible, I would like to suggest that the permalinks code be rewritten to avoid such a conflict, perhaps by using more branded variable names. Well, you guys are the experts. I just wanted to call your attention to this. I wouldn’t call this a bug myself, but it is a quirk, and an inconvenience. Well, I consider it something to squash even if it’s not a bug!

    Let me know if you want a proof of concept example.

  • The topic ‘conflict with permalinks and POST variables’ is closed to new replies.