Bug 386988

Summary: Schedule > Publish Item Information - Error: Unable to publish the item '...'
Product: [Applications] korganizer Reporter: Dennis Schridde <dennis.schridde>
Component: invitationsAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: Jochen.Trumpf, winter
Priority: NOR    
Version: 5.6.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=384122
Latest Commit: Version Fixed In:

Description Dennis Schridde 2017-11-16 14:41:25 UTC
In KOrganizer, I follow this proceedure:
* Select a particular event that is broken
* Click Menu Bar > Schedule > Publish Item Information
* The list of attendees is being presented to me in a new dialogue titled "Select Addresses"
* I press OK
* A new dialogue opens, titled "Error", with the contents: Unable to publish the item '<TITLE>'.  There is no further explanation.  No email will be send.

The following has a similar, also broken, outcome:
* Click Menu Bar > Schedule > Send Invitation to Attendees
* A new dialogue opens, titled "Error", with the contents:
Unable to send the item '<TITLE>'.
Method: Request

Version:
* KDE neon User LTS 5.8 (current / up-to-date)
* KOrganizer 5.6.3 (cannot be selected in Bugzilla)
Comment 1 Dennis Schridde 2017-11-16 14:56:05 UTC
Some more poking around in the event suggests that the problem is related to the number of attendees: If I reduce the list to only one item, the email gets send when changing the event and pressing "Apply".  When I add a second item to the list of attendees and press "Apply", nothing happens.  It appears not to be related to the actual email-address or names that are on the attendee list: No matter which ones I remove the email gets only send when there is only one person left on the list, and it does not matter which person that is.  I can also recreate the event from scratch, using the same title, location and description, and the issue will always be the same.  I also tried altering the title slightly or shortening the description, but that had no apparent influence.
Comment 2 Allen Winter 2017-11-16 22:10:43 UTC
do you see a message in your console?
there should be a critical string printed in your console "Publish failed. Unable to publish the item ... "

can you show me that entire string?
Comment 3 Dennis Schridde 2017-11-20 10:51:49 UTC
The console output is:

Input: "Name Family <VALID_EMAIL_ADDRESS>, N\xC3\xA4me Family <VALID_EMAIL_ADDRESS>, Name Family <VALID_EMAIL_ADDRESS>, Name Family <VALID_EMAIL_ADDRESS>"
Error: "The email address you have entered is not valid because it contains an unexpected comma."

The names and email addresses are all different.  What is notable is the 2nd address, which contains an 'รค' (A-umlaut).  But I assume the "unexpected comma" refers to the separator of the email addresses, which is for whatever reason being treated as part of the email address?
Comment 4 Allen Winter 2017-12-09 13:54:57 UTC
Git commit 6a21943409cd9b943dada65a37d0b831fed197da by Allen Winter.
Committed on 09/12/2017 at 13:41.
Pushed by winterz into branch 'master'.

publishdialog.cpp,h - validate email address string before accepting

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

M  +21   -2    src/publishdialog.cpp
M  +3    -0    src/publishdialog.h

https://commits.kde.org/akonadi-calendar/6a21943409cd9b943dada65a37d0b831fed197da
Comment 5 Dennis Schridde 2018-01-03 13:07:52 UTC
(In reply to Allen Winter from comment #4)
> Git commit 6a21943409cd9b943dada65a37d0b831fed197da by Allen Winter.
> Committed on 09/12/2017 at 13:41.
> Pushed by winterz into branch 'master'.
> 
> publishdialog.cpp,h - validate email address string before accepting
> 
> Differential Revision: https://phabricator.kde.org/D9263
> 
> M  +21   -2    src/publishdialog.cpp
> M  +3    -0    src/publishdialog.h
> 
> https://commits.kde.org/akonadi-calendar/
> 6a21943409cd9b943dada65a37d0b831fed197da

Looking at the commit, I wonder whether it really addresses the "multiple attendees result in a broken event" problem.  Can you please confirm that?

Judging from comment #1 and comment #3, the issue appears to have been multiple people in the list of attendees would be joined them together into one attendee at some point in the pipeline.  Hence the validation function would complain that an email address may not contain a comma, which might be a legit complaint, but was not actually input by me like that.
Comment 6 Allen Winter 2018-01-03 15:57:52 UTC
now you should see a warning dialog with a real explanation as to the failure condition, instead of failing silently.

if the users think the email address is just fine, then the bug is with the email validator and not with korganizer
Comment 7 Dennis Schridde 2018-01-03 17:34:43 UTC
(In reply to Allen Winter from comment #6)
> now you should see a warning dialog with a real explanation as to the
> failure condition, instead of failing silently.
> 
> if the users think the email address is just fine, then the bug is with the
> email validator and not with korganizer

The issue was that the email addresses of all attendees were fine individually, but they got smudged together into one string (separated by commas), which made something further down the stream trip.

While I understand that the referenced commit adds better error reporting, the problem itself (some part communicating the attendee email addresses in a format that the next component in line does not understand / reject, while sending out the invitations) does not seem to be fixed.
Comment 8 Jochen Trumpf 2018-03-26 01:01:18 UTC
I suspect the underlying reason for the error is the same as in bug #384122.
Comment 9 Dennis Schridde 2018-03-26 12:39:12 UTC
(In reply to Jochen Trumpf from comment #8)
> I suspect the underlying reason for the error is the same as in bug #384122.

I believe this is fixed in KOrganizer 5.7.2 / KDE Apps 17.12.2 / KDE Frameworks 5.43.0 / Akonadi 1.13.0 (Fedora 27).

Maybe https://commits.kde.org/akonadi-calendar/5765ecd1595232d2bd9724c2f95e9faa600d9da1 , as mentioned in bug #384122, is related.