-
Notifications
You must be signed in to change notification settings - Fork 106
No feedback if OPML import contains no feeds or folders #924
Comments
Method is here: https://github.com/owncloud/news/blob/master/js/service/OPMLParser.js#L60 We should validate it, and if needed throw an exception which is caught here: Should we use an alert for showing the error message? @cosenal @jancborchardt any ideas on how to show proper feedback? |
I haven't looked at the code, but when we provide a badly formatted |
Yep, good suggestion. A slightly better error message could be »Wrong file format. Please choose an OPML file.«? |
Ok, after going through the issues I can not reproduce it. If I upload an invalid OPML file I'm getting: Error when importing: file does not contain valid OPML |
It happened to me while uploading a There is an (almost) empty gpx file (renamed export.txt because of github limitations) with which the bug occurs. I'm running News 6.1.1 over Owncloud 8.2.2 installed from the Owncloud repositories on a Debian stable with Apache 2.4.10, Php 5.6.17-0 and Mysql 5.5.47-0. I hope this is enough info to reproduce the bug. |
Ok, so the solution is basically to show an error message if no feeds or folders are found |
I agree, but I guess there are two distinct errors:
I think that those two errors are quite different: the first is a bad manipulation from the user, while the second might come from a BUG on the tool used to generate the OMPL export. |
Marking this as a junior bug because its very easy to fix and a low priority bug :) Tips: is a JavaScript object that has a list of feeds and folders: {feeds: [], folders: []} All that needs to be done is to test if both of them are of length 0 and then throw an exception (which will be caught here: https://github.com/owncloud/news/blob/master/js/controller/SettingsController.js#L76) The error message also needs to be improved to reflect the additional erorr state: https://github.com/owncloud/news/blob/master/templates/part.settings.php#L97 by simply adding the additional failure cause or by adding a new type of error on the settings controller. The JavaScript needs to be compiled using gulp, instructions are here https://github.com/owncloud/news/tree/master/js#javascript-development |
Hi,
I had troubles importing an
.opml
file into owncloud new application. After a while wondering why nothing was happening I realized that I was importing a wrong file which was not an opml file. Sadly Owncloud didn't tell me about my mistake.David
The text was updated successfully, but these errors were encountered: