nextcloud / bookmarks

🔖 Bookmark app for Nextcloud
https://apps.nextcloud.com/apps/bookmarks
GNU Affero General Public License v3.0
1k stars 173 forks source link

[Bug]: #1958

Closed micadeyeye closed 1 year ago

micadeyeye commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

Bug related to these ones: ([url]https://github.com/nextcloud/bookmarks/issues/1257(url)) and (url)https://github.com/nextcloud/bookmarks/issues/1706(/url). No folder shared though. Rather all bookmarks are not visible but their folders are visible. I suspect that upgrading the apps and NC at some point brought about the problem.

Steps to reproduce

1.This problem may not be reproducible on other machines. I found out long ago and subsequently deleted and reinstalled the bookmark app but no luck. NC is regularly updated and so are all plugins.

Expected behavior

All bookmark links in each folder should be visible.

Installation method

Official All-in-One appliance

Operating system

Other

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

sudo -u www-data php occ config:list system
.....
.....},
        "preview_libreoffice_path": "\/usr\/local\/bin\/libreoffice",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "Domain1",
           "Domain2"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.2.3",
        "overwrite.cli.url": "https:\/\/"Domain1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "4506",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "app_install_overwrite": [
            "hsts",
            "admin_notifications",
            "documents",
            "files_reader",
            "spreed",
            "files_accesscontrol",
            "workflow_script",
            "carnet",
            "ocdownloader",
            "printer",
            "fulltextsearch",
            "bookmarks_fulltextsearch",
            .......
            .......
            "extract",
            "calendar"
        ],
        "theme": "",
        "loglevel": 0,
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "215",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "has_rebuilt_cache": true

List of activated Apps

Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - bookmarks: 12.0.0
  - video_converter: 1.0.5
  - w2g2: 3.3.9
  - whiteboard: 0.0.3
  - wopi: 3.5.10

Nextcloud Signing status

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

        )

)

Nextcloud Logs

b\\BookmarkMapper","type":"->","args":["WITH RECURSIVE folder_tree(item_id, parent_folder, type, idx) AS ( SELECT cast(? as UNSIGNED) AS `item_id`, cast(0 as UNSIGNED) AS `parent_folder`, cast(? as CHAR(20)) AS `type`, cast(0 as UNSIGNED) AS `idx` UNION ALL SELECT `tr`.`id` AS `item_id`, `tr`.`parent_folder` AS `parent_folder`, `tr`.`type` AS `type`, `tr`.`index` AS `idx` FROM `*PREFIX*bookmarks_tree` `tr` INNER JOIN `folder_tree` `e` ON e.item_id = tr.parent_folder AND e.type = ? UNION ALL SELECT `s`.`folder_id` AS `item_id`, `e`.`parent_folder`, ? AS `type`, `e`.`idx` AS `idx` FROM `folder_tree` `e` INNER JOIN `*PREFIX*bookmarks_shared_folders` `s` ON s.id = e.item_id AND e.type = ?) SELECT `b`.`id`, `b`.`url`, `b`.`title`, `b`.`description`, `b`.`lastmodified`, `b`.`added`, `b`.`clickcount`, `b`.`last_preview`, `b`.`available`, `b`.`archived_file`, `b`.`user_id`, `b`.`text_content`, `b`.`html_content`, GROUP_CONCAT(`tr2`.`parent_folder`) AS `folders`, GROUP_CONCAT(`t`.`tag`) AS `tags` FROM `*PREFIX*bookmarks` `b` LEFT JOIN `*PREFIX*bookmarks_tree` `tr2` ON b.id = tr2.id AND tr2.type = ? LEFT JOIN `*PREFIX*bookmarks_tags` `t` ON `t`.`bookmark_id` = `b`.`id` INNER JOIN `folder_tree` `tree` ON tree.item_id = b.id AND tree.type = ? WHERE `tree`.`parent_folder` = ? GROUP BY `b`.`id`, `b`.`url`, `b`.`title`, `b`.`description`, `b`.`lastmodified`, `b`.`added`, `b`.`clickcount`, `b`.`last_preview`, `b`.`available`, `b`.`archived_file`, `b`.`user_id`, `b`.`text_content`, `b`.`html_content`, `b`.`id` ORDER BY `b`.`lastmodified` DESC, `b`.`id` ASC LIMIT 42",[3,"folder","folder","folder","share","bookmark","bookmark",16],[1,2,2,2,2,2,2,1]]},{"file":"/usr/local/www/nextcloud/apps/bookmarks/lib/Controller/BookmarkController.php","line":379,"function":"findAll","class":"OCA\\Bookmarks\\Db\\BookmarkMapper","type":"->","args":[username",{"__class__":"OCA\\Bookmarks\\QueryParameters"}]},{"file":"/usr/local/www/nextcloud/apps/bookmarks/lib/Controller/InternalBookmarkController.php","line":79,"function":"getBookmarks","class":"OCA\\Bookmarks\\Controller\\BookmarkController","type":"->","args":[0,[],"or","lastmodified",[],42,false,16,null,null,null,null]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getBookmarks","class":"OCA\\Bookmarks\\Controller\\InternalBookmarkController","type":"->","args":[0,[],"or","lastmodified",[],42,false,"16",null,null,null,null]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\InternalBookmarkController"},"getBookmarks"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\InternalBookmarkController"},"getBookmarks"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Bookmarks\\Controller\\InternalBookmarkController","getBookmarks",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["bookmarks.internal_bookmark.get_bookmarks"]]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/bookmarks/bookmark"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":92}}},"CustomMessage":"--"}}

