Calendar - Cannot move certain events

Hi

I have made Updates from 8.0 to 10.0.10.

After that the calendar-app had to be installed new.
Now I have all events in there but I cannot move/change certain events.

I will collect logs, but has anyone had something similar already, an internet search did not bring up results so far.

Konsole log- in German (loading inline resource seems blocked)


Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert (“script-src”).

calendar:1:1

JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:552

Attempting to call a FullCalendar method on an element with no calendar.

vendor.min.js:1:349786


How do I repair this, Allow cross-site scripting?

I have another instance with the same version and updatehistory on the same server.
Both have now PHP 7.2.
I can move new events on both. The one where I cannot move or alter events has 10 calendars and more users, the one that should be able to move the event is now administrator. But it still will not work.

Regards,
Jan

I would try to export the calendars followed by an import into newly created calendars.

Hi,

thanks for the reply.
When I export one calendar and I run an import on the identical install then I get 20 errors.
I imported twice with the same result.

It seems to work because I can move the events in the other install.
Any idea where the erronous events land, that would be awfully helpfull.

Does someone have another idea? Correcting 10 calendars with hopefully less errors is a lot of manual work to do.

Regards,
Jan

On a newly created calendar? What kind of errors?

You could validate your exports here and fix if required.

Hi,

thanks for the link.
The one with the 20 errors in Owncloud returns 0 errors in the validator. The file is only 24 Kb.
That I do not understand.

Another calendar is 856,1 Kb and returns 654 Errors.

I need to check the PHP settings, because I guess there is not enough Memory etc. to run the import which is using a considerable amount of CPU-power on the server.

I have PHP 7.2.18 FPM serviced by Apache. It is a Vserver with ubuntu 16.04 on which more Sites/Apps are hosted.

I have taken a look at the ICS-Files and there are records with 2 or more LAST-MODIFIED entries,
that produce errors importing the data, Owncloud does not accept that.
“Validation error in iCalendar: LAST-MODIFIED MUST NOT appear more than once in a VEVENT component”

So how do I avoid that being exported?

Regards,
Jan

In short, how do I remove extra lines with “LAST-MODIFIED” then only one is allowed in Owncloud.

I have been searching the internet but did not find anything. Editing 650 records by hand in a file of 8500 is not my idea of ICT and I have been in this work for about 35 years now.

In XML, how do I
find all records with more then 1 LAST-MODIFIED
Delete the field(s) LAST-MODIFIED with the oldest Date

If it were Mysql I would be ready.

Regards,
Jan

True, but then you should also know, that sh** happens and that it should be no real problem to fix that issue. To keep things simple, you could get rid of all those entries with

grep -v LAST-MODIFIED your_export.ics > fixed.ics 

followed by an import of fixed.ics into a new calendar.

Keeping just the newest of multiple LAST-MODIFIED entries is more complicated to fix. You have to decide whether it’s worth the efforts it will take.

Thank you very much Alfredb!

I have been digging in the database and the code. It was about midnight and I was tired because as you say, sh** happens which is exactly what happens in more apps at the same time (ran into a Plesk-bug).

I will do what you propose, then the ones using the calendar do not use the last modified date.

Talking about sh**, a thunderstorm with lightning is building up now (12.21 in upper-Austria) I must shutdown my PC then I already lost one PC this way for a year.

Again thanks.

Regards,
Jan

1 Like

OK
I have exported and imported, and used the bash-command to clean the ics-file.

Still a lot of errors have occurred. So I have been looking inside the ics-files.
Obviously a load of old events were in the OC 8.2 install. I have restored the old version next to the new one so no events have disappeared.

Two things remain,
1.
if the import notifies about errors it would be awfully nice to dump the erronous events in a file so one can consider if these need to be restored or not.

it should be possible to “archive” old events, for example in an ics-file.
I have been searching in the DB-structure how the data is saved and if I could extract the data with Mysql but did not even find the files in the field “uri” .

Does anyone have a hint where I should start reading to figure his out?

Regards,
Jan

Did they pass the validator? What kind of errors remain?

Personally I think this is beyond the scope of an importing function. The import file has to be valid, period.

Even if I don’t use this app for my calendar maintainance, here I’m with you. Please feel free to submit a feature request.

Hi alfredb,

I did not run the validator anymore because it did not show errors in the files that dropped 640 events as errors. I guess these are old events that once have been imported out of some exchange-calendar.
I found these in the ics-file.

I agree that the import file should be valid but, if I export and import then the exported file should be valid as well and it was not . . . .
This is not specific for Owncloud, I rewrote the template to export to ics for “booked” a resource-planning php software.

Since the (software)world is not perfect, listing what was rejected is mostly very helpfull.

I will submit 2 feature requests for both owncloud and nextcloud, the problem is the same in both.

Thanks for the help. I must continue with other updates now . . . .

Regards,
Jan

1 Like

Yes, of course it should. But you export came from an oc8 instance, I think there were bigger changes since then.

Good luck for your future work!

Hi alfredb,

the export came from version 10.0.0.1.
The problem with events that could not be moved was discovered after the update(s) .
So all events were in version 10 already.

I guess I must put some time to document what happened in detail for the developers.

It seems during the update the content of the db is not checked against newer ICS-specs.
As far I could see events are saved in the database in a binary blob, making manipulating a bit more difficult.

btw are you from germany?

Regards,
Jan