• Resolved Raz

    (@razique)


    Hey Chouby,
    using the latest version of your plugin.

    I have a password-protected page. When the page is published under the main language (french); I’m prompted for the password and it works.

    If I change the language (english) of this page and update it; the submit form still uses the main domains’ URI for the password submission….which gives me a 404 (I get redirected to the homepage but it’s because I redirect all 404 to the main page).

    Now, if I edit the web page with chrome tools and replace the URI from the main domain to the second domain (the one I use for the english version of the website) and submit the password; it works and I can read the password-protected page.

    Here is a screenshot of Firefox, see the “action” field; I manually updated it to submit to the english domain.
    https://www.dropbox.com/s/2f66c8gqukgxkgg/Screen%20Shot%202014-05-13%20at%2012.12.06.JPG
    Thanks!

    https://www.ads-software.com/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    I will have to find a better fix for the future, but waiting for this, could you try to put this code snippet either in your functions.php or in a custom plugin:

    add_filter('the_password_form', 'pll_the_password_form');
    function pll_the_password_form($output) {
    	if ('en' == pll_current_language())
    		$output = str_replace('https://www.fitforlife.fr', 'https://www.gainsandguns.com', $output);
    	return $output;
    }
    Thread Starter Raz

    (@razique)

    I confirm this hook works.
    thank you! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Password protected pages’ is closed to new replies.