hmm… should check the log files first… which I did now. Unfortunately I do not understand the log entry. Thanks j-ed for letting me know that it works generally… That already helps.
{"reqId":"nGCdM2U5ihQir0H6jOBe","level":3,"time":"2020-05-11T09:20:59+00:00","remoteAddr":"xxxxxxxxxxx","user":"d******","app":"index","method":"GET","url":"/index.php/apps/bookmarks/bookmark?limit=42&page=0&sortby=title&search[]=heise","message":{"Exception":"Doctrine\\DBAL\\Exception\\NonUniqueFieldNameException","Message":"An exception occurred while executing
Removed all bookmarks and added just one. So it does not change the error message as shown above.
The error message is followed by a huge select statement. Is there something where I can drill down?
++ EDIT ++
The Error Message is really long. I found additional messages in that line:
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'title' in order clause is ambiguous",{"errorInfo":["23000",1052,"Column 'title' in order clause is ambiguous"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"}]}, "file":"/var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":145,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"},{"errorInfo":["23000",1052,"Column 'title' in order clause is ambiguous"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"}
And this is the “order by” part of the statement.
`ORDER BY UPPER(`title`) ASC LIMIT 42' with params [\"d******\", \"d******\", \"%heise%\", \"%heise%\", \"%heise%\", \"%heise%\"]:`
The complete SQL Statement is probably this:
SELECT `b`.`id`, `b`.`url`, `b`.`title`, `b`.`description`, `b`.`lastmodified`, `b`.`added`, `b`.`clickcount`, `b`.`last_preview`, `b`.`user_id` FROM `oc_bookmarks` `b` LEFT JOIN `oc_bookmarks_tags` `t` ON `t`.`bookmark_id` = `b`.`id` LEFT JOIN `oc_bookmarks_tree` `tr` ON `tr`.`id` = `b`.`id` LEFT JOIN `oc_bookmarks_shares` `s` ON `tr`.`parent_folder` = `s`.`folder_id` LEFT JOIN `oc_bookmarks_shared_folders` `p` ON `s`.`id` = `p`.`share_id` WHERE (`b`.`user_id` = ?) OR (`p`.`user_id` = ?) GROUP BY `b`.`id`, `b`.`url`, `b`.`title`, `b`.`description`, `b`.`lastmodified`, `b`.`added`, `b`.`clickcount`, `b`.`last_preview`, `b`.`user_id` HAVING (GROUP_CONCAT(`t`.`tag`) COLLATE utf8mb4_general_ci LIKE ?) OR (`b`.`url` COLLATE utf8mb4_general_ci LIKE ?) OR (`b`.`title` COLLATE utf8mb4_general_ci LIKE ?) OR (`b`.`description` COLLATE utf8mb4_general_ci LIKE ?) ORDER BY UPPER(`title`) ASC LIMIT 42' with params [\"d*********\", \"d*********\", \"%Deep%\", \"%deep%\", \"%deep%\", \"%deep%\"]
This select statement is repeated 21 time in a single log entry. Repeating the same error over and over again.
I removed the app completely from the app list and reinstalled it. Uploaded the bookmarks again, but no change in the error message. Updated to the latest Bookmark app available this afternoon with no success.
*** EDIT 2 ***
Test with a new user. Bookmark search worked. So something is wrong with my account.
So I have to check what is different between the accounts.
*** EDIT 3 ***
Something must be different between my account and all other accounts on my server.
Maybe one you has an idea where to search next. What I did so far:
-
Checked the oc_bookmark tables in the database. Removed everything where I found a reference to my account. No success.
-
Imported my bookmarks to another account. Everything works as expected.
-
Emptied all bookmark tables in the database, and set it up again, with my account and another one. Mine does not work, the other one did - using the same bookmarks.
-
On the file system i found a folder “bookmarks” within a Nextcloud generated folder “appdata-[some number]”. That’s where the pictures are stored, just base64 encoded. I removed the contents of this cache folder.
Emptied the database again, and imported the bookmarks. No change.
-
I added the other account to the admin group, to make sure, that this has no influence on the search. I does not.
I haven’t found any further location where something about bookmarks is stored. Maybe some other process has an influence on it, but I do not know which one.
The only alternative is to move everything from my account to working one - which may be a challenge, with all the contact data and calendar entries… Somehow I do not want to give up, yet.
Thanks
Dirk