Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lmhaffner

    (@lmhaffner)

    Yes, I had to trim mine down as well to get all the events imported. I didn’t have player lists, so just 2 lines per event. Each import would only ingest 59 lines (29 events * 2 teams/event + 1 header line).

    Still, much better than entering by hand!

    Thread Starter lmhaffner

    (@lmhaffner)

    Brian,

    I’ve tried both \’ and ” (two single quotes, another SQL escape option…) but get the same results. Those characters are being escaped properly as team posts are being created with those names, e.g. AJ's Black, AJ\'s Black, or AJ''s Black. But they all fail to match when the next event with that team name is imported.

    I delved into the SportPress code for event import, which is very straightforward. I can’t see anything obvious in the SP or WP functions that would caused that match to fail. It doesn’t look like SP modifies the team name before the prepare statement in get_page_by_title. And clearly the team post is being created by SP with the title I’ve passed in after the match fails. I expect it has something to do with how the title is being stored in the db.

    I don’t have shell access yet on this server, but I might try to get it and take a look at the table values directly for these titles. Any other suggestions, let me know…

    – Matt

    Thread Starter lmhaffner

    (@lmhaffner)

    Fixed #2 by using 24-hour time (no AM/PM) and sticking with yyyy/mm/dd date formatting in the CSV file. Note that there’s no message to the user that date or time conversion failed on import—it just defaults to the current time of the import. I’m guessing it was likely the time formatting in my case since the importer gives data format options, but I haven’t checked explicitly.

    Any help for #1 (apostrophes in team names for CSV event import)? I assume that will have to be a code fix, but if there’s a workaround, please let me know. Might have time to skim the code myself—will reply if I find anything obvious.

    – Matt

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