Home › Forums › Calendar Products › Events Calendar PRO › Events Continue to Disappear
- This topic has 10 replies, 2 voices, and was last updated 12 years, 3 months ago by
Brook.
-
AuthorPosts
-
December 15, 2013 at 11:03 am #81804
Jonathan Goldford
ParticipantThis discussion continues from https://theeventscalendar.com/support/forums/topic/events-disappear-without-a-trace/.
I was able to disable all the plugins and switch to the default Twenty Thirteen theme with no luck. We’re still seeing the same number of events. Is there anything else we can do to determine what’s causing this?
In case you need this information we have the following installed:
– The Events Calendar v3.2
– The Events Calendar PRO v3.2
– The Events Calendar: Community Events v3.2Thanks for all your help.
Jonathan
December 16, 2013 at 2:45 pm #81995Brook
ParticipantHello Jonathan,
Thank you for creating a separate topic and testing in the default environment. That is a huge help for diagnosing problems.
Can you clarify something for me? You mentioned that events have disappeared. Did they disappear once a while back and you are currently trying to restore them? Or, have you readded those same events and they continue to disappear after you have add them back? If they continue to disappear, are they disappearing immediately or after an arbitrary amount of time?
– Brook
December 16, 2013 at 2:49 pm #81998Jonathan Goldford
ParticipantHi Brook,
Good questions. They seem to disappear arbitrarily and randomly. We have events we’e tried to add back, that then end up deleted again. They don’t seem to disappear immediately.
Basically, someone from the community submits the event, an admin publishes the event, then at some unknown time in the future, the event is deleted.
Thanks for looking into this.
Jonathan
December 17, 2013 at 8:32 am #82083Brook
ParticipantThanks for all the info, Jonathan. I have researched this quite a bit to see if anyone is having a similar issue. If that snippet (https://gist.github.com/jazbek/6585714) is still in your theme’s functions.php, this issue is quite unique.
We need to figure out if these events are still in the database, or if they have completely disappeared. Would you feel comfortable sending us a copy of your database? You can do this through a private reply, or by emailing it to [email protected] and referencing this post. In addition we would need to know some defining characteristics of one or more of the events that has disappeared. Its title, URL, date of the event, etc. The more details the better, but of course we completely understand if you can only remember some of those.
Thank you, for narrowing this down to community submitted events. That is a big help.
– Brook
December 17, 2013 at 10:59 am #82193Jonathan Goldford
ParticipantI took that snippet of code out after we tested it and didn’t see any change.
I also searched through the database in PHPMyAdmin and the example event I was looking at was completely gone. The post ID wasn’t referenced in any way in the database.
If you’d like I should still be able to send over the database and an example event, but I’ll have to run it by our client.
Let me know what you’d prefer.
December 17, 2013 at 2:19 pm #82362Brook
ParticipantI am glad you had a post ID on hand to lookup, that helps. It is extremely strange for something to be deleting rows entirely from the database. But, if you are quite convinced that the entries are missing from the database then you can skip sending us a copy.
Unfortunately missing entries means that briefly disabling all of the plugins did not tell us which of them is conflicting. Whatever is causing this is evidently completely removing the entries after a period of time.
I have scoured our sources to see if anyone is having a similar issue, and consulted with the team. This looks very much like a conflict caused by one or more of the other 20 plugins on your site. I know you do not want to hear this, nor do I really want to say it, but the only real way to find which plugin(s) cause the conflict is going to be disabling suspect plugins long-term, and see if the issue persists. Plugins which manipulate queries or modify the database would be my top suspects. Unfortunately, of the plugins you are running none stick out to me as being especially suspect.
I wish I did not have to be the bad news bearer. Thanks for all the info you have provided thus far. It has helped a lot while I was looking in to possible causes.
Kind regards,
BrookDecember 19, 2013 at 6:30 am #82787Jonathan Goldford
ParticipantI appreciate the honesty Brook. We had a similar, but different situation happen yesterday which will hopefully help us narrow down the problem. Yesterday, we had multiple events submitted through the anonymous Community Events form. The events then showed up in the “Pending” list. Once they were reviewed the admin clicked the blue “Publish” button. Instead of the events being published they just vanished. They are no longer in the “Pending” section, nor have they been published.
Any ideas here? Also, is there any code in the events system at all that deletes an event and all its meta data. If so, can you tell me where that is?
Thanks.
Jonathan
January 2, 2014 at 8:30 am #85564Jonathan Goldford
ParticipantHi Brook, just wanted to follow up on this issue and my previous questions. Any update?
Also, I wrote a plugin to email us whenever someone deletes or trashes an event. Hopefully that will also provide us some further insight.
At this point it seems that most, if not all, of the events that vanish are added via the Community Events form.
Thanks for the help.
January 2, 2014 at 9:02 am #85578Brook
ParticipantHowdy again Jonathan,
I hope the holiday treated you well. I am sorry for not responding sooner, we are still playing catch up here.
There is only one place in our code that I can find which uses MySQL delete syntax. That is on line 34 of \events-calendar-pro\lib\tribe-ecp-custom-meta.class.php. In addition there are a number of WP delete functions we use sprinkled throughout the code. Searching for “wp_delete_post” & “delete_post_meta” will spot them. Although, I doubt delete_post_meta is responsible as it should not delete any data.
You might check your other plugins as well. If you can do a site wide regular expression search you might look and see if they are using “DELETE.*FROM” in a suspicious way, if your IDE does not do regex search then just “DELETE FROM” is probably sufficient. Also I would check and see if they are using wp_delete_post in odd ways.
I am really sad to hear that nearly all of then are disappearing now. Short of disabling plugins to find a conflict, I have no better suggestion than the above. I appreciate that you have been keeping us posted.
– Brook
January 10, 2014 at 9:13 am #90163Jonathan Goldford
ParticipantHi Brook,
We wrote a plugin that emails us whenever an event is trashed or deleted using the ‘before_delete_post’ and ‘wp_trash_post’ hooks. It looks like the posts are being somehow put into the trash, but are not being deleted until WordPress does this automatically using the EMPTY_TRASH_DAYS constant. Is there any place in The Events Calendar, Events Calendar Pro, or Community Events plugins that would automatically trash events for some reason?
I noticed in tribe-community-events.class.php on line 1378 there is a call to wp_trash_post(). Can you tell us what would cause that function to be called there?
Thanks a lot.
Jonathan
January 13, 2014 at 6:18 am #91005Brook
ParticipantHowdy Johnathan!
That code would get called anytime a user pressed delete. It even checks for a nonce to prevent CSRF attacks, so it is doubtful someone is bypassing WP security and harassing you. To do that they really should need an admin login or some other form of access.
If you suspect that line of code though you could comment it out. I foresee no harm in that, provided you want to remove the built-in delete capability for now.
We also modify wp_trash_post here to allow deletion of single events in a recurrence series: http://docs.tri.be/Events-Calendar-PRO/source-class-TribeEventsRecurrenceMeta.html#38-39 You could probably safely comment out those lines as well if you want to check and see if any of our code is somehow affecting this. Though, to be doubly safe you might backup your site and DB first.
Thanks for the additional info. I really do not see how our plugin could be doing this though after a thorough examination of code surrounding event deletions. Make sure to check some of the other plugins as well. Are any of them calling wp_trash_post or attaching actions to it?
– Brook
-
AuthorPosts
- The topic ‘Events Continue to Disappear’ is closed to new replies.
