Bookmarks: Japanese chars

Created on 6 May 2020  路  18Comments  路  Source: nextcloud/bookmarks

just minor update from NC 18.0.3 to NC 18.0.4 latest Arch-Apache and Bookmarks fails even the latest version 3.0.10 with:

sudo -u http php /usr/share/webapps/nextcloud/occ app:enable bookmarks
An exception occurred while executing 'SELECT s.id FROM oc_bookmarks_shares s LEFT JOIN oc_bookmarks_folders f ON f.id = s.folder_id WHERE f.id IS NULL':

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_bookmarks_folders' doesn't exist

Why was this table lost/missing and how to recreate it please??? Heavily relying on floccus but this knocked me out....

bug

Most helpful comment

I am nailing it down to Japanese bookmarks, floccus cannot synchronize them to the cloud making folder duplicates on its way. Bookmarks in plain English are OK. What is the proper setting of the mbstring parameters??? mysql uses the utf8mb4

All 18 comments

Did you update the bookmarks app? If yes, from which version?

What's the output from

SELECT * from oc_migrations WHERE app = 'bookmarks';

updated from Arch default 3.0.0 to 3.0.10 from within NC...

MariaDB [nextcloud]> SELECT * from oc_migrations WHERE app = 'bookmarks';
+-----------+-----------------------------+
| app | version |
+-----------+-----------------------------+
| bookmarks | 000014000Date20181002094721 |
| bookmarks | 000014000Date20181029094721 |
| bookmarks | 000016005Date20190402094721 |
| bookmarks | 001000007Date20190721094721 |
| bookmarks | 003000000Date20191123094721 |
| bookmarks | 003000000Date20191129094721 |
| bookmarks | 003000009Date20200505094721 |
+-----------+-----------------------------+

floccus behaved strangely even before the update, rearranging bookmarks, making dupes, not able to sync,
freezing in middle etc. is it possible to recreate all bookmarks database entries from scratch?? not loosing the other NC data of course

Did the update to v3.0.0 go through without errors?

If you're the only user of the bookmarks app on your instance, and have your bookmarks in the browser, you could uninstall the bookmarks app, drop all tables that start with oc_bookmarks and run the following query in your db:

DELETE FROM oc_migrations WHERE app = 'bookmarks';

Then remove your floccus accounts from your browsers to make sure they don't sync the emptiness into your browser. Install the bookmarks app and then add the floccus account again.

That may be the fastest way if no other people experience these problems. It all started when updating to bookmarks 3.0.0 as a part of system Arch update including NC 18.0.3->18.0.4. But the floccus behaved strangely long before. I have another system at work still running the old bookmarks 2.3.4 and NC 18.0.3, can test tomorrow if it would be of any help.

BTW what is the sql command to drop all tables that start with oc_bookmarks collectively ?

Thanks for help!

There have been some upgrading issues regarding the db, but so far I haven't seen this error.

BTW what is the sql command to drop all tables that start with oc_bookmarks collectively ?

drop table oc_bookmarks; drop table oc_bookmarks_tags; drop table oc_bookmarks_folders; drop table oc_bookmarks_root_folders; drop table oc_bookmarks_shared_folders; drop table oc_bookmarks_shares; drop table oc_bookmarks_tree; drop table oc_bookmarks_folders_public; drop table oc_bookmarks_folders_boomarks;
delete from oc_migrations where app = 'bookmarks';

There is no single command.

BTW is it possible to use the floccus sync from 2 different browsers on the same machine (same IP, same NC account) at the same time? How are the bookmark modifications recognized which came first, by some sort of timestamping?

I have updated the other machine NC18.0.3->18.0.4 and bookmarks 2.3.4 to 3.0.0 and no problems, oc_bookmarks_folders has been preserved. I suspect it was the floccus which borked the mysql databases, it may not deal with bookmark duplicates properly etc. ?

before update 2.3.4:
| oc_bookmarks |
| oc_bookmarks_folders |
| oc_bookmarks_folders_bookmarks |
| oc_bookmarks_tags |

