WordPress.org

Ready to get started?Download WordPress

Forums

Ajax Event Calendar
[resolved] Admin Warning on Magic Quotes Even Though Magic Quotes Are Off (12 posts)

  1. WayLay Design
    Member
    Posted 1 year ago #

    I just updated this to the latest version 1.0.4 and got the magic_quotes_gpc active admin notice. I did turn off magic quotes via php.ini file, but can't get this error message to go away in the admin.

    The plugin itself is working fine and I have no problem with the apostrophes, those are working just fine as well. It's just the error message.

    It's a client site so to avoid any confusion on their end, I commented the message out of the plugin itself as a temporary fix, but knowing why this won't go away even when as far as I can tell, magic quotes is turned off would be very helpful.

    If I'm overlooking something please let me know.

    My PHP configuration:
    http://www.essfta.org/phpcheck.php

    The info page from the link above shows:
    magic_quotes_gpc Off Off
    magic_quotes_runtime Off Off
    magic_quotes_sybase Off Off

    Any info appreciated.

    http://wordpress.org/extend/plugins/ajax-event-calendar/

  2. marketrue
    Member
    Posted 1 year ago #

    Same here. Seems to kill the "Screen Options" and "Help" tabs. I turned Magic Quotes off in the PHP5.ini file but the message and dead links remain. On the bright side, the calendar works now! Would like to clear the notification and get Screen Options back though.

  3. livninctry
    Member
    Posted 1 year ago #

    I too am would like a way to make this message go away...

  4. GL8899
    Member
    Posted 1 year ago #

    Me too! My hosting provider turned off magic quotes for me and the stupid warning is still there nagging away at me every time I open the dashboard.

  5. marketrue
    Member
    Posted 1 year ago #

    I tried EVERYTHING! Finally, I begrudgingly added this line:

    define( 'SCRIPT_DEBUG', true );

    to my wp-config file. I will probably gett in trouble for telling you "it's the solution" but it is. If I take it out, it comes back, if I leave it in, gone. I will even go a step further than most and tell you exactly where to put it in the wp-config:

    */
    define('SCRIPT_DEBUG', true);

    /* That's all, stop editing! Happy blogging. */

    Right before the last line (That's all...) exactly like above. Hopefully the bug will be gone in the next version and I can take it out so it does not affect my load times. So far, so good. Good luck!

  6. kirkvan
    Member
    Posted 1 year ago #

    We have magic_quotes_gpc enabled server-wide and have found a workaround to keep this Ajax Event Calendar plugin happy, so would like to run off:

    --------------
    Your server has PHP magic_quotes_gpc set to active. This produces formatting errors in the Ajax Event Calendar plugin.
    Learn how to disable this setting in this forum thread. Ask your host provider for help.
    --------------

    Is the plugin author response to support requests? Seems to me that adding a "Dismiss" button on the alert would be a good way to go.

  7. livninctry
    Member
    Posted 1 year ago #

    @marketrue...

    Tried your fix to no avail... Anyone else have any luck removing this notice?

  8. WayLay Design
    Member
    Posted 1 year ago #

    Well my workaround only comments out the error code so that it doesn't display. It does require editing the plugin, so the changes would be overwritten if there was a plugin update, but hopefully an update would fix this issue anyway.

    If you want to do it, open /wp-content/plugins/ajax-even-calendar/ajax-event-calendar.php

    Look for // get_magic_quotes_gpc issue

    Around line 391 and comment out that entire section to about line 399.

    Hope that helps.

  9. livninctry
    Member
    Posted 1 year ago #

    @waylaydesign
    Just tried your work around and the magic quote is still showing...

    Also it is quite strange I have this plugin running on another website and I have no magic quotes showing. Very odd....

  10. WayLay Design
    Member
    Posted 1 year ago #

    It is odd...it's just a comment so it should definitely work, it's not modifying any code execution or anything. If it helps, here is the full commented section of the code:

    /* Hide Error Message
    	// get_magic_quotes_gpc issue
    			if (get_magic_quotes_gpc()) {
    				$this->set_admin_alert(sprintf('<p>%s %s <br>%s <a href="http://wordpress.org/support/topic/plugin-ajax-event-calendar-ajax-event-calendar-dont-like-the-apostrophes?replies=11#post-2259386" target="_blank"> <strong>%s</strong></a>. %s</p>'
    				, __('Your server has PHP magic_quotes_gpc set to active.', AEC_NAME)
    				, __('This produces formatting errors in the Ajax Event Calendar plugin.', AEC_NAME)
    				, __('Learn how to disable this setting', AEC_NAME)
    				, __('in this forum thread', AEC_NAME)
    				, __('Ask your host provider for help.', AEC_NAME)));
    			}	End Hide Error Message */

    And just to be clear what we're talking about, Magic Quotes IS turned off, it's just the error in the admin still displays. Commenting out that section of code only makes the message go away in the WordPress Admin.

    If Magic Quotes is on, you will have the apostrophes being replaced with backslashes issue regardless of commenting out the code.

    As for it not displaying on your other sites, yes that is odd. We have several client sites running this plugin and the message still displays in all of them across multiple hosts even with Magic Quotes turned off.

  11. GL8899
    Member
    Posted 1 year ago #

    Thank you waylaydesign, this worked for me, I really appreciate it!

  12. WayLay Design
    Member
    Posted 1 year ago #

    @GL8899 No problem. Glad you found it helpful.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic