Title: Two import issues
Last modified: August 22, 2016

---

# Two import issues

 *  [lmhaffner](https://wordpress.org/support/users/lmhaffner/)
 * (@lmhaffner)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/two-import-issues/)
 * We are just getting started with SportsPress for our baseball league. I’m trying
   to import a group of events for the first time and am running into two problems:
 * 1) This one seems to be a bug… If a team’s name contains an apostrophe, it’s 
   not matched against an existing team. A new team is made for each event with 
   this team’s name. I have 2 teams with apostrophes that are duplicated (e.g., 
   AJ’s Black). All my other teams are matched fine.
 * 2) The date and time fields look fine on the event import screen after loading
   the file, but the post dates for the events are set to whatever the current time
   is. Here’s an example of my formatting:
 * `4/23/2014,6:00 PM, ...`
 * Is the importer very picky about the date/time formatting? All my events are 
   being set to whatever time the import is happening instead of the proper event
   times.
 * Thanks for any help…
 * – Matt
 * [https://wordpress.org/plugins/sportspress/](https://wordpress.org/plugins/sportspress/)

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

 *  Thread Starter [lmhaffner](https://wordpress.org/support/users/lmhaffner/)
 * (@lmhaffner)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/two-import-issues/#post-5745170)
 * 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
 *  Plugin Author [Brian](https://wordpress.org/support/users/brianmiyaji/)
 * (@brianmiyaji)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/two-import-issues/#post-5745172)
 * [@lmhaffner](https://wordpress.org/support/users/lmhaffner/) Thanks for following
   up. That’s correct, the importer is a bit picky with the date format.
 * Regarding team names, I’ll put in a note so that we can improve compatibility,
   but for now you could add a backslash before the apostrophes. For example, “AJ\’
   s Black”. Hope that helps 🙂
 *  Thread Starter [lmhaffner](https://wordpress.org/support/users/lmhaffner/)
 * (@lmhaffner)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/two-import-issues/#post-5745217)
 * 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
 *  Plugin Author [Brian](https://wordpress.org/support/users/brianmiyaji/)
 * (@brianmiyaji)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/two-import-issues/#post-5745222)
 * Hi Matt,
 * Thanks for the additional info and for your feedback. The importers are using
   single quotes when importing which is most likely the issue, and I might need
   to add some escaping in the right places to make sure things work properly.
 * I’ll spend some time this coming week to look into the importer and hopefully
   find and solve the issue.
 *  [LoneWolfPR](https://wordpress.org/support/users/lonewolfpr/)
 * (@lonewolfpr)
 * [11 years ago](https://wordpress.org/support/topic/two-import-issues/#post-5745350)
 * I’m having a similar issue. I’m importing a bunch of players. One of the teams
   has an apostrophe in the name. When I import the players it doesn’t recognize
   they’re part of that team. It creates a duplicate team for each player I’m importing.
 *  [Ruson](https://wordpress.org/support/users/ruson/)
 * (@ruson)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/two-import-issues/#post-5745355)
 * Are there any soccer databases which I could get and import in SportPress? I 
   started to add the players but it takes too much time to do that. I hope it is
   possible to find it.

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

The topic ‘Two import issues’ is closed to new replies.

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Ruson](https://wordpress.org/support/users/ruson/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/two-import-issues/#post-5745355)
 * Status: not resolved