Home › Forums › Calendar Products › Events Calendar PRO › Supporting multiple sites with PRO for clients, but can’t post in support form
- This topic has 6 replies, 5 voices, and was last updated 9 years, 2 months ago by
Cully.
-
AuthorPosts
-
January 16, 2017 at 3:20 pm #1219287
Cully
ParticipantI’m supporting three sites for clients, using the PRO plugin. However, I myself don’t own any of the licenses. I just encountered an error with the newest version of the PRO plugin, but I can’t post it in the support forums. I really need to get this fixed soon. Is there any way I could get permission to post in that forum, without personally owning the license? Or perhaps you could just email me for this one? Here’s a summary of the problem:
I’m able to create an event just fine, but when I try to save an event that already exists, I get this error:
Catchable fatal error: Argument 1 passed to Tribe__Events__Pro__Recurrence__Series_Rules_Factory::build_from() must be of the type array, string given, called in events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 1056 and defined in events-calendar-pro/src/Tribe/Recurrence/Series_Rules_Factory.php on line 32I var_dump’ed the variable being passed as a string (the one that should be an array), and it shows me this:
string(69) "a:3:{s:5:"rules";a:0:{}s:10:"exclusions";a:0:{}s:11:"description";N;}"This leads me to believe that the data is serialized, but then that the plugin is not properly un-serializing the data before using it. I’m putting the var_dump on line 1055:
foreach ( $recurrence_meta[ $rule_type ] as &$recurrence ) {
var_dump($recurrence);
$rule = Tribe__Events__Pro__Recurrence__Series_Rules_Factory::instance()->build_from( $recurrence, $rule_type );
I’m using:
PHP 5.6.29
Wordpress version 4.7.1
The Events Calendar version 4.4.0.1
The Events Calendar PRO version 4.4January 16, 2017 at 4:32 pm #1219335Cliff
MemberHi, Cully.
I’ve moved this thread from the Pre-Sales Forum to the PRO support forum and have asked a developer to take a look at your information.
To avoid this issue in the future (as I cannot guarantee we’ll do this again), you are correct that you/your account cannot post here without a license of your own. You could buy an Agency license or something like that (any multiple install license) and be the only one to be able to submit new threads (then they wouldn’t need their own licenses and wouldn’t be able to post here), or you could have them provide you their credentials so you can post here… Please reference the Account Security section of https://theeventscalendar.com/terms/
Thanks for your understanding.
I’ll reply back here once I get an update from one of our developers.
January 16, 2017 at 4:52 pm #1219342Brook
ParticipantHowdy Cully,
I would love to help you with this. I just extended your old Pro license on this account through the end of the month, that way you won’t have to hassle with getting login creds for your client.
If you go to WP Admin > Settings > Events > Help, inside the System Information area there will be a listing for “previous_ecp_versions”. Is one of those versions 4.2.2 perchance? If so, we have a plugin that can be found on this page which will correct an error introduced in that version. Would you mind first backing up your database, and then running that plugin (after reading the article)? That issue was related to the recurrence rules not always being serialized properly. Hence why I think it might be the cause of your current problem.
If that past version does not appear in your system info, would you mind sharing your system info here as a private reply? Also, is this problem cropping up on all three sites or just one?
Cheers!
– Brook
January 24, 2017 at 1:58 pm #1223192Cully
ParticipantSorry, for some reason I wasn’t notified of replies to this message. Before running the plugin you linked to, I just wanted to find out a few things.
(1) Here’s our list of previous_ecp_versions:
previous_ecp_versions = Array ( [0] => 0 [1] => 4.2.2 [2] => 4.2.4 [3] => 4.2.5 [4] => 4.2.7 [5] => 4.3 [6] => 4.3.0.1 [7] => 4.3.1.1 [8] => 4.3.2 [9] => 4.3.3 [10] => 4.3.4.2 [11] => 4.3.5 ) latest_ecp_version = 4.4.0.1Since 4.2.2 was so far back in our update cycle, why would we be running into problems with it now?
(2) The documentation for the plugin you linked to says that it only cleans up recurring events that were created because of the 4.2.2 bug. We don’t have any extra recurring events, so we don’t need that kind of cleanup. Does the plugin also fix some kind of serialized data storage problem?
(3) Since we’re so many versions beyond 4.2.2, is there a chance that the plugin you linked to will mess up some data/structure that was introduced since that plugin was created?
(4) We only noticed problems when we updated from 4.3.5 to 4.4.0.1. After that update, we could create new events, but we’d get an error when we tried to then make a change and save that same event. This makes me think the problem has to do with current code, and how that data is being saved. If it was a throwback to some problem in 4.2.2, then how would that be affecting newly created events?
(5) I created a temporary ‘hack’ that entirely fixes the problem we were having. I’ve pasted it below. Does that potentially indicate the actual problem we’re having? Do you still think the plugin you linked to is a good solution?
This starts on line 1053 of events-calendar-pro/src/Tribe/Recurrence/Meta.php:
foreach ( array( 'rules', 'exclusions' ) as $rule_type ) { foreach ( $recurrence_meta[ $rule_type ] as &$recurrence ) { if(is_string($recurrence)) $recurrence = unserialize($recurrence); // I added this line, which fixes the problem $rule = Tribe__Events__Pro__Recurrence__Series_Rules_Factory::instance()->build_from( $recurrence, $rule_type );-
This reply was modified 9 years, 3 months ago by
Cully.
January 25, 2017 at 11:22 pm #1224179Brook
ParticipantThanks for sharing the previous versions.
- I could envision a lot of reasons for the delay. One possibility is that event you’re trying to update was originally created in 4.2.2 or prior.
- Duplicate events was one obvious symptom to the problem in 4.2.2. However, it did not duplicate in every case. When the recurrences rules are improperly serialized, weird and hard to predict things can happen.
- The chance is small, but certainly still possible. As my last comment mentioned, please make sure to make a database backup before running the tool, just to be safe. The tool mostly makes use of the plugins public API to trigger a recurrence rebuild for select events, and even after reexamining its code I see no reason why it would have issues here.
- Recurrence rules are only accessed at certain times by our plugin. I could certainly see room for them getting corrupted in one update, and the problem not revealing itself for a while.
- That looks like a solid fix. I would leave that in their for now. The tool actually trigger a recurrence rebuild for affected events, so it is quite possible it will work better in unison with your “hack”.
I understand where you are coming from, it is very possible this old bug which improperly serialized those rules is unrelated. But, so far you are the only person I’ve seen with this issue since the days of 4.2.2. We have many thousands of users, and the latest update has been out for a couple of weeks now. So it be odd if that update introduced a bug like this and yet it only affected your site.
Please let me know if you have any more questions, or if that tool helped.
Cheers!
– Brook
February 16, 2017 at 8:35 am #1238766Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
This reply was modified 9 years, 3 months ago by
-
AuthorPosts
- The topic ‘Supporting multiple sites with PRO for clients, but can’t post in support form’ is closed to new replies.
