Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor Eran Miller

    (@eranmiller)

    Are you using the latest version 0.9.8.6 – earlier versions of the plugin did not handle apostrophes and quotes correctly, the latest version does (or at least it should). If you are using the latest version, please be specific as to which field(s) are not properly escaping the apostrophe.

    Thanks
    Eran

    Thread Starter hurraken

    (@hurraken)

    Thank you for your quick response Eran.

    I’m using the version 0.9.8.6.

    All the fields seem not to escape the apostrophe.

    Best regards

    Thread Starter hurraken

    (@hurraken)

    EDIT : my WP is in French : may it be the cause of this problem ?

    Plugin Contributor Eran Miller

    (@eranmiller)

    It shouldn’t be…but I will look into this.

    Thanks,
    Eran

    Plugin Contributor Eran Miller

    (@eranmiller)

    I just tested this combination in my local version of the plugin and I see no backslashes. I can create and update events with Editer l’évènement in the text and I have no problems.

    What is your url?

    Eran

    Thread Starter hurraken

    (@hurraken)

    I’ve just send an email to you via your website.

    Regards.

    Plugin Contributor Eran Miller

    (@eranmiller)

    I was only able to replicate your problem by activating magic quotes gpc on my local server. Therefore, I believe the problem is that your php server has magic quotes gpc set.

    To stop this from happening, edit your php.ini file (or ask your host to) and disable that setting. Here’s why the developers of PHP say it should no longer be used.

    Eran

    Thread Starter hurraken

    (@hurraken)

    Hi Eran,

    Your diagnostic was the good : it’s a problem of magic quotes.

    Here a fix : paste the following code in functions.php of your theme :

    <?php
    if ( get_magic_quotes_gpc() ) {
        $_POST      = array_map( 'stripslashes_deep', $_POST );
        $_GET       = array_map( 'stripslashes_deep', $_GET );
        $_COOKIE    = array_map( 'stripslashes_deep', $_COOKIE );
        $_REQUEST   = array_map( 'stripslashes_deep', $_REQUEST );
    }
    ?>
    Thread Starter hurraken

    (@hurraken)

    Thank you for your help, i’ve really appreciated !

    Best regards

    Plugin Contributor Eran Miller

    (@eranmiller)

    Glad I could help!
    Thanks for posting your fix.

    It’s important to note that while disabling magic quotes is the only way to avoid the apostrophe problem and a best coding practice, it can adversely affect php code (such as older plugins) that rely on that functionality.

    Eran

    Hi Eran,

    First of all, I LOVE the calendar – it’s beautiful.

    However, I’m having the \\ issue as well. I’m running version 0.9.9.2 and tried adding the code above to functions.php, but the \\ are still there. I also tried editing .htaccess and php.ini to remove magic quotes per your link to php.net, but neither of those edits fixed the issue (though I did check, and the server is running PHP 5.2.14). Any other thoughts?

    Plugin Contributor Eran Miller

    (@eranmiller)

    I’ll look into it, but offhand I don’t have any other suggestions.

    Thanks for your feedback.
    Eran

    While the solution that hurraken posted does indeed work, it creates other issues with urls. If your website is in the format https://www.example.com, then typing example.com will just give you a blank screen. I’m unsure of any other issues it can cause.

    Eran’s suggestion of turning off Magic Quotes is the best solution and it can be as simple as editing the php.ini in your root directory (or the directory the WordPress is installed, depends). If there is no php.ini, then just make one. Add the line:

    magic_quotes_gpc = Off

    And it should work. It depends on your host really. If you have Bluehost, then just place it in your public_html folder, problem solved.

    I’m having a similar issue, but it’s only switching out the apostrophe in the event title (everywhere else seems fine). I tried editing the php.ini file & adding the above php to the functions.php file …so far nothing has worked. Strange things.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Ajax Event Calendar] Ajax Event calendar don't like the apostrophes’ is closed to new replies.