after update 3.0.0:
| oc_bookmarks |
| oc_bookmarks_folders |
| oc_bookmarks_folders_public |
| oc_bookmarks_root_folders |
| oc_bookmarks_shared_folders |
| oc_bookmarks_shares |
| oc_bookmarks_tags |
| oc_bookmarks_tree |

after update broken 3.0.10:
| oc_bookmarks_shares |
| oc_bookmarks_tree |

if there is a way to fix it without redoing all bookmarks from scratch/firefox backup it would be helpful

BTW is it possible to use the floccus sync from 2 different browsers on the same machine

Yes, that's one of the use cases. If both clients modify the same thing, the last write wins, currently. This should be rare, though.

if there is a way to fix it without redoing all bookmarks from scratch/firefox backup it would be helpful

This should be possible e.g. if you have backups from your v2.3.4 days. In that case: Revert the bookmarks tables to that backup and make sure the following query yields the exact same results as below.

> SELECT * from oc_migrations WHERE app = 'bookmarks';


+-----------+-----------------------------+
| app       | version                     |
+-----------+-----------------------------+
| bookmarks | 000014000Date20181002094721 |
| bookmarks | 000014000Date20181029094721 |
| bookmarks | 000016005Date20190402094721 |
| bookmarks | 001000007Date20190721094721 |
+-----------+-----------------------------+

Then Update to v3.x again, and report back here with any errors. :blue_heart:

There have been some upgrading issues regarding the db, but so far I haven't seen this error.

BTW what is the sql command to drop all tables that start with oc_bookmarks collectively ?

drop table oc_bookmarks; drop table oc_bookmarks_tags; drop table oc_bookmarks_folders; drop table oc_bookmarks_root_folders; drop table oc_bookmarks_shared_folders; drop table oc_bookmarks_shares; drop table oc_bookmarks_tree; drop table oc_bookmarks_folders_public; drop table oc_bookmarks_folders_boomarks;
delete from oc_migrations where app = 'bookmarks';

There is no single command.

did it all, installed v3.0.12 from git, floccus says:

E019: HTTP status 400. Failed PATCH request. Check your server configuration and log. E019: HTTP status 400. Failed PATCH request. Check your server configuration and log.

E021: Inconsistent server state. Folder is present in childorder list but not in folder tree

another error when I changed the floccus options to overwrite all on server after cleaning local bookmark dupes...

OK nextcloud.oc_bookmarks_folders tables are now in the mysql, but floccus resync again created many duplicates freezing the whole process. Now after I cleaned the Bookmarks within firefox, I just want to simply delete all Bookmarks on the Nextcloud instance with the APP Clear Data button but it takes forever. It's quite unuseable never finishes....

is there any Bookmarks specific log file somewhere so that I can see what's really going on when the floccus stalls or spewing not so helpful error messages?

I am nailing it down to Japanese bookmarks, floccus cannot synchronize them to the cloud making folder duplicates on its way. Bookmarks in plain English are OK. What is the proper setting of the mbstring parameters??? mysql uses the utf8mb4

I am nailing it down to Japanese bookmarks

Ooph, interesting. Thank you for taking the time to nail this down!

Can you drill it down to a set of steps for reproducing this, so I can investigate on my dev instance and create a fix?

Changed the mbstring settings as follows and it seems to work fine now:

date.timezone = "Asia/Tokyo"
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = pass
mbstring.http_output = pass
mbstring.encoding_translation = Off
mbstring.detect_order = UTF-8,SJIS,EUC-JP,JIS,ASCII
mbstring.substitute_character = none;
mbstring.func_overload = 0
mbstring.strict_detection = Off

but this may not be a universal solution for all utf8mb4 languages. You have to make a bunch of nested folders and bookmarks in them all in Japanese Kanji and emoji characters to reproduce it I guess.

Closing as it seems to be a PHP issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kc853 picture kc853  路  3Comments

ifuchs picture ifuchs  路  4Comments

sunjam picture sunjam  路  5Comments

aproposnix picture aproposnix  路  6Comments

bernd-wechner picture bernd-wechner  路  4Comments