I’m using a plugin, called “Hype”, which gathers emails. The shortcode adds a simple email field and then displays a signup confirmation message.

If I use it with Landing Pages plugin though, it doesn’t work. It does create the user (I found it in the database) but does not display the confirmation signup message (which it normally does, on the same URL), instead it just reloads the page the same way it was before, removing the email signup field.
Now it should remove the email signup field but it should also add a signup confirmation text. Which means, if I am right, that it does remove what needs to be removed but fails to add what needs to be added ^^
I deactivated all other plugins and tried with twenty seventeen only but same issue.

If it doesn’t fix the confirmation, you could always send the submitter to a thank you page outside of the landing page. Also disabling split testing features from the settings area for landing pages might fix it as well.

It fixed the database error but the PHP error is still there :
[14-Aug-2017 19:11:01 UTC] PHP Warning: Invalid argument supplied for foreach() in /srv/data/web/vhosts/truc.domaine.com/htdocs/wp-content/plugins/landing-pages/shared/classes/class.ajax.php on line 79

And this error is still present even without the hype shortcode, on the demo template provided by your plugin.

it will work. Otherwise I recommend deactivating WP Rocket and resaving your permalinks to see if the regenerated htaccess looks like the one provided in the example above. At least then we can prove the conflict if it works after that.

The htaccess files should be generated automatically when your sub-sites permalinks are saved, so we are having to try manually for your case. Have you tried manually modifying the subsite’s htaccess file? I believe each sub-site has it’s own.

Also, did you check for the WP Rocket conflict? It would be helpful to us to know why the htaccess rules are not getting generated properly. And if removing the plugin that is also, (heavily I might add), modifying the htaccess file solves our trouble.

You could also try moving the WordPress block of your htaccess file, the block enclosed by # BEGIN WordPress, # END WordPress, to the top of your htaccess file. Sometimes that fixes htaccess problems.

Well no, there is only one htaccess for every subsite. It is a multi install which uses subfolders (and not subdirectories) but I assume this is the same thing for multi-installs with subdirectories.

So I tried removing (not only deactivating) wp-rocket this time, and I also started with a “virgen htaccess” (which is the one provided with multi-installs by wordpress if I remember well). I also deleted Landing Pages plugin and reinstalled it again, and resaved permalinks (by the way, it didn’t ask for a database upgrade this time ??? And neither did it add anything to my htaccess file so I add to manually add your htaccess code myself).
But the bug is still there…

To try to debug I commented out some of the lines (as you can see in the code below), but bug is still there. So I assume this is not WP-rocket based but multi-install based right ?

Also in the code you provided above there was a typo “langing-page” instead of “landing-page” but even with that typo it was working properly, weird 😛
Would you kindly check that there is no other typo ?
Thank you 😉

PS : I See two possibilities :
1) it is a bug related to the fact that there is a /fr added for every page of the 2nd subsite, so maybe something to do with url rewrites
2) it is a deeper bug related to the fact that Landing Pages only sees the main site of the multi-install and not the others