Cannot Delete Bookmarks from Web Interface

Good Evening

I have my own setup for Nextcloud 18.0.3, running on FreeBSD 12.1-RELEASE-p2. The backend is using nginx/1.16.1, php 7.3.16, and postgres (PostgreSQL) 11.7, and I’m using Firefox 76.0.1 with Floccus to access my bookmarks.

There are 1793 individual entries I have for all bookmarks. Absolutely none of them have thumbnails. Not even a default; its a flat white square. I’m also unable to delete any bookmark from this interface. This is an assumption, since I have only tried to delete a few. I believe it is a safe one.

Looking in the Logging tab under settings, my logs are absolutely polluted with “BadFunctionCallException” exceptions. One of the entries is documented below. A more detailed version is attached as a pastebin. I’m not sure why this is; are there any ideas?

"message":{"Exception":"BadFunctionCallException","Message":"image is not a valid attribute"

https://pastebin.com/0NNXvQ7v

Mmmh, I’m not sure in which versions the image column was used on the oc_bookmarks table. That was before migrations were introduced, so I guess you have had that column for a while without it doing anything but also not making trouble.

It seems it’s starting to do trouble now. I will fix this error, but the best thing for you would probably be to drop the image column from the oc_bookmarks table. :slight_smile: This will also fix preview and favicon generation (provided you have enabled network access in the admin preferences).

Thanks. I’ll document what I’ve done below when I take the time to execute your suggestion.

Ok, so here is the table structure within the database:

nextcloud=> \d+ oc_bookmarks*
                                                          Table "nextcloud.oc_bookmarks"
    Column    |          Type           | Collation | Nullable |                 Default                  | Storage  | Stats target | Description
--------------+-------------------------+-----------+----------+------------------------------------------+----------+--------------+-------------
 id           | integer                 |           | not null | nextval('oc_bookmarks_id_seq'::regclass) | plain    |              |
 url          | character varying(4096) |           | not null | ''::character varying                    | extended |              |
 title        | character varying(4096) |           | not null | ''::character varying                    | extended |              |
 user_id      | character varying(64)   |           | not null | ''::character varying                    | extended |              |
 description  | character varying(4096) |           | not null | ''::character varying                    | extended |              |
 added        | integer                 |           |          | 0                                        | plain    |              |
 lastmodified | integer                 |           |          | 0                                        | plain    |              |
 clickcount   | integer                 |           | not null | 0                                        | plain    |              |
 image        | character varying(4096) |           |          | NULL::character varying                  | extended |              |
 last_preview | integer                 |           |          | 0                                        | plain    |              |
Indexes:
    "oc_bookmarks_pkey" PRIMARY KEY, btree (id)
    "bookmarks_modified" btree (lastmodified)
    "idx_3ee1cd04a76ed395" btree (user_id)
    "idx_3ee1cd04df091378" btree (last_preview)

A simple ALTER TABLE nextcloud.oc_bookmarks DROP image; And…

nextcloud=> \d oc_bookmarks
                                      Table "nextcloud.oc_bookmarks"
    Column    |          Type           | Collation | Nullable |                 Default
--------------+-------------------------+-----------+----------+------------------------------------------
 id           | integer                 |           | not null | nextval('oc_bookmarks_id_seq'::regclass)
 url          | character varying(4096) |           | not null | ''::character varying
 title        | character varying(4096) |           | not null | ''::character varying
 user_id      | character varying(64)   |           | not null | ''::character varying
 description  | character varying(4096) |           | not null | ''::character varying
 added        | integer                 |           |          | 0
 lastmodified | integer                 |           |          | 0
 clickcount   | integer                 |           | not null | 0
 last_preview | integer                 |           |          | 0
Indexes:
    "oc_bookmarks_pkey" PRIMARY KEY, btree (id)
    "bookmarks_modified" btree (lastmodified)
    "idx_3ee1cd04a76ed395" btree (user_id)
    "idx_3ee1cd04df091378" btree (last_preview)

With the image column gone, I loaded up the web interface, and thumbnails returned; and deleting was successful.

Although outside the scope, this was also a good opportunity to document how to backup, restore, and upgrade the database software. (11.7 to 12.3)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.