• Resolved bobjgarrett

    (@bobjgarrett)


    I am unable to add tickets to either current events or new events.
    I am able modify tickets in current events.
    The message I get is:
    Your event details are incorrect and cannot be published, please correct these errors first:
    There was a problem saving the ticket.

    The square block against a ticket being added is grey and remains grey.
    I tried disabling all plugins and going to a default theme but the problem remained.
    This is a new problem as the software has worked correctly for some time.

    Could it be to do with the new timezone feature that I have not enabled?
    What can I do?

Viewing 15 replies - 1 through 15 (of 25 total)
  • Which version of Events Manager are you using?

    Is this happening with every event or just one/some?

    Thread Starter bobjgarrett

    (@bobjgarrett)

    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”?

    “complete the final migration step by deleting unecessary data”?

    Where are you seeing that?

    Thread Starter bobjgarrett

    (@bobjgarrett)

    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

    Have you tried clicking the Finalize Timezones Upgrade button on the page mentioned in the notice?

    Thread Starter bobjgarrett

    (@bobjgarrett)

    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.

    It’s possible this is a conflict caused by your theme or another plugin. To check if it is, can you test with all other plugins deactivated and while running the default WordPress theme?

    Thread Starter bobjgarrett

    (@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?

    Thread Starter bobjgarrett

    (@bobjgarrett)

    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.
    Thread Starter bobjgarrett

    (@bobjgarrett)

    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.

    TreeTrail

    (@aprilschmitt27)

    I’m relatively new to WordPress, so please check carefully what I’m suggesting. As I moved my site from local to hosted, I had similar issues. In my case, I found that all of my tables had lost their auto increment value …and (thankfully) would not accept entries.

    Through my cPanel access, I used phpMyAdmin, looked at each tables’ Operations tab. From there I restored the yes check mark to the “Add AUTO_INCREMENT value”. Some tables of course do not use this setting, so I compared them all to my last working version.

    My EM installation has this is check marked for: wp_em_tickets and wp_em_tickets_bookings. In fact, all 10 of my wp_em_ tables have this value set to yes. Hope this helps.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    Thanks for the good suggestion but it is ticked. Also duplicating events with tickets works which suggests this feature is OK.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    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?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    would it be possible to try resetting under Events > Settings > General > admin tools? and/or this is working before?

    Thread Starter bobjgarrett

    (@bobjgarrett)

    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.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Unable To Add Tickets’ is closed to new replies.