Jump to content

iCal calendar feed gets imported multiple times


Maxxius

Recommended Posts

hi, I got this problem where I noticed that a feed from which events are imported automatically get imported multiple times of the same content.

thing is that every few days all the events in that feed past or present events get posted to ips calendar app. over and over and over again.

the problematic feed is this one : https://opencritic.com/calendar
http://c.opencritic.com/calendar/OpenCritic.ics

I made a support ticket and got this response

Events when they are imported have an ID specified on them. This is stored in a table so that we know what has already been imported. On taking a look at the example you gave me, there are actually multiple imported items because there are different IDs. So therefore the system would not know they are the same event, as that is what identifies them.

See the below, and you will see what I mean. The highlighted section is the item in the file which identifies it. Therefore as far as the system is concerned, all 5 are different items (three showing, and two hidden)

0e3aa885f5c20b4121e5e87478fdca90172.png

Is there some sort of other way to fix that feed so it would not get duplicates all the time?

@403 - Forbideen perhaps you know any other game release date calendar feeds?

Link to comment
Share on other sites

If you haveย accessย to edit that feed, absolutely you could "fix" it. I suspect that's not the case, however. You may wish to reach out to the owner of that feed to advise them of the problem. A "GUID" is a globally unique ID, and it should be unique but persistent. What's happening would be akin to you getting a new user ID every time you visited the community, which wouldn't make sense obviously.

Link to comment
Share on other sites

I have passed this info once again to developers of that feed. I say I expect 50/50 chance of them fixing that issue.

Their initial reply to my report was "We'll look into this. Not really sure what's going on, as we import the Calendar multiple places, too. EA and Ubisoft, for example, have internal wiki pages that import the calendar just fine. Perhaps it's a bug with the invisioncommunity plugin?".

So I not holding my breath here and looking to add a "middle-man" or whatever where I could import events from their calendar which it would somehow prevent multiple imports from happening and then export from there into IPS.

Or.... Just or... wouldn't it be interesting if a plugin could be made for IPS calendar which would disallow importing events per ical feed import which have exactly the same title and thus block the feed next time around it comes with a new id but the same event. I can't imagine that causing a problem because event with same names coming from the same ical feed.

Link to comment
Share on other sites

6 hours ago, Maxxius said:

I can't imagine that causing a problem because event with same names coming from the same ical feed.

Absolutely it could.

My son's basketball team is the "Seahawks", and they play each time in their league 3 or 4 times throughout the season. So "Seahawks vs. Sharks" is in the ical download from the league site 3 or 4 times, but with different dates and times. If we just looked at the title, we'd import the event once, and skip the other 2 or 3 legitimate instances.

You could potentially look at the titleย andย the date+time, but honestly if you provide a feed you have a responsibility to set the parameters correctly per the specs.ย https://tools.ietf.org/html/rfc5545#section-3.8.4.7ย Not the word "persistent" which means the value should not change when fetching the feed in the future.

Link to comment
Share on other sites

yeah when you put it like that.. I was just thinking about my own scenarios where same name would not be a problem.. ๐Ÿ˜„

anyhow I have passed all the info you shared here to the calendar devs and they don't know whats going on to. Here's what they asked me to pass on to you. Though I understand its not an invision problem perhaps you can find time to take a look at that:

Quote

Since you do seem eager to help, maybe you can help us find the problem...

Here's our node.js code that manages the calendar:
ย 
ย 
Here's the NPM library we're using to create the ical:
ย 
ย 
Feel free to share this with them. I suspect Invision should look at that ical-generator package, because it's a pretty popular one (and has a sister version on python).

ย 

Link to comment
Share on other sites

Looks like the NPM package supports setting the UID, and if one is not provided (which they're not doing) then the package randomly generates one, which will presumably be different each time it is ran.

I develop in PHP so I'm not intimately familiar with their code, but I suspect they need to (1) map the source column that holds a unique persistent IDย in their CalendarEntrySchema model definition, and then (2) pass that value when mapping the events as the uid..

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
ร—
ร—
  • Create New...