konradrenner / kolabnotes-android

Note taking app with integrated Kolab sync
GNU Lesser General Public License v3.0
68 stars 17 forks source link

newline #156

Closed quiricada closed 7 years ago

quiricada commented 7 years ago

debian8 -copied a tomboy note and pasted to a new note in my kolab server. -after sync -note appear in kolabnotes -modified note in kolabnotes -after sync -modified note in my kolab server, however, the newline formatting is gone, all the text are in one long line

is this a problem with LF vs CR/LF conversion?

konradrenner commented 7 years ago

Hi, can you please send me/attach such a note? It is possible to export notes in the Kolab Notes app. I will have a look at it.

Thanks!

quiricada commented 7 years ago

tried exporting.

there's a toast message: turn on Documents turn in Settings > Installed apps first

i checked kolabnotes permission, access and change files on internal storage is on, access accounts on device is on.

tia

konradrenner commented 7 years ago

I can export my notes without any problem :-/. I have created a small desktop companion app for note syncing https://github.com/konradrenner/kolabnotes-fx can you try syncing the notes with this app on an PC/Mac an tell me if there are the new lines also gone? Or is it possible to copy such a tomboy note in a plain text file and attach it here?

quiricada commented 7 years ago

my mistake, had to enable the Document app. here is the exported note

i did a test note. = in kolab/roundcubemail, it shows as 123 456 789 = in kolabnotes, it shows as 123 456 789

Notes.zip

quiricada commented 7 years ago

i think the problem may be with kolab/roundcubemail?

created 2 notes

= test having line spaces i entered 123 456 789 then saved it it displayed ok in kolab notes, it's like double spaced lines

= test without line spaces i entered 123 then saved it then append 456 789 then saved it again in kolab/roundcubemail it displayed as single spaced lines 123 456 789 while in kolabnotes it displayed as one long line 123 456 789

computer.zip

quiricada commented 7 years ago

in kolab/roundcubemail

= test having line spaces (displayed as double space line) abc

def --- the source code is:

abc

def

= test without line spaces (displayed as single space lines) abc def --- the source code is:

abc
def
quiricada commented 7 years ago

in kolab/roundcubemail

= test having line spaces (displayed as double space line) abc

def --- the source code is: "

abc

def

" = test without line spaces (displayed as single space lines) abc def --- the source code is: "
abc
def
"
quiricada commented 7 years ago

sorry, don't know how to comment the html codes

konradrenner commented 7 years ago

no problem, I will have a look at it this weekend

konradrenner commented 7 years ago

I had a look at this problem, but I can't reproduce it. When I open your testfiles, everything looks good. Which Android version do you use? Do you use a custon ROM? Which version of the app do you use?``

quiricada commented 7 years ago

Roundcube Webmail 1.2.3-3.1.el7.kolab_16

Plugin Version License acl 1.6 GPLv3+
archive 2.4 GPLv3+
calendar 3.2.8 AGPLv3 contextmenu 2.1.1 GPL-3.0 jqueryui 1.10.4 GPLv3+
kolab_activesync 3.2.8 AGPLv3 kolab_addressbook 3.2.8 AGPLv3 kolab_auth 3.2.8 AGPLv3 kolab_config 3.2.7 AGPLv3 kolab_delegation 3.2.8 AGPLv3 kolab_files 3.2.8 AGPLv3 kolab_folders 3.2.8 AGPLv3 kolab_notes 3.2.8 AGPLv3 kolab_tags 3.2.8 AGPLv3 libcalendaring 3.2.8 AGPLv3 libkolab 3.2.8 AGPLv3 managesieve 8.6 GPLv3+
newmail_notifier 0.8 GPLv3+
odfviewer 3.2.3 AGPLv3 password 4.1 GPLv3+
redundant_attachments 1.1 GPLv2
tasklist 3.2.8

