• Resolved severnaa

    (@severnaa)


    I have an issue trying to publish events with tickets. I have attempted to figure out what is going on via the forum and fiddling with all options in the ticket editor, database, and in the noted php file. Had anyone seen this before?

    Event editor error:
    “””
    Your event details are incorrect and cannot be published, please correct these errors first:

    There was a problem saving the ticket.
    “””

    Ticket editor Error:
    “””
    Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\wordpress\wp-content\plugins\events-manager\classes\em-bookings.php on line 183
    0/ 10
    “””

Viewing 10 replies - 1 through 10 (of 10 total)
  • What version of EM are you using???
    If I open classes/em-booking.php line 183 is empty.

    If you are using an old version of EM with PHP higher than 7.1 you indeed get this warning. The current version of EM is 5.9.5.

    Thread Starter severnaa

    (@severnaa)

    “em-bookings.php” not “em-booking.php”

    I downgraded to php version 7.1.39 and I still get the same issues do I need to restart the virtual server? A lower version of php?

    Thank you

    Hello,

    What version of Events Manager and WordPress are you using? Are you using the latest version of Events Manager? Please do try also the only Events Manager is the only activated plugin and try changing theme to any twenty-series.

    Thread Starter severnaa

    (@severnaa)

    I am using the latest version of Events Manager and WordPress and have PHP 7.1

    I deactivated all other plugins and used a basic theme and the same failure occured. I am going to activate and use PHP 6 and try that out now. Since the issue is definitely with the count() function but I do not know enough about php to really understand the problem.

    Thread Starter severnaa

    (@severnaa)

    I have tried all versions of php available on the official site. Starting up xampp fresh each time. No other plugins and a basic twenty theme. I feel like I am doing something weird with ticket entry but I just don’t know enough php to figure it out.

    If there are any good suggestions to what the following entails:

    Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\wordpress\wp-content\plugins\events-manager\classes\em-bookings.php on line 183
    0/ 10

    I really think that refers to a specific ticket entry issue. The problem is that array in question on line 183 is referenced so many times in em-bookings.php that it will take hours of my time to figure out what is actually going on.

    First of all, PHP 6 was never released, so that is no option.

    Secondly, you are talking about a warning not an error! BIG difference. If you simply turn off WP Debug, you will not even see the warning. A warning does NOT mean the plugin stops working. If it does that, it is an error.

    So for now, you can just ignore it. EM still works without errors.

    What is going on is very simple. When creating a new event the umber of bookings = 0. And since PHP 7.2 that is no longer allowed for some reason. A lot (and I do mean a LOT) of plugins ran into that warning. Do a Google search and you’ll see.

    Please see PHP own documentation.
    https://www.php.net/manual/en/migration72.incompatible.php
    (Scroll down to “Warn when counting non-countable types”)

    Change count($this-> to count(@$this->

    Thread Starter severnaa

    (@severnaa)

    EM still works as long as I don’t have any tickets otherwise it will not allow me to publish the event. I made the change you suggested in the src file and it continued to have the same issue. I will look through the documentation.

    PHP version 7.1 does not even have that message so, if you had loaded PHP 7.1 correctly, that message does not even exist.

    do I need to restart the virtual server?

    Of course! You are simulating a server, not running a real one.

    Thread Starter severnaa

    (@severnaa)

    I put the site on my linux machine and it works fine so there is something that is fundamentally wrong with my xampp install. Thank you for the sanity check.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Issue with Tickets’ is closed to new replies.