bobjgarrett
Forum Replies Created
-
I will be able to do this in a couple of weeks when we have no events open for bookings. Is there an easy way to restore all the other user settings after doing a reset?
Good thought, I had not had!
I just tried to add a ticket and then checked the log to find:
[23-May-2018 10:11:01 UTC] WordPress database error Duplicate entry ‘0’ for key ‘PRIMARY’ for query INSERT INTOwp_em_tickets
(ticket_id
,event_id
,ticket_name
,ticket_price
,ticket_spaces
,ticket_members
,ticket_guests
,ticket_required
) VALUES (0, 97, ‘Standard Ticket’, 0.000000, ’10’, 0, 0, 0) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, EM_Event_Post_Admin::save_post, EM_Event->save_meta, EM_Tickets->save, EM_Ticket->save
[23-May-2018 10:11:01 UTC] WordPress database error Duplicate entry ‘0’ for key ‘PRIMARY’ for query INSERT INTOwp_em_tickets
(ticket_id
,event_id
,ticket_name
,ticket_price
,ticket_spaces
,ticket_members
,ticket_guests
,ticket_required
) VALUES (0, 97, ‘test ticket’, 0.000000, ’10’, 0, 0, 0) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, EM_Event_Post_Admin::save_post, EM_Event->save_meta, EM_Tickets->save, EM_Ticket->saveWhat does this suggest?
It certainly used to work but had probably not been used since maybe December when we set up all events for this year.
I am not sure how doing as you suggest will work but will try it. I am concerned though about losing data or stopping bookings so will not try this until our summer recess. I still suspect it is something about the way the code does the insert of new record where the index is null which seems to work outside of the code.Further checking suggests the table itself is OK. The following SQL instruction is executed correctly, adding a row.
INSERT INTO wp_em_tickets (ticket_name, event_id) VALUES (‘test’,1)
So must be the code?Thanks for the good suggestion but it is ticked. Also duplicating events with tickets works which suggests this feature is OK.
And just to clarify, I am able to duplicate events which include tickets.
So the duplicate function successfully adds records to the ticket table but the add ticket function does not.
This suggests it cannot be a table problem but some difference in the code and how it applies to the table.I have now done some further testing to try to isolate the problem.
The error is coming from the file em-ticket.php line 141 which is an insert of a new ticket. Adding some code to give more information provides the following error message:
Duplicate entry ‘0’ for key ‘PRIMARY’
The data string being inserted is -97-Standard Ticket-0.00-10-0-0-0 where the hyphen is the data separator used in an implode of $data.
So, I am now guessing, the table either needs a primary key not being provided or the table should be creating its own primary key.
Looking at the table wp_em_tickets the primary key is set to AUTO_INCREMENT.
Does this help?- This reply was modified 6 years, 11 months ago by bobjgarrett.
I have now tried the standard theme and disabled all themes with the single exception of Really Simple SSL which I fear would require a lot of other changes.
The problem still exists.
Any suggestions?OK, I have now tried that and it has made no difference. I still get the following message if I add any ticket.
Your event details are incorrect and cannot be published, please correct these errors first:
There was a problem saving the ticket.Top of the WordPress dashboard says:
Events Manager now supports multiple timezones for your events! Your events will initially match your blog timezone.You can reset your events to a new timezone and also complete the final migration step by deleting unecessary data in Settings > General > Admin Tools
I am using the latest version (5.9.2) as I updated from the previous version in the hope this might solve the problem.
I have tried this on 3 current events and 4 new events all with the same result.
We have about 30 events currently listed with three accepting bookings so I am reluctant to disable the plugins and themes again to see if it solves it as this will stop bookings and worry our club members.
Is there anything I can try to isolate the problem?
What about “complete the final migration step by deleting unecessary data”?I have had the same problem. When adding a new ticket the square box was grey and updating gave this error message.
I turned off all plugins except Events Manager and went to the standard theme. Still the same problem.
I then rename the event as “bug” then created a new event by copying another and then modifying it and it all worked.I now find that even with a new event I am unable to add tickets. I can delete and edit tickets but not add.
Help!Forum: Themes and Templates
In reply to: [Enigma] Enigma Theme Blog ContentsSuper.
Forum: Themes and Templates
In reply to: [Enigma] Remove Page Section from Engima ThemeThat fixed it.
Thanks.Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Shortcodes AnomolyUsing your suggestion:
$raceno1 = do_shortcode(‘[event post_id=”#_EVENTPOSTID”]#_ATT{Race}’);
echo “raceno=” . $raceno1 . ‘ length=’ . strlen($raceno1);Gets the same result: the value is 01 but the strlen is 11.