Bug Report

104 views
Skip to first unread message

bacci...@gmail.com

unread,
Dec 19, 2016, 2:51:34 AM12/19/16
to mementodatabase
I really like memento database and i've been using it "furiously" in the past few days because it really seems to be the right piece of equipment i was looking for. However there are a few bugs that are really getting in my way. 

1. Visualization bug:  In one of the tabs, in visualization mode it eats up the first row. No idea why, I haven't noticed this problem in other libraries so far. Screenshots below. This is quite annoying but not like the next one.


2. Javascript doesn't seem to work on mobile version. Screenshots below.


------------------------------------------

The next ones aren't really bugs but i think more design issues, bear with me:

3. If i create a link between 2 libraries, say A and B, in library B a field will automatically appear. For some reason I cannot access this field from the desktop version, only from the mobile. This field cannot be customized in any way, sometimes it shows the title and sometimes it doesnt. 
The most annoying and confusing thing about this is that there are options on the mobile version that are not available on the desktop one, i think it's nuts and it has got to be straightened out..!

I think this is it for now, thanks to the memento staff in advance!

Alessandro
Visualization1.png
Visualization2.png
Visualization3.png
JS1.png
JS2.png

bacci...@gmail.com

unread,
Dec 19, 2016, 3:00:14 AM12/19/16
to mementodatabase
I realized that I didnt specify what kind of problems I experienced with JS.. So, in the screenshot JS1 you can see that the values below, which are JS fileds, show up duplicated for some reason, while on desktop they display totally fine.

In the second screenshot (JS2) The out put string ('EUR' + x) shows fine on desktop but on mobile it's "NaN". 

The only thing these have in common is that they're JS outputs.

Cheers!

Eugene Kartoyev

unread,
Dec 19, 2016, 4:25:52 AM12/19/16
to mementodatabase
I suppose you calculate X based on the superficie, which shows duplicated, thus the mismatch...


Show both the scripts, please.

Bill Crews

unread,
Dec 19, 2016, 9:59:21 AM12/19/16
to mementodatabase
Alessandro replied directly to an email of mine, so it does not show here. I think he intended that it should, so here it is...

"I updated the JS algo as advised but nothing changed. Still works on desktop and still displays NaN on mobile.

Maybe you guys can suggest me an alternative algorithm using the Calculation field instead? That seems to work fine but I don't know how to use it when it comes to multiple-choice check boxes.

Thank you"

In my opinion, it would be better to debug the JavaScript, rather than give up on it. Neither I nor Eugene (I believe) have experienced JavaScript to be failing in Memento, although one does have to understand the context of a JavaScript field and that of a trigger script.

The script as Eugene wrote it works on Eugene's tablet, on my tablet, and on my phone. I am running release 4.1.0 on a Samsung Galaxy Tab S2 and a Samsung Galaxy S6 running Android 6.0.1. What are you running? Do you have the box checked to load the moment.js library?

Bill Crews

unread,
Dec 19, 2016, 12:08:38 PM12/19/16
to mementodatabase
OK, after further testing, using the field name starting with '%' causes errors in expression evaluation. If I change the field name to just 'Margherita', it works fine. The leading '% ' kills it, even without syncing to Google Sheets.

While Vasya's assertion in his User Manual was that any UTF-8 string may be used as a field name, I think mine in http://wiki.mementodatabase.com/index.php/Field is more accurate. He probably wrote that before there was such a thing as a Calculation field or any JavaScript. I'll (eventually) test all the field names I can think of with special characters in certain positions that would result in expression evaluation errors and document them in the wiki. But in the meantime, people should just be wary of leading or trailing special characters and probably also of embedded special characters in file names.

Eugene Kartoyev

unread,
Dec 20, 2016, 3:03:58 AM12/20/16
to mementodatabase
Well, guessing may take infinity...

Then, the only resort I see is to make a copy of the library's structure, fill it with a couple of fake data, upload it to Memento Cloud. You will be offered to share it with other users. So, you provide a temporary public access to your library and provide the link to us. I could be anything - names, scripts, order of fields... After trying it on onther devices and seeing what's wrong, you can revoke the access.

Otherwise, we are not able to reproduce the problem.

Bill Crews

unread,
Dec 20, 2016, 8:38:12 AM12/20/16
to mementodatabase
Make a copy of the library's structure (copies field scripts, but not triggers)

- The Libraries List screen
- 3-dot menu on library icon
- Copy
- Structure Only

Fill it with a small amount of fake data

- Just create enough entries (probably just one or two) to fully demonstrate the problem

Upload it to Memento Cloud

- The Libraries List screen
- 3-dot menu on library icon
- Upload To Cloud
- "Uploaded" message. Press NEXT button
- Message. Press PERMISSIONS button.
- Cloud card. Who has access > Public Access
- Edit Permissions card. Change all Deny to Allow.
- Press checkmark.
- Back to Cloud card. Press Library Address at top. Select your email client.
- Enter Eugene's and my email addresses
- Send email.

Later, revoke access

- The Entries List screen
- Swipe right-side left to bring menu out
- Press Cloud, get Cloud card
- Press Who Has Access > Public Access, get Edit Permissions card
- Press Trash Can icon and then YES
- Optionally, on Cloud card, press 3-dot menu > Delete from cloud

Eugene Kartoyev

unread,
Dec 20, 2016, 10:26:44 AM12/20/16
to mementodatabase
Alessandro, check out the video on how I would solve it

https://youtu.be/K6BOg_5Xbow

bacci...@gmail.com

unread,
Dec 20, 2016, 10:58:54 AM12/20/16
to mementodatabase
Thanks Eugene and Bill! Awesome!

Bill Crews

unread,
Dec 20, 2016, 11:22:47 AM12/20/16
to mementodatabase
Yes, it's not clear what contaminated these fields, but it wasn't the expression itself, because Select All and Copy worked fine. The fields had to be recreated.

Thanks, Eugene.

Eugene Kartoyev

unread,
Dec 20, 2016, 12:33:11 PM12/20/16
to mementodatabase
Well, Bill... thank you for thanking me. Your part was absolutely indispensible too.

As I already said - there are always surprises when people use names that contain non-letter symbols. **Especially** when the opeation involves sync transactions.

The thing is that % is treated as a prefix for url letter encoding. Thus %20 stands for a space, %3b stands for a + etc.

I ran into this problem when users sent me reports on mistakes in my application. They wrote me questions, for example, why does the program work in the folder "notes", but doesn't in folder "video"? So, I say - write me the whole path. They write, something like, path to note is


"file:///storage/emulated/0/notes/my_awesome_note.txt" - a great file name!

and then I see the path to the video, something like

"file:///storage/emulated/0/videos/everyone **is** <happy & gay> ヽ('v')ノ - [esp. ♡M@rry♡!]/%%% New Year+Christmas %%%/¿¿¿where is my bottle???/jingle bells.avi"


I say, like - Hey! Those +×÷=%@#$?/^& are all images! Thou shalt not peruse any graven images! Especially in the names of Files! Make names with letters allowed in your passport name/surname fields only!

But people like icons. So, I had to catch and override them in my app before feeding the pictograms to the system.

It is fine when you only work with one outlet - like a file-browser. But, I suppose, it won't be possible when it is a complex app like memento, where you have syncing with different clouds, database, Google Sheet... a couple of dozens of field types.... so, I suppose it would be more secure and effective to be more restrictive with names. Just forbid those symbols in names - and do it *BIG RED FAT LETTERS* and end of duscussion! Then life would become easier. :)

In Alessandro's case, I surmise, the code was spoiled somewhere at syncing, when % through url transformations inserted a 0 byte making some part look as if it were the end of string. So, the user sees 1 piece of js code (until that end of string). But in fact the field kept 2 js pieces of code - before and after the 0 byte.

Later, when names were changed from those containing %, maybe the internal unique keys inside the database remained unchanged, as the database engine didn't see the need to change the pointer to the crooked code for speed optimization reasons.

So, to reset it - you need to recreate the field.

That's the only logic I can see in that occurence.
Reply all
Reply to author
Forward
0 new messages