import CSV error

This topic contains 7 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14257

    Did an import and got this error:

    Warning: array_filter() expects parameter 1 to be array, string given in /home/idleminu/public_html/dailyphotojournaling.com/wp-content/plugins/event-organiser/includes/event.php on line 638

    Also noticed recurrence end date (typically two or three recurrences later) was set to equal event end date of the event.

    Lastly, can I import the tickets too??

    Any ideas what is going on with the error?
    Thanks!

    Don West
    #14261

    Hi Don,

    Were these weekly events? For weekly events schedule meta should be an array, which it doesn’t appear to be (in this case) – once I’ve verified this there’ll be an update shortly for the CSV extension.

    Tickets can’t be imported by CSV – this is partly because events could have multiple tickets or tickets for specific dates, – so you end up with two data sets which CSV can’t handle.

    The only solution is to include ticket details in separate columns – and this can work quite well if you only have a small number of tickets for the whole event. But otherwise it doesn’t work quite so well (which is why the CSV extension doesn’t support it). There a few filters you’d need to to this:

    There’s a filter to add column options (i.e. “start date”, “end date”, etc) so you can allow columns to be marked for ticket name / price / spaces etc. (See source)

    Then to parse the value from the CSV file you (may) need to use the filter eventorganiser_csv_cell_valuesource,

    Finally when the event is created the eventorganiser_csv_event_inserted hook is triggered – which allows you to use the parsed value to update the event (i.e. create a ticket for the event).

    But if you want to “outsource” the development of this, then feel free to get in touch.

    Stephen Harris
    #14277

    Sorry Don, this thread was closed accidentally. I’ve now reopened it.

    Stephen Harris
    #14278

    Yep, they were weekly 🙂

    Don West
    #14279

    BTW, the reason for even importing the events is the following…perhaps you have a different solutions? 🙂

    I would really prefer to create a recurring event for the two workshops I offer since they both span the entire year. However, I can only assign categories to the parent event and those same categories get assigned to the children. This creates a problem if I want a sidebar menu that lets me select events by categories…and I want those categories to be January, February, March etc. 🙂

    Soooo, is there a way to create a widget menu (like the category widget) that filters the event list by date range?? Otherwise I have to create 120 or so events and tickets in a spreadsheet, assigning the month category to each, and import them.

    Any suggestions?

    Don West
    #14287

    Hi Don,

    Yes, each month as it’s own url: yoursite.com/events/event/on/2015/01 (by default) for January 2015, for example.

    You could create a widget which simply generates a list of links pointing to each month (via the eo_get_event_archive_link() function):

    E.g. the following (requires PHP5.3+) will display the next twelve months:

    $month = new DateTime( 'first day of this month' );
    echo '<ul>';
    for( $i=0; $i <12; $i++ ){
        printf(
                '<li><a href="%s">%s</a></li>',
                eo_get_event_archive_link( $month->format('Y'), $month->format('m') ),
                $month->format('F Y')
        );
        $month->modify('+1 month');
    }
    echo '</ul>';
    
    Stephen Harris
    #14296

    Works like a charm! Many thanks for that 🙂
    Let me know when you get the CSV Import error fixed. It’s still a great tool.

    Don West
    #14320

    Hi Don,

    The CSV plug-in has just been updated.

    Stephen Harris
Viewing 8 posts - 1 through 8 (of 8 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.