Find/Replace for "Free" in tickets field?

Home Forums Calendar Products Events Calendar PRO Find/Replace for "Free" in tickets field?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1034889
    Rachel
    Participant

    I’m getting an error on any Community Event where a user put in “Free” for the cost, instead of “0”. Is there a quick find/replace I could do to fix that? There are so many…………..

    Other than that, the 4.0 update is working perfectly!

    This is the error, if it helps:

    Warning: max() [function.max]: Array must contain at least one element in /home/content/53/10302453/html/jewishcolorado/wp-content/plugins/the-events-calendar/src/Tribe/Cost_Utils.php on line 296

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/53/10302453/html/jewishcolorado/wp-content/plugins/the-events-calendar/src/Tribe/Cost_Utils.php on line 307

    Warning: Invalid argument supplied for foreach() in /home/content/53/10302453/html/jewishcolorado/wp-content/plugins/the-events-calendar/src/Tribe/Cost_Utils.php on line 309

    Thanks!

    #1035573
    Nico
    Member

    Hey Rachel,

    Thanks for reaching out! Sorry to hear about this issue but stocked to hear you had a smooth update!

    I’m not sure I completely understood the issue, Can you elaborate a bit more…

    • Is this happening to previously created Events?
    • Where is the error showing? In the front-end of the site? In the back-end? Server Log?
    • If the error is showing on the front-end of the site, Can you link me to it?

    Sorry for the many follow-up questions, I just want to make sure to understand this correctly and be able to help you out,
    Best,
    Nico

    #1035773
    Rachel
    Participant

    Hi Nico,

    This is happening on the front end only, to any events where the user entered “Free” in the ticket price, instead of “0” or leaving it blank. Here’s an example:

    http://www.jewishcolorado.org/event/the-m-b-glassman-gold-club-lunch-learn-for-seniors-2-2/2015-12-07/

    This is happening with both recurring events and with single events…but ONLY to events that have “Free” in the ticket price, rather than “0” or leaving it blank.

    Thanks!

    #1036922
    Nico
    Member

    Hey Rachel,

    Thanks for clarifying the issue 🙂

    I guess the best way to ‘bulk edit’ all this data is to run a MySQL Query (via phpmyadmin for example) to set all those ‘Free’ cost values to ‘0’ instead. Make sure to do a db back-up before running the query!

    https://gist.github.com/niconerd/6d147d3828dab4602572

    Please let me know if you could manage to run the fix (and if it worked) or if you prefer a less technical solution,
    Best,
    Nico

    #1075972
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Find/Replace for "Free" in tickets field?’ is closed to new replies.