CSV import creates duplicated matches instead of replacing it
-
CSV import creates duplicated matches instead of replacing them.
Is possible to replace them somehow when they are imported?
I suggest to add an option to ask the user if he needs to replace or add the matches imported.
Thank you!
-
Hi @kaichi ,
A more advanced export-import feature will be available probably in the next version of SportsPress. You can try this feature (please make a backup first!!!) from here: https://github.com/ThemeBoy/SportsPress/pull/401
With this you can export your events, alter any info you want and then import them back to auto-update the existing events without creating any duplicates. The same with players, teams etc.
Thanks,
Savvas@savvasha thanks, indeed imports are quite important and that creates always duplicates is quite annoying.
I will try the feature that you suggested.Awesome! Please let us know how it works for you.
Thanks!
I noticed that with this version of the plugin was added ID of the match that I think could be the solution, since we overwrite the same ID. However the match is not created.
This is what I did:
1. I downloaded this version of the plugin.
2. I installed and activated it.
3. I exported the Fixtures sample file (is not updated with the plugin fields)
4. I imported the Fixtures sample file with additional data that was missingNote: In the ID field I tried to insert an integer: “1” and a unique number: “202101” and nothing.
Results:
The system creates teams and soccer fields, if they don’t exist. But the match is not created.Hi there!
Thanks for your reply.
Did you use the correct event ID to be udpated? You can find them in the wp-admin, in the URL bar for the edit screen of a specific event:
https://prnt.sc/14xdk1qRandom IDs won’t work indeed, if you provide an ID that doesn’t exist the system assumes it was an error and it won’t create the event.
Thanks!
Hi @rochesterj
Thanks for the reply, Yes indeed was a random ID, but for those new item? Is not possible to create new events with this method then..Hi!
For new items you need to leave them blank, I’m assuming. Or maybe it’s a different importer?
I haven’t used this branch so far, so I’m not sure. I’ll test it later tomorrow.
Thanks!
Hi guys! Sorry for not responding earlier…
@kaichi if you want to create new events, then you should leave the ID field empty. If you add an existing ID then the event will be updated.
Thanks,
SavvasHello guys,
Actually I tried again to import the events but nothing.. it says 0 matches imported and indeed are not imported.Maybe I missed some steps. What are the steps that you did?
Thank you!
Hello guys,
I found another issue:
With this version of the plugin, is true that the match is not duplicated, but it is duplicated the box score, causing the display of duplicated score in the table result.
ie: if you import 3 times the same match (2:9). The score table will be: 2:0 2:0 2:0ie: if you import 4 times the same match (2:9). The score table will be: 2:0 2:0 2:0 2:0
It is not even possible to delete those duplications from the match editor.
Please any advice?
-
This reply was modified 3 years, 10 months ago by
Kai.
Hello,
Unfortunately I had to remove everything and disable the plugin, due to the issues. However I show you where is the issue in the backend:
https://we.tl/t-VwGBKFsSNXAnd this is the issue in frontend:
https://we.tl/t-rraeWAGisiAnyway, it’s very weird, I’m the only one with this issue?
Hi @kaichi ,
This is very strange. I just follow the same procedure as you and everything worked as it should. The results were updated, no duplicate values.
https://snipboard.io/N1voH6.jpg
https://snipboard.io/uA0bhQ.jpgThis is the csv I used:
ID,Date,Time,Ground,Clubs,Results,Outcome,Players 46,2020/09/25,20:00:00,Kensington,Kangaroos,1|1|2,loss,"Blake Bannan" ,,,,,,,"Hugo Stones" ,,,,,,,"Tristian Holme" ,,,,,,,"Mason Ewing" ,,,,Bluebirds,1|2|3,win,"Mario Bellucci" ,,,,,,,"Aiden Leggatt" ,,,,,,,"Seth Clemens" ,,,,,,,"Mitchell Childe"
Thanks,
SavvasHi,
any news when this is going to be added to the stable release, this will be a very important functionality for my current project 🙂
Best regards,
SebastianHello,
Actually this topic was flagged as “Resolved”, but it is not.I noticed that this issue is old (more than 1 year): https://wordpress.org/support/topic/importing-events-creates-a-new-event-instead-of-updating-the-existing-one/
This feature is quite important, so please if you can fix it.
In my experience I found a way to assign an id to each match (but not totally working), so maybe this could be the solution: Adding a column with ID in the import, so when importing the events in the file we use the same ID used in the Fixtures.
Another point: When importing the events, it’s missing the matchday column implemented in the Fixtures.
This plugin so far is the best plugin about managing sports, but has this issue. If you can fix it could be great!
Thank you! -
This reply was modified 3 years, 10 months ago by
- The topic ‘CSV import creates duplicated matches instead of replacing it’ is closed to new replies.