Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author AntoineH

    (@antoineh)

    The column layout for a full data import is:

    play_date;home_team;away_team;stadium;match_type;home_team_photo;home_team_flag;home_team_link;home_team_group;home_team_group_order;home_team_is_real;away_team_photo;away_team_flag;away_team_link;away_team_group;away_team_group_order;away_team_is_real;stadium_photo

    So, looking at your example, that would be something like:

    2020-09-12 15:00:00;ARS;SOU;"Premier Pundits";"English Premier League";;https://premierpundits.com/wp-content/uploads/2020/08/ARS.png;;"English Premier League";1;1;;https://premierpundits.com/wp-content/uploads/2020/08/AST.png;;"English Premier League";1;1;

    /disclaimer: not tested.

    Tip: create one match (plus 2 teams, match type, etc.) via the admin and then export it on the matches page. You can use that export as a template to add all other matches.

    Thread Starter crodat

    (@crodat)

    Thank you for the quick reply.

    I have attempted this using your tip (add in one match manually and download the scedule and use that as a template) but when I add a second row, and try and import it, I get the error:

    Invalid column count on row 2.

    This is the current contents of my CSV on rows 1, 2 and 3 (I’m testing without flags for the moment) – I added the top fixture and then copy and pasted on to the next row and just changed the team names:

    play_date;home_team;away_team;stadium;match_type;home_team_photo;home_team_flag;home_team_link;home_team_group;home_team_group_order;home_team_is_real;away_team_photo;away_team_flag;away_team_link;away_team_group;away_team_group_order;away_team_is_real;stadium_photo
    2020-09-12 15:00:00;CRY;SOU;”English Premier League”;”English Premier League”;;;;;0;1;;;;;0;1;
    2020-09-12 15:00:00;ARS;FUL;”English Premier League”;”English Premier League”;;;;;0;1;;;;;0;1;

    Plugin Author AntoineH

    (@antoineh)

    If I copy & paste your data in a text file, then it works perfectly on my test install.

    Import result:

    Team 1 added: CRY
    Team 2 added: SOU
    Stadium 1 added: ”English Premier League”
    Match Type 22 added: ”English Premier League”
    Match 1 imported: CRY - SOU for date "2020-09-12 15:00:00"
    Team 3 added: ARS
    Team 4 added: FUL
    Match 2 imported: ARS - FUL for date "2020-09-12 15:00:00"
    

    So, the data seems fine. One other option is that the file is not correct. Can you try saving the file with a tool like notepad++ where you can also specify/convert encoding of the file (should be UTF-8).

    p.s. you can find the file that I tested with, here.

    Hi Crodat
    Can i have your excel spreedsheet for EPL 2020/2021 season?
    My email is [email protected]

    Thank you

    Thread Starter crodat

    (@crodat)

    Perfect, it now works – Thanks Antoine.

    In Notepad++ I had to select

    Encoding > Encoding in UTF-8

    Then when I saved it, I just had to type the .csv extension and it’s imported fine.

    Thread Starter crodat

    (@crodat)

    Although, I sporadically get the message:

    Column 1 header should be “play_date” ? not “?play_date”

    Plugin Author AntoineH

    (@antoineh)

    Make sure you choose “UTF-8” and not “UTF-8 with BOM”. The latter will not work and I think causes the problem that you mention.

    p.s. extension can also be .txt or anything else, that doesn’t matter for the script.

    Thread Starter crodat

    (@crodat)

    Thank you, this now works.

    I had to select encoding as ‘UTF-8 without BOM’ in Notepad++.

    Saving as .txt also worked.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding Bulk Matches’ is closed to new replies.