Home > Enterprise >  Wordpress 404 error when using $_GET parameters
Wordpress 404 error when using $_GET parameters

Time:08-27

Have a program written, working well, using $_GET parameters, submitted from a form, to load a query a file in SQL, displaying the results.

Currently migrating the program into the Wordpress framework and am running into some strange behaviour.

Although the page loads well with no parameters, attempting to invoke the php parameters in the standard way, the page has no idea what is going on, and returns a 404 error.

URL's sent to broswer look like

"home/program/?parameter1=1 & paraemeter2 =2...etc for up to 28 parameters"

-> 404 error.

Strangely, the browser can be made to at least recognize the page by adding a '$' before parameter1; however, parameter1 no longer behaves properly.

"home/program/?$parameter1=1 & paraemeter2 =2...etc"

-> parameters after the first work as expected

What could explain Wordpress's reluctance to interpret the code in the standard way? What effect is the "$" having?

CodePudding user response:

The first parameter name was "artist", but this apparently caused some conflict with some already-used or reserved word somewhere in the vastness of wordpress and associated theme.

changing every instance of "artist" with "producer" (in the code, and all the database tables and stored procedures) cleared up the problem :).

One semi-comprehensible error message could have avoided a lot of angst.

Thanks for the consideration

  • Related