Events Made Easy › Forums › Bug fixed or feature request implemented › Conflict with other Plugins
- This topic has 7 replies, 2 voices, and was last updated 9 years, 2 months ago by Franky.
-
AuthorPosts
-
Thu 29 Jan 2015 at 11:40 #53412AnonymousInactive
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?
Thu 29 Jan 2015 at 19:18 #53413FrankyKeymasterOf 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.iniThu 29 Jan 2015 at 20:25 #53414FrankyKeymasterBtw, 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
– easyreservationsIt’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?
Fri 30 Jan 2015 at 09:29 #53415AnonymousInactiveHi,
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/0n0b3r1m2o2WMany Thanks!
Fri 30 Jan 2015 at 10:14 #53416FrankyKeymasterOk, 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.Fri 30 Jan 2015 at 10:19 #53417AnonymousInactiveMany Thanks!!
Mon 16 Feb 2015 at 00:09 #53480FrankyKeymasterFor 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 …
Mon 21 Sep 2015 at 21:40 #54879FrankyKeymasterSince 1.5.41 (I think), I use a datetime-related class so this is now solved.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.