Skip to content
Advertisement

URL parameter is handled incorrectly on multisite

With a form that is displayed via a shortcode, we want to add parameters to the URL and then read it out again in another shortcode. These functionalities are added via a custom plugin.

This works fine on a standard WordPress installation.

However, if we add the plugin to a multisite installation, it does not work. The parameters are added somehow, but an ‘site not found’ error occurs. Feel free to have a look at http://fortbildungen.mgo-fachverlage.de/, our multisite installation.

Here are parts of our code:

Shortcode that sets the parameters

This is the filter in the sidebar

JavaScript

Shortcode that gets the parameters

This is the content of the page

JavaScript

And the class Fbk_WPQuery

JavaScript

Thanks for any help 🙂

Advertisement

Answer

try to change

action="" to

action="http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '".

Worked for me

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement