Support

Home Forums Event Espresso Premium Error on Event Add or Modify. (database error)

Error on Event Add or Modify. (database error)

Posted: December 24, 2012 at 12:46 am


milesxx

December 24, 2012 at 12:46 am

I am running EE 3.1.29 and WP 3.5, made all the necessary adjustments suggested already. I was running a previous version 3.1.21 and WP 3.45. I point this out because the following error was happening BEFORE I upgraded, and is STILL happening afterwards as well!!

The Error ?

1.) When Adding a new event, the event is added with the DATE/TIME/DESCRIPTION/TITLE added….HOWEVER, pricing, status, author, and a whole bunch of other information isn’t added!

2.) After I hit submit/update I get this message in YELLOW “[WORDPRESS DATABASE ERROR] QUERY WAS EMPTY”. I am able to modify the entry but as I said pricing information and member pricing no matter if it was added with entry or modified later on, disappears entirely. Any ideas ? Miles.


Josh

  • Support Staff

December 24, 2012 at 8:46 am

Hi there,

Can you remember back to when this issue started if anything on the site had changed? If you deactivate all plugins except Event Espresso, does the problem persist?


milesxx

December 24, 2012 at 8:57 am

Josh,

This issue started when I moved the site a few weeks back from one host to another.

I have deactivated all plugins, same thing happens. This is a database WRITE error….it’s almost like its writing to field that isn’t there.

Miles


Josh

  • Support Staff

December 24, 2012 at 9:31 am

Hi there,

It sounds like something did not go right when the database was moved, or the new host is running a version of mysql that is really old. What was the method that was used when the site was moved? Here is a link to the WordPress codex that outlines how to move a WordPress installation from one server to another:
http://codex.wordpress.org/Moving_WordPress#Moving_to_a_New_Server

Was the database backed up before it was moved? Can you try migrating the database to a local test site to see if the issue continues there as well?


milesxx

December 24, 2012 at 9:49 am

Josh,

The ‘new’ host is the same host, I should have been a bit clear, I really just changed domain names, and started fresh from a new install of wordpress. I backed up everything, followed procedure, and then moved everything…a long and laborious process but eventually came out the other side when I thought everything was fine. I added a few events, and it worked without incident, so I thought everything was fine. But clearly not as this has been happening for the last few weeks.

Miles.


Josh

  • Support Staff

December 24, 2012 at 1:57 pm

I’m a bit confused about how this site was moved over then. Was it a fresh install of WordPress, that had an old install migrated onto it? This isn’t really a fresh install once the old install was migrated onto it.

It sounds like it may not have anything to do with moving the site though, since it worked for a while after the move. In this case, was anything else on the site changed at that time?

If you still have a backup of the database from before the migration, can you try migrating it to a local install and testing there? The WP Migrate DB plugin will help you automate the process of migrating the database, and the BackupBuddy plugin will automate this even further because it will copy everything over including files and make the URL changes in the database.

If the local install looks good, then you can migrate that over.


milesxx

December 24, 2012 at 2:27 pm

I can’t migrate that over, even if I wanted to. Too much has changed since that point in time.

I’ve just run structural check against the database from the backup to what’s there now. Mind you there have been a few changes, those are easy to spot. However, there are really only 3 or 4 places where I am not certain if what I am looking at is correct, or not. Is there a table listing of what the tables SHOULD look like that I can test against ?


Josh

  • Support Staff

December 24, 2012 at 3:34 pm

Hi there,

Each table is going to have its own unique structure. Since the error you are reporting is with editing events, here is a screenshot of the structure of the event_details table:

screenshot

Also, if you can install a fresh installation of Event Espresso on a local dev site, using MAMP, xampp, or the like, you’ll have a fresh database you can compare to.


milesxx

January 1, 2013 at 3:18 pm

Josh,

Thanks for the SS! That helps.

A bit more information…something REALLY odd is happening. Even more than what I reported above:

The user is able to ‘register’ (sort of) but gets an error telling them that the user was not found (see SS), however, the user isn’t logged in, and I tried this as a logged in user as well as a non-member. Same error.

What appears in the ATTENDEE table are TWO entries, not one, of the user’s registration. Even though the user was told that their registration didn’t go thru.

http://closembracetango.com/wp-content/uploads/2013/01/PastedGraphic-2.png

WTF ? 😉
I have installed and re-installed EE by the way. I have deleted the tables, and reset them, and then reimported the data….I’m STILL getting this error!


milesxx

January 2, 2013 at 2:24 am

Ok, I finally figured it out. And I have bad news for you kiddies.

You have a problem with your code.

I’ll skip the dramatic build up to supporting that statement and say this: There is an error with how EE is responding to the JETPACK PLUGIN -> PUBLICIZE.

Long story short I did the following:
1.) Turned off ALL of my onboard plugins.
2.) Dumped all of my previous EE data, tables, and fields (yes that means the modifications you kids made to the wp_options table).
3.) Installed All NEW copies of the plugin AND all subplugins. Which created new tables!
4.) Re-Initialized EE from scratch, entered new data for one event, and tested from there.
5.) Then added one plugin back at a time, with each new test (trying to register a user). if the user registered (once, and not multiple times, as it was doing), then that was a success and I moved on.
And this is when I discovered that EE does not work with the Jetpack in its current form. Upon further inspection, I realized that you can turn off each individual module. So I did. And then reinitialized each one, and bam, publicize gets in the way and doesn’t play nice with EE.

That’s a problem kiddies. Fortunately I don’t need that jetpack item, however, someone might.

I have a bit more clean up work to do, to see if it’s working to spec at this point, but that’s the first good news I’ve had in days.


milesxx

January 2, 2013 at 3:56 am

Correction: The Problem Still Exists!

I am running EE 3.1.29 and
EE Plug-Ins:
EE-Calendar (v2.0.4)
EE-MailChimp (v1.0.4)
EE-MembersAddon (v1.9.6)
-> EE-MultiEventReg (v1.0.4)
-> EE-RecurringEvents (v1.1.7)
>I don’t need those last 2. I can run without them.

To recap: After having updated everything, tossed all the data, replaced the database, replaced the tables, reinstalled everything (TWICE), and having run into the problem in BOTH development as well as production. I have come to the conclusion that we have a problem! I can not add a 3 events without hitting the “WordPress database error: [Query was empty]” error.
Any suggestions ????


Josh

  • Support Staff

January 2, 2013 at 11:20 am

Hi Miles,

I’m so sorry to hear about all the problems you are having. The Jetpack issue is a known issue, and we are looking into it, for now, there are are few suggestions on how to work around the issue in this other thread while we work on it:

https://eventespresso.com/topic/important-information-re-the-recent-jetpack-update-and-event-espresso/

With the WordPress database error, can you let us know the point at which you get that error? It sounds like you can create two events, then hit that error when creating a third event, is that correct?

Another thing to check: Did the database table prefix get changed at some point? For example, the default prefix is wp_, but you can change it to something else by editing the wp_config.php file. I’m wondering if there is an option from earlier that is still pointing to a table that doesn’t exist. Can you try turning on wp-debug to see if you get addition errors when creating events?


milesxx

January 2, 2013 at 12:43 pm

Josh,

Yes on submitting the 3rd event…bam! Problem. I get the same error I reported above.

table prefixes have never changed.

I think you’re on to something…a table that doesn’t exist!

In my dogged research to track down this error, I came across 2 tables that used to be there but aren’t anymore.

Both were attendee tables. Did the way that attendee data was being saved, change since .21 to .29 ????


Josh

  • Support Staff

January 2, 2013 at 1:37 pm

Hi Miles,

Which tables are missing that were there before? Are they entire tables or columns from a specific table? Attendee data has had some changes since .21, but from reading over this thread, the only issues you were having with saving attendee data had to do with the Jetpack compatibility issue.

In this case, it can help to have wp-debug turned on and have the debug bar plugin installed in order to see specific database error messages when saving or updating events.


Chris Reynolds

  • Support Staff

January 2, 2013 at 2:23 pm

@milesxx

It’s possible. There have been some tables that have been dropped because they were not being used or contained data that was duplicate of data stored elsewhere. What tables did you find that were missing?


milesxx

January 2, 2013 at 3:20 pm

These two tables:
wp_events_attendee_checkin
wp_events_attendee_cost


milesxx

January 2, 2013 at 3:43 pm

I figured it out. You have an issue with your code.

When adding % signs to price descriptions, EE throws an add failure error.

The error that its yapping about isn’t that event didn’t get created (because it does), its the event attendee pricing data that doesn’t get created. Especially if you add a “%” sign to the NAME field as I was doing under EVENT PRICING.

name: [30 day immersion fee – 10% down] 595.00


Josh

  • Support Staff

January 3, 2013 at 12:18 pm

Hi Miles,

Thanks for the feedback. I’m going to create a ticket so that characters like the ‘%’ get escaped.


milesxx

January 3, 2013 at 1:47 pm

Great! I think we can close this thread now…..


milesxx

January 3, 2013 at 11:42 pm

Ok, you might want to add [ and ] and { and } to that list of escaped characters. EE is throwing errors for those as well!

The support post ‘Error on Event Add or Modify. (database error)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso