• Resolved jeffbbz

    (@jeffbbz)


    Hi, I’m sorry if something easy and basic is happening, I’m a super beginner. I recently made a petition with speakup for my website. Everything was working fine and then the next day, I installed the Polylang plugin to start making my site multilingual. However, after installing Polylang, people were no longer able to sign the petition and got this error message:

    Fatal error: Call to a member function switch_lang() on a non-object in /home/imocha1/savejejuisland.org/wp-content/plugins/speakup-email-petitions/includes/ajax.php on line 14

    Although I suspected a conflict with Polylang was a problem, I de-activated it and re-activated it several times to check. When it was inactive everything was fine and when it was active i got the above error.

    Can you please help me understand the problem and what I can do it fix it? I really need to use both plugins.

    Thanks.

    http://wordpress.org/extend/plugins/speakup-email-petitions/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kreg Wallace

    (@kreg)

    I released version 2.3.2 of SpeakUp! Email Petitions, which should fix this problem.

    Thread Starter jeffbbz

    (@jeffbbz)

    It works great now! Thanks and thanks for the quick response!

    Hi Kreg,

    I saw from the development log what modification you made to avoid the conflict with Polylang. Maybe we can go even further and obtain the same result with Polylang as you obtain with WPML.

    If I well understand (although I don’t know what is the second parameter ‘true’) the switch_lang function should allow to set the language in your ajax response.

    So maybe I am wrong, but maybe that simply setting the parameter pll_load_front : 1,
    at line 52 of public.js should do the job.
    The correct language will be set as Polylang will read you $_POST['lang'] variable.

    Maybe jeffbbz can make a test…

    Plugin Author Kreg Wallace

    (@kreg)

    @chouby,

    Seems like it’s worth a shot. Would be nice to have more complete compatibility with Polylang.

    I think the second parameter in switch_lang() when set to true will change the language code that WPML stores in a cookie (like ‘en’). Using false might work just as well in this case.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conflict with Polylang’ is closed to new replies.