Bug 356233

Summary: File is not writeable when creating a new collection
Product: [Applications] parley Reporter: Dimitris Kardarakos <dimkard>
Component: editorAssignee: parley bug tracker <parley-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: cordlandwehr, dimkard, gmx, godfried.borremans, kdebugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Popup error
[PATCH] Call saveAs setting file type to Kvtml and transform url to local file format

Description Dimitris Kardarakos 2015-12-03 10:52:19 UTC
I managed to bypass the crash of https://bugs.kde.org/show_bug.cgi?id=356104 which prevents new collection functionality from being initiated, by moving /usr/share/parley/plugins/google_images.desktop to /usr/share/parley/plugins/google_images.desktop.bak.

When I try to save my dummy collection somewhere in my home folder, I get the following in command line:

"Cannot write to file file:///home/dimitric/test_collection.kvtml"
SaveAs failed for  "Untitled"  
why  "File is not writeable."

and a ...File is not writeable pop up error.


Reproducible: Always

Steps to Reproduce:
1.Move or delete /usr/share/parley/plugins/google_images.desktop
2.Open Parley
3.Click "Create a New Collection"
4.Select any language pair (E.g. English - English),
5. Add a dummy pair
6. Try to save

Actual Results:  
File is not writeable popup error

Expected Results:  
Collection to be saved
Comment 1 Dimitris Kardarakos 2015-12-03 11:08:15 UTC
Created attachment 95877 [details]
Popup error
Comment 2 Dimitris Kardarakos 2015-12-08 12:44:36 UTC
Created attachment 95935 [details]
[PATCH] Call saveAs setting file type to Kvtml and transform url to  local file format

Applying this patch in conjunction with removing plugins/google_images.desktop I have managed to create and save new vocabulary collections.

Not sure at all if this is the proper approach to follow since I am just a user of the software.
Comment 3 Andreas Cord-Landwehr 2015-12-08 13:06:21 UTC
Comment on attachment 95935 [details]
[PATCH] Call saveAs setting file type to Kvtml and transform url to  local file format

Hi, patches tend to get lost in Bugzilla. Could you submit the patch directly at reviewboard.kde.org?
Comment 4 Dimitris Kardarakos 2015-12-08 13:35:12 UTC
Since I'm not aware of the "review board" process, I need to follow the instructions presented here: https://techbase.kde.org/Development/Review_Board ?
Comment 5 Andreas Cord-Landwehr 2015-12-08 13:40:23 UTC
It's actually much easier than described there. (That description is mostly for power-users.)
You can simply login in the webinterface at reviewboard.kde.org (using your KDE identity account; you can create it yourself at identity.kde.org, in case you do not have  one yet), select Parley as application and "kdeedu" as review group, and submit the patch for review.
Comment 6 Dimitris Kardarakos 2015-12-08 14:03:58 UTC
Thanks. 
I add it here just as a reference: https://git.reviewboard.kde.org/r/126279/
Comment 7 tz1 2015-12-23 11:43:29 UTC
Is this bug fixed now ? It persists on my installation.
Comment 8 Andreas Cord-Landwehr 2015-12-30 18:58:39 UTC
Git commit 0cb9b9aea2264fc66d25fb6d93adc32c75dfef97 by Andreas Cord-Landwehr.
Committed on 30/12/2015 at 18:54.
Pushed by cordlandwehr into branch 'master'.

Fix Save-As functionality.

File system operations like QFile require paths instead of URLs, which
is the difference between the uses of:
* url.toDisplayString -> file:///the/path
* url.toLocalFile -> /the/path
Correctly use toLocalFile for all file system calls.

M  +2    -2    keduvocdocument/keduvocdocument.cpp

http://commits.kde.org/libkeduvocdocument/0cb9b9aea2264fc66d25fb6d93adc32c75dfef97
Comment 9 Jeremy Whiting 2016-02-15 21:01:57 UTC
Git commit 8c8cf0290332c0c6c0bf5b1c7248ff066aa25022 by Jeremy Whiting, on behalf of Andreas Cord-Landwehr.
Committed on 15/02/2016 at 21:01.
Pushed by whiting into branch 'Applications/15.12'.

Fix Save-As functionality.

File system operations like QFile require paths instead of URLs, which
is the difference between the uses of:
* url.toDisplayString -> file:///the/path
* url.toLocalFile -> /the/path
Correctly use toLocalFile for all file system calls.
(cherry picked from commit 0cb9b9aea2264fc66d25fb6d93adc32c75dfef97)

M  +2    -2    keduvocdocument/keduvocdocument.cpp

http://commits.kde.org/libkeduvocdocument/8c8cf0290332c0c6c0bf5b1c7248ff066aa25022
Comment 10 Dimitris Kardarakos 2016-02-19 09:53:23 UTC
*** Bug 359448 has been marked as a duplicate of this bug. ***