Additional info

XHRGEThttps://DOmain1/index.php/apps/bookmarks/bookmark?limit=42&page=0&sortby=lastmodified&folder=7 [HTTP/1.1 500 Internal Server Error 224ms]

GET https://DOmain1/index.php/apps/bookmarks/bookmark?limit=42&page=0&sortby=lastmodified&folder=7 Status 500 Internal Server Error VersionHTTP/1.1 Transferred2.45 KB (5.62 KB size) Referrer Policyno-referrer

Cache-Control
    no-store, no-cache, must-revalidate
Connection
    close
Content-Encoding
    gzip
Content-Length
    1527
Content-Security-Policy
    default-src 'self'; script-src 'self' 'nonce-VDBZRUZucGJmWWV0M0g3dHRZYlRndXVra3I4ZzdaTmhyYjFtNGNGZ1Rmaz06RFhSQ1dSVUpMT3pIdVJtRWhPK1Z5YUxuNFlsV252NGtsZkl3aXFJVkhZND0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
Content-Type
    text/html; charset=UTF-8
Date
    Sun, 08 Jan 2023 07:10:11 GMT
Expires
    Thu, 19 Nov 1981 08:52:00 GMT
Pragma
    no-cache
Referrer-Policy
    no-referrer
Server
    Apache
Strict-Transport-Security
    max-age=15552000; includeSubDomains
Vary
    Accept-Encoding
X-Content-Type-Options
    nosniff
X-Download-Options
    noopen
X-Frame-Options
    SAMEORIGIN
X-Permitted-Cross-Domain-Policies
    none
X-Powered-By
    PHP/8.0.22
X-Robots-Tag
    none
X-XSS-Protection
    1; mode=block

Accept
    application/json, text/plain, */*
Accept-Encoding
    gzip, deflate, br
Accept-Language
    en-US,en;q=0.5
Connection
    keep-alive
Cookie
    __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; oc1j64o8vewh=bpc3njm6il8dpg
Host
    DOmain1
requesttoken
    HJsmPVDLafP5KrgAunX+LM5gsfkLZDjmtqKQ3XocKgc=:Xqlgcj+ZOJiTT99pixy4Z4cjws99F1Wjju3GthlpenA=
Sec-Fetch-Dest
    empty
Sec-Fetch-Mode
    cors
Sec-Fetch-Site
    same-origin
User-Agent
    Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
marcelklehr commented 1 year ago

This may be due to an outdated mySQL version. Which version are you using?

micadeyeye commented 1 year ago

MySQL server at https://www.freshports.org/databases/mysql57-server/ Server version: 5.7.38-log - Source distribution

marcelklehr commented 1 year ago

See https://github.com/nextcloud/bookmarks/releases/tag/v11.0.0

Bookmarks app dropped support for v5.7 in v11

micadeyeye commented 1 year ago

Thanks, I shall try upgrade the DB to 8.0 and come back should the problem persist.