Events Made Easy Forums Bug fixed or feature request implemented Conflict with other Plugins

Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #53412
    Anonymous
    Inactive

    Hi,
    I figure out a problem with EME timezone usage that conflict with other plugin (Event Espresso in particular, but it seem generic).
    The problem is related to the timezone setting in EME code that is extended globally. If I disable EME the problem in the other plugin disappear.

    I’ve opened a issue ticket to the other plugin owner who told me the problem is related to EME code, in particular

    // set the timezone
    $tzstring = get_option('timezone_string');
    if (!empty($tzstring) ) {
       @date_default_timezone_set ($tzstring);
    }

    which is line 257 – 261 in /wp-content/plugins/events-made-easy/events-manager.php

    Do you think it’s possible to set the timezone only “inside” EME usage?

    #53413
    Franky
    Keymaster

    Of course I’m listening to every possible reason for conflicts with other plugins, but can you explain the effect you see or have?
    I’ll see when I introduced these lines but I think these are years old and prevent php warnings if you don’t set it in php.ini

    #53414
    Franky
    Keymaster

    Btw, I just checked with some other plugins I had installed, these do the same:

    – event-espresso-free (in the main code espresso.php even, practically the same lines)
    – wp-bulletin-board
    – easyreservations

    It’s even in wp-admin/options-general.php, wp-includes/class-phpmailer.php and even (as a base) in wp-settings.php.

    So please tell me why this would cause a conflict? And what the conflict is? And if possible: what other plugins?

    #53415
    Anonymous
    Inactive

    Hi,
    the problem is in event creation.
    There is a date picker to save the start and the end of an event.
    When you save the event, the date change.

    Have a look to this video
    http://cl.ly/0n0b3r1m2o2W

    Many Thanks!

    #53416
    Franky
    Keymaster

    Ok, I found this post: https://wordpress.org/support/topic/plugin-is-conflicting-with-event-espresso
    Meaning that wordpress is once again doing things in a very stupid way by requiring UTC for date_default_timezone_set …
    I’ll look into changing the code for all this, but it might take some time …
    I knew that I should’ve gone for utc from the start, but the initial codebase wasn’t mine so I never got around of doing that.
    I’m leaving this into bugs until I fix it in a correct way.

    #53417
    Anonymous
    Inactive

    Many Thanks!!

    #53480
    Franky
    Keymaster

    For reference for myself, things like his will be needed:

    $date = new DateTime(‘2006-12-12’);
    $date->modify(‘+1 day’);
    echo $date->format(‘Y-m-d’);

    But according to other threads that I read, the timezone setting in the wp-config.php file is just to avoid having the php warning if the timezone is not set in the php ini file and the wp db settings haven’t been read yet. And some people even recommend that it should be the same as the setting in your wp config (general settings), which seem far more logical to me. Although I admit that setting the timezone in a plugin is also not the correct thing to do …

    #54879
    Franky
    Keymaster

    Since 1.5.41 (I think), I use a datetime-related class so this is now solved.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top