for the "test without space" in kolab/roundcubemail/notes create a note, just enter "testing" (don't press the Enter key) then immediately click the Save button there'll be a popup save successful message edit the note again press Enter key to create a new line you'll see that there's no double line spacing between lines.

for the "test having line spaces" in kolab/roundcubemail/notes create a note, enter the following 3 lines testing testing1 testing2 you'll see the lines are double-spaced

if you click on the source code button (with <> icon), you'll see the html code is different for the 2 notes

quiricada commented 7 years ago

zte nubia z11 Device type Android Protocol version 14.1 User agent Android/6.0.1-EAS-1.3 rom: miui8 on cyanogenmod13

xiaomi mi5 Device type Android Protocol version 14.1 User agent Android/7.0-EAS-1.3 rom: global miui8

i have kolab notes installed in both devices

on the zte, it's working and sync properly with my kolab server, the only problem being the line spacing issue as stated above.

on the xiaomi, cannot connect to my kolab server. i copied the working config from the zte to the xiaomi and all i get is nothing. is there a log somewhere?

another thing, in kolabnotes, when i export the notes, if i modify the default filename, it will come back with an export cancelled. eg. export to "Notes", if i modify it to "Notes1", it will come back with an export cancelled message.

quiricada commented 7 years ago

zte and xiaomi kolabnotes 2.4.0

konradrenner commented 7 years ago

rename of the exported notebook during export is not possible at the moment.

konradrenner commented 7 years ago

please do not copy settings between devices, please recreate the accounts on each device. this is the only way which is supported for creating accounts at the moment

konradrenner commented 7 years ago

for the line spacing: I cannot reproduce it :-/ everything works as expected on my test systems (Remote Kolab server, smartphone sony android 7, tablet stock android 7.1, emulator stock android 6, emulator stock android 7). Maybe it is a problem with the ROM?

Is sync working on your Xiaomi device, if you create an account via account setup?

quiricada commented 7 years ago

re copy settings =i use the settings of the working device. eg account name: superman server: kolab.krypton.com email: clark.kent@krypton.com i use these same data on both devices

for my xiaomi, i have tried adding an account in kolabnotes setting; also tried in settings/other accounts of the device. it's not syncing.

i have my own kolab server running in a virtualbox centos7 vm on a debian8 host. the kolab server version as in previous message.

am guessing the problem is in the roundcubemail end. the html code of the 2 notes are: (i added the comment tags)

for the double-space line note <!-

testing

testing1

testing2

->

for the single-space line note <!-

testing
testing1
testing2

->

quiricada commented 7 years ago

sorry, i thought the comment tags would work. anyway, if you inspect the html code, you'll see the tags different,

in the double-space line note, each line is bracketed by "p" and "/p"

in the single-space line note, the whole note is bracketed by "pre" and "/pre"

konradrenner commented 7 years ago

for the sync issue: normally an android notification is displayed and this notification shows details about the error why the sync not worked. did you get such a notification?

What operating system are you using for opening the Kolab Webclient (Windows, Linux, Mac OS)? And which browser? Maybe there is a constellation which does not store line breaks like my test environment.

quiricada commented 7 years ago

sync no error messages, notifications or toasts. that's why am looking for some kind of logs or whatever.

debian9 stretch, firefox 52.0-1

my guess on the roundcubemail kolab webclient =if you enter a few words then immediately click the save button without hitting the Enter key, the entire note becomes a preformatted text with the "pre" tag.

=if you enter a few words in several lines (words with Enter key in between) then click the save button, the lines are tagged as paragraph with the "p" tag

my guess is that the webclient is trying to be "smart", during new note creation, if no (Enter key) newline/CR/LF is detected in the note during the initial save, the entire note becomes a preformatted text with the "pre" tag, otherwise it defaults to paragraph for every newline/CR/LF.

konradrenner commented 7 years ago

ok thx, now I got the point. But I think I cannot fix it in the app. Maybe the webclient should at
(line breaks) so that the note has the breaks correct. I don't want to create a "hack" for a behaviour of the web app :-/ .

for the sync problem: what happens on this device if you "swipe refresh" in the note overview of the account in the app?

quiricada commented 7 years ago

agree, i don't think hack is the way to go.

on swipe down, the refresh icon pops up, then disappear; no messages or notifications; not syncing either.

konradrenner commented 7 years ago

This is really strange, but I afraid that I cannot fix it, because on other devices it doesn't have this problem :-/ , maybe the ROM has a bug. Sadly I don't have this device so I cannot test it. But what I will have to do is providing better logging, I have already a task for this.

quiricada commented 7 years ago

logs would be nice.

thanks much for everything.

konradrenner commented 7 years ago

thank you for using the app and reporting!

konradrenner commented 7 years ago

issue #143 is the issue for implementing better debug output. if you are watching this issue you will know when better debug output is available ;-) . But I can't promise when it's done