Bug 407965 - Applying two changes in a row in the event editor fails with "Only resources can modify remote identifiers"
Summary: Applying two changes in a row in the event editor fails with "Only resources ...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: incidence editors (show other bugs)
Version: 5.7.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 408898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-26 20:03 UTC by Rickard Westman
Modified: 2020-04-11 07:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
untested incidenceeditor fetchscope patch (592 bytes, text/plain)
2020-04-04 13:41 UTC, David Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rickard Westman 2019-05-26 20:03:06 UTC
SUMMARY

The event editor UI allows you to apply a change immediately by pressing "Apply".  But if you make more than one change without closing the editor in-between, the second one fails with an error dialog.  You then have to cancel out of the dialog to exit it. This happens whether you try to apply the second change using the "Apply" button or the "OK" button.

STEPS TO REPRODUCE
1. Press "New Event..." button and edit the Title field to say "Test"
2. Press "Apply"
3. Edit the Title field to say "Foo".
4. Press "Apply".

OBSERVED RESULT

An error dialog appears after the last step.  The title is "Sorry - KOrganizer" and the message text is: 

"Error while trying to modify calendar item. Error was: Only resources can modify remote identifiers"

When you click OK, you get a warning dialog saying "Unable to store the incidence in the calendar.  Try again?".  If you try again, the first error dialog will show again.  It is possible to work around the bug by exiting the event editor, selecting the event created in step 2 for modification, and then redoing steps 3 to 4.


EXPECTED RESULT

I expected to be able to make many edits to an event, pressing "Apply" after each one, without getting the errors dialogs described.

SOFTWARE/OS VERSIONS

Linux distribution: Kubuntu 18.04
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.44.0
Qt Version: 5.95
Kernel Version: 4.18.0-20-generic

ADDITIONAL INFORMATION

Maybe related to bug #307383, marked as fixed in 2012?
Comment 1 Rickard Westman 2019-05-26 20:10:08 UTC
> You then have to cancel out of the dialog to exit it. 

That came out wrong - I meant that you have to cancel out of the editor since pressing "OK" (re-)triggers the problem.
Comment 2 David Faure 2020-04-04 07:34:12 UTC
*** Bug 408898 has been marked as a duplicate of this bug. ***
Comment 3 David Faure 2020-04-04 12:37:17 UTC
I think I fixed this in https://phabricator.kde.org/D16917 which landed in akonadi commit fbcd065c0dbb, part of tag v18.11.90, i.e. the Applications 18.12 release.

(This report comes from KOrganizer 5.7.3 which Applications/17.12.3.)

I'm just not 100% sure it's fully fixed though, because I had that error message on 03-Jan-2020. But today I can't reproduce it, no matter what I try (with or without the resource running, etc). Puzzling...
Comment 4 David Faure 2020-04-04 13:41:35 UTC
Nowadays, if I could find a way to reproduce this error, I would try
itemFetchScope().setFetchRemoteIdentification(false);
like I did in FatCRM.

Hmm maybe one solution is to revert the D16917 patch to trigger the error more easily...
Comment 5 David Faure 2020-04-04 13:41:56 UTC
Created attachment 127267 [details]
untested incidenceeditor fetchscope patch
Comment 6 David Faure 2020-04-11 07:45:34 UTC
Git commit 7ba473fef78978aee6cdda0cdcead3fa65d3c62b by David Faure.
Committed on 11/04/2020 at 07:45.
Pushed by dfaure into branch 'release/20.04'.

Fix "Only resources can modify remote identifiers" when re-editing event

Summary:
... before the resource had time to create it and notify korganizer
about it.

This seems to be a better fix than akonadi commit fbcd065c0dbb,
which for some reason isn't enough (I had the error again in January
2020).

Test Plan:
Create event in korganizer, double-click it immediately,
change something, click OK.

Reviewers: dvratil

Reviewed By: dvratil

Differential Revision: https://phabricator.kde.org/D28559

M  +1    -0    src/editoritemmanager.cpp

https://commits.kde.org/incidenceeditor/7ba473fef78978aee6cdda0cdcead3fa65d3c62b