Closed lyallp closed 3 years ago
Since you looked at the SQL tables, did you see the same bookmark_id - tag combination multiple times in oc_bookmarks_tags?
There are only 4 'My Hosted' rows in oc_bookmarks_tags
SELECT * FROM
oc_bookmarks_tagswhere tag = 'My Hosted' ORDER BY
bookmark_idASC
yet, screenshot shows 6
Nextcloud bookmark in oc_bookmarks is id 5
There is only one oc_bookmarks_tags row with bookmark_id = 5
I must admit, the association of tags to bookmarks seems a little weird to me, I expected a structure something like
bookmark.id <-> bookmark_tags <-> tag.id
where each bookmark row may have zero or more bookmark_tags and the tag only exists once in tags.
Still, I am not the author, and really am not in a position to criticize when I have not created something.
I am happy to look at the sql in question, my problem is not knowing where to look!
I don't have many bookmarks, happy to export tables for examination.
Thanks that's very helpful. The problem is a select query, then.
I must admit, the association of tags to bookmarks seems a little weird to me
Yes, there's a bit of tech debt in there.
Fixed and seems faster to boot!
Describe the bug When filtering bookmarks by tags, some bookmarks show their one and only tag multiple times. Attempts to delete the excess tags only makes it worse
To Reproduce Steps to reproduce the behavior: Unsure as to what causes this behavior but after looking at SQL Tables suspect there is a join issue between oc_bookmarks and oc_bookmarks_tags
Expected behavior Expect there to only one instance of a given tag per bookmark
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Server (please complete the following information):
OS: Shared hosting Linux
HTTP server: Apache 2.4.46
Database: MySQL 5.6.49-cll-lve
PHP version: 7.2.33
Nextcloud version: 20
Bookmarks app version: 3.4.2
Activated Nextcloud Apps: $ php occ app:list Enabled:
Nextcloud configuration: $ php occ config:list { "system": { "installed": true, "dbtype": "mysql", "dbname": "REMOVED SENSITIVE VALUE", "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbtableprefix": "oc_", "forcessl": false, "theme": "", "3rdpartyroot": "", "3rdpartyurl": "", "blacklisted_files": [ ".htaccess" ], "default_language": "en", "default_locale": "en_AU", "overwritehost": "", "overwriteprotocol": "https", "overwritewebroot": "", "overwritecondaddr": "", "overwrite.cli.url": "https:\/\/cloud.remotely-helpful.com\/", "htaccess.RewriteBase": "\/", "defaultapp": "calendar", "knowledgebaseenabled": true, "knowledgebaseurl": "http:\/\/api.apps.nextcloud.com\/v1", "appstoreenabled": true, "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1", "apps_paths": [ { "path": "\/home\/remotely\/www\/cloud\/apps", "url": "\/apps", "writable": true } ], "mail_smtpdebug": false, "mail_smtpmode": "smtp", "mail_smtphost": "REMOVED SENSITIVE VALUE", "mail_smtpport": "587", "mail_smtptimeout": 10, "mail_smtpauthtype": "LOGIN", "appcodechecker": true, "log_type": "nextcloud", "logfile": "\/home\/remotely\/cloud\/logs\/nextcloud.log", "loglevel": 2, "logdateformat": "F d, Y H:i:s", "logtimezone": "Australia\/Sydney", "log_rotate_size": 104857600, "passwordsalt": "REMOVED SENSITIVE VALUE", "hashingCost": 10, "trashbin_retention_obligation": "180, auto", "allow_user_to_change_display_name": true, "xframe_restriction": true, "custom_csp_policy": "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src ; img-src ; font-src 'self' data:; media-src *", "customclient_desktop": "", "customclient_android": "", "customclient_ios": "", "remember_login_cookie_lifetime": 1296000, "session_keepalive": true, "updatechecker": true, "updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/", "updater.release.channel": "stable", "has_internet_connection": true, "writable_appsdir": true, "datadirectory": "REMOVED SENSITIVE VALUE", "version": "20.0.0.9", "maxZipInputSize": "838860800", "allowZipDownload": true, "instanceid": "REMOVED SENSITIVE VALUE", "maintenance": false, "trusted_domains": [ "cloud.remotely-helpful.info", "cloud.remotely-helpful.com", "remotely-helpful.info", "remotely-helpful.com", "remotelyhelpful.info", "remotelyhelpful.com", "remotelyhelpful.info.au", "remotelyhelpful.com.au", "remotely-helpful.info.au", "remotely-helpful.com.au", "vmres08.auserver.com.au" ], "secret": "REMOVED SENSITIVE VALUE", "mail_from_address": "REMOVED SENSITIVE VALUE", "mail_domain": "REMOVED SENSITIVE VALUE", "appstore.experimental.enabled": true, "mail_smtpauth": 1, "mail_smtpname": "REMOVED SENSITIVE VALUE", "mail_smtppassword": "REMOVED SENSITIVE VALUE", "app_install_overwrite": [ "keeweb", "apporder", "calendar", "contacts", "external", "camerarawpreviews", "tasks", "bookmarks", "occweb", "extract" ], "mysql.utf8mb4": false, "enabledPreviewProviders": [ "OC\Preview\PNG", "OC\Preview\JPEG", "OC\Preview\GIF", "OC\Preview\HEIC", "OC\Preview\BMP", "OC\Preview\XBitmap", "OC\Preview\MP3", "OC\Preview\TXT", "OC\Preview\MarkDown", "OC\Preview\OpenDocument", "OC\Preview\Krita" ], "tempdirectory": "\/home\/remotely\/tmp\/NextCloud", "updater.secret": "REMOVED SENSITIVE VALUE" }, "apps": { "accessibility": { "enabled": "yes", "installed_version": "1.6.0", "types": "" }, "activity": { "enabled": "yes", "installed_version": "2.13.1", "types": "filesystem" }, "admin_audit": { "enabled": "yes", "installed_version": "1.10.0", "types": "logging" }, "admin_dependencies_chk": { "enabled": "no", "installed_version": "0.02", "ocsid": "166041", "types": "" }, "admin_migrate": { "enabled": "no", "installed_version": "0.1" }, "apporder": { "enabled": "yes", "hidden": "[\"\/index.php\/apps\/external\/1\"]", "installed_version": "0.11.0", "order": "[\"\/index.php\/apps\/calendar\/\",\"\/index.php\/apps\/tasks\/\",\"\/index.php\/apps\/contacts\/\",\"\/index.php\/apps\/quicknotes\/\",\"\/index.php\/apps\/files\/\",\"\/index.php\/apps\/photos\/\",\"\/index.php\/apps\/bookmarks\/\",\"\/index.php\/apps\/keeweb\/\",\"\/index.php\/apps\/activity\/\"]", "types": "" }, "backgroundjob": { "lastjob": "412" }, "bookmarks": { "enabled": "yes", "installed_version": "3.4.2", "types": "" }, "bruteforcesettings": { "enabled": "no", "installed_version": "1.0.3", "types": "" }, "calendar": { "enabled": "yes", "installed_version": "2.1.2", "types": "" }, "camerarawpreviews": { "enabled": "yes", "installed_version": "0.7.8", "types": "filesystem" }, "cloud_federation_api": { "enabled": "yes", "installed_version": "1.3.0", "types": "filesystem" }, "comments": { "enabled": "yes", "installed_version": "1.10.0", "types": "logging" }, "contacts": { "enabled": "yes", "installed_version": "3.4.0", "types": "filesystem" }, "contactsinteraction": { "enabled": "yes", "installed_version": "1.1.0", "types": "dav" }, "core": { "backgroundjobs_mode": "cron", "backgroundjobs_step": "queued_tasks", "backgroundjobs_task": "OC_Cache_FileGlobal-gc", "enterpriseLogoChecked": "yes", "global_cache_gc_lastrun": "1436441403", "installed.bundles": "[\"CoreBundle\"]", "installedat": "1363682970.85", "lastcron": "1602231306", "lastupdateResult": "[]", "lastupdatedat": "1602227151", "moveavatarsdone": "yes", "oc.integritycheck.checker": "[]", "previewsCleanedUp": "1", "public_caldav": "calendar\/share.php", "public_calendar": "calendar\/share.php", "public_documents": "documents\/public.php", "public_files": "files_sharing\/public.php", "public_gallery": "gallery\/public.php", "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", "remote_ampache": "media\/remote.php", "remote_caldav": "dav\/appinfo\/v1\/caldav.php", "remote_calendar": "dav\/appinfo\/v1\/caldav.php", "remote_carddav": "dav\/appinfo\/v1\/carddav.php", "remote_contacts": "dav\/appinfo\/v1\/carddav.php", "remote_contactthumbnail": "contacts\/thumbnail.php", "remote_core.css": "\/core\/minimizer.php", "remote_core.js": "\/core\/minimizer.php", "remote_dav": "dav\/appinfo\/v2\/remote.php", "remote_files": "dav\/appinfo\/v1\/webdav.php", "remote_filesync": "files\/appinfo\/filesync.php", "remote_mozilla_sync": "mozilla_sync\/appinfo\/remote.php", "remote_webdav": "dav\/appinfo\/v1\/webdav.php", "repairlegacystoragesdone": "yes", "scss.variables": "39c9b0e0001c6a01a8d68c12d9c0f8ad", "shareapi_allow_mail_notification": "yes", "shareapi_allow_public_notification": "yes", "shareapi_allow_public_upload": "no", "theming.variables": "496caad0870f0481d858d3463b5367ee", "updater.secret.created": "1602219248", "vendor": "nextcloud" }, "dashboard": { "enabled": "yes", "installed_version": "7.0.0", "types": "" }, "dav": { "OCA\DAV\Migration\ValueFixInsert_ran": "true", "buildCalendarReminderIndex": "yes", "buildCalendarSearchIndex": "yes", "chunks_migrated": "1", "enabled": "yes", "generateBirthdayCalendar": "no", "installed_version": "1.16.0", "regeneratedBirthdayCalendarsForYearFix": "yes", "types": "filesystem" }, "documents": { "converter": "off", "enabled": "no", "installed_version": "0.13.1", "ocsid": "168711", "types": "" }, "external": { "enabled": "no", "installed_version": "3.6.0", "max_site": "1", "sites": "REMOVED SENSITIVE VALUE", "types": "" }, "extract": { "enabled": "yes", "installed_version": "1.2.4", "types": "" }, "federatedfilesharing": { "enabled": "yes", "installed_version": "1.10.1", "types": "" }, "federation": { "enabled": "no", "installed_version": "1.1.1", "types": "authentication" }, "files": { "backgroundwatcher_previous_file": "153", "backgroundwatcher_previous_folder": "37", "cronjob_scan_files": "500", "enabled": "yes", "installed_version": "1.15.0", "types": "filesystem" }, "files_imageviewer": { "enabled": "no", "installed_version": "1.0" }, "files_locking": { "enabled": "no", "installed_version": "", "types": "filesystem" }, "files_markdown": { "enabled": "yes", "installed_version": "2.3.1", "types": "" }, "files_odfviewer": { "enabled": "no", "installed_version": "0.1" }, "files_pdfviewer": { "enabled": "yes", "installed_version": "2.0.1", "types": "" }, "files_rightclick": { "enabled": "yes", "installed_version": "0.17.0", "types": "" }, "files_sharing": { "enabled": "yes", "installed_version": "1.12.0", "types": "filesystem" }, "files_texteditor": { "enabled": "no", "installed_version": "2.8.0", "types": "" }, "files_trashbin": { "enabled": "no", "installed_version": "1.1.0", "types": "filesystem" }, "files_versions": { "enabled": "no", "installed_version": "1.1.0", "types": "filesystem" }, "files_videoplayer": { "enabled": "yes", "installed_version": "1.9.0", "types": "" }, "files_videoviewer": { "enabled": "no", "installed_version": "0.1.3", "ocsid": "166054", "types": "" }, "firstrunwizard": { "enabled": "yes", "installed_version": "2.9.0", "types": "logging" }, "fulltextsearch": { "enabled": "no", "installed_version": "1.4.2", "types": "" }, "gallery": { "enabled": "no", "installed_version": "18.4.0", "types": "" }, "galleryplus": { "enabled": "no", "installed_version": "13.0.0", "ocsid": "169116", "types": "" }, "keeweb": { "enabled": "yes", "installed_version": "0.6.3", "types": "" }, "logreader": { "enabled": "yes", "installed_version": "2.5.0", "levels": "11101", "types": "" }, "lookup_server_connector": { "enabled": "yes", "installed_version": "1.8.0", "types": "authentication" }, "media": { "enabled": "no", "installed_version": "0.4.3" }, "mozilla_sync": { "enabled": "no", "installed_version": "1.4", "types": "" }, "news": { "enabled": "no", "installed_version": "14.2.2", "types": "" }, "nextcloud_announcements": { "enabled": "no", "installed_version": "1.0", "pub_date": "Sat, 10 Dec 2016 00:00:00 +0100", "types": "logging" }, "notes": { "enabled": "yes", "installed_version": "4.0.0", "types": "" }, "notifications": { "enabled": "yes", "installed_version": "2.8.0", "types": "logging" }, "oauth2": { "enabled": "yes", "installed_version": "1.8.0", "types": "authentication" }, "occweb": { "enabled": "no", "installed_version": "0.0.7", "types": "" }, "password_policy": { "enabled": "yes", "installed_version": "1.10.1", "types": "authentication" }, "photos": { "enabled": "yes", "installed_version": "1.2.0", "types": "" }, "privacy": { "enabled": "yes", "installed_version": "1.4.0", "readableLocation": "au", "types": "" }, "provisioning_api": { "enabled": "yes", "installed_version": "1.10.0", "types": "prevent_group_restriction" }, "quicknotes": { "enabled": "no", "installed_version": "0.6.0", "types": "" }, "recommendations": { "enabled": "yes", "installed_version": "0.8.0", "types": "" }, "search_lucene": { "enabled": "no", "installed_version": "0.7.0", "ocsid": "168709", "types": "filesystem" }, "serverinfo": { "enabled": "yes", "installed_version": "1.10.0", "types": "" }, "settings": { "enabled": "yes", "installed_version": "1.2.0", "types": "" }, "sharebymail": { "enabled": "yes", "installed_version": "1.10.0", "types": "filesystem" }, "support": { "SwitchUpdaterServerHasRun": "yes", "enabled": "yes", "installed_version": "1.3.0", "types": "session" }, "survey_client": { "enabled": "yes", "installed_version": "1.8.0", "last_report": "{\"id\":\"514824ae2237a\",\"items\":[[\"server\",\"version\",\"18.0.3.0\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable_avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"none\"],[\"server\",\"memcache.distributed\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"none\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"cron\"],[\"php\",\"version\",\"7.2.33\"],[\"php\",\"memory_limit\",268435456],[\"php\",\"max_execution_time\",0],[\"php\",\"upload_max_filesize\",33554432],[\"database\",\"type\",\"mysql\"],[\"database\",\"version\",\"5.6.49\"],[\"database\",\"size\",117391360],[\"apps\",\"accessibility\",\"1.4.0\"],[\"apps\",\"activity\",\"2.11.0\"],[\"apps\",\"admin_audit\",\"1.8.0\"],[\"apps\",\"admin_dependencies_chk\",\"disabled\"],[\"apps\",\"admin_migrate\",\"disabled\"],[\"apps\",\"apporder\",\"0.8.0\"],[\"apps\",\"bookmarks\",\"2.3.1\"],[\"apps\",\"bruteforcesettings\",\"disabled\"],[\"apps\",\"calendar\",\"1.7.1\"],[\"apps\",\"camerarawpreviews\",\"0.7.2\"],[\"apps\",\"cloud_federation_api\",\"1.1.0\"],[\"apps\",\"comments\",\"1.8.0\"],[\"apps\",\"contacts\",\"3.1.6\"],[\"apps\",\"dav\",\"1.14.0\"],[\"apps\",\"documents\",\"disabled\"],[\"apps\",\"external\",\"disabled\"],[\"apps\",\"federatedfilesharing\",\"1.8.0\"],[\"apps\",\"federation\",\"disabled\"],[\"apps\",\"files\",\"1.13.1\"],[\"apps\",\"files_external\",\"disabled\"],[\"apps\",\"files_imageviewer\",\"disabled\"],[\"apps\",\"files_locking\",\"disabled\"],[\"apps\",\"files_odfviewer\",\"disabled\"],[\"apps\",\"files_pdfviewer\",\"1.7.0\"],[\"apps\",\"files_rightclick\",\"0.15.2\"],[\"apps\",\"files_sharing\",\"1.10.1\"],[\"apps\",\"files_texteditor\",\"disabled\"],[\"apps\",\"files_trashbin\",\"disabled\"],[\"apps\",\"files_versions\",\"disabled\"],[\"apps\",\"files_videoplayer\",\"1.7.0\"],[\"apps\",\"files_videoviewer\",\"disabled\"],[\"apps\",\"firstrunwizard\",\"2.7.0\"],[\"apps\",\"gallery\",\"disabled\"],[\"apps\",\"galleryplus\",\"disabled\"],[\"apps\",\"keeweb\",\"0.5.1\"],[\"apps\",\"logreader\",\"2.3.0\"],[\"apps\",\"lookup_server_connector\",\"1.6.0\"],[\"apps\",\"media\",\"disabled\"],[\"apps\",\"mozilla_sync\",\"disabled\"],[\"apps\",\"news\",\"disabled\"],[\"apps\",\"nextcloud_announcements\",\"disabled\"],[\"apps\",\"notifications\",\"2.6.0\"],[\"apps\",\"oauth2\",\"1.6.0\"],[\"apps\",\"password_policy\",\"1.8.0\"],[\"apps\",\"photos\",\"1.0.0\"],[\"apps\",\"privacy\",\"1.2.0\"],[\"apps\",\"provisioning_api\",\"1.8.0\"],[\"apps\",\"recommendations\",\"0.6.0\"],[\"apps\",\"search_lucene\",\"disabled\"],[\"apps\",\"serverinfo\",\"1.8.0\"],[\"apps\",\"settings\",\"1.0.0\"],[\"apps\",\"sharebymail\",\"1.8.0\"],[\"apps\",\"support\",\"1.1.0\"],[\"apps\",\"survey_client\",\"1.6.0\"],[\"apps\",\"systemtags\",\"1.8.0\"],[\"apps\",\"tasks\",\"0.11.3\"],[\"apps\",\"tasks_enhanced\",\"disabled\"],[\"apps\",\"templateeditor\",\"disabled\"],[\"apps\",\"text\",\"2.0.0\"],[\"apps\",\"theming\",\"1.9.0\"],[\"apps\",\"twofactor_backupcodes\",\"1.7.0\"],[\"apps\",\"updatenotification\",\"1.8.0\"],[\"apps\",\"updater\",\"disabled\"],[\"apps\",\"user_migrate\",\"disabled\"],[\"apps\",\"viewer\",\"1.2.0\"],[\"apps\",\"workflowengine\",\"2.0.0\"],[\"stats\",\"num_files\",5881],[\"stats\",\"num_users\",11],[\"stats\",\"num_storages\",22],[\"stats\",\"num_storages_local\",2],[\"stats\",\"num_storages_home\",12],[\"stats\",\"num_storages_other\",8],[\"stats\",\"num_comments\",1],[\"stats\",\"num_comment_markers\",1],[\"stats\",\"num_systemtags\",0],[\"stats\",\"num_systemtags_mappings\",0],[\"files_sharing\",\"num_shares\",28],[\"files_sharing\",\"num_shares_user\",0],[\"files_sharing\",\"num_shares_groups\",4],[\"files_sharing\",\"num_shares_link\",16],[\"files_sharing\",\"num_shares_link_no_password\",16],[\"files_sharing\",\"num_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"files_sharing\",\"permissions_1_1\",\"1\"],[\"files_sharing\",\"permissions_3_1\",\"16\"],[\"files_sharing\",\"permissions_1_17\",\"1\"],[\"files_sharing\",\"permissions_1_31\",\"2\"],[\"files_sharing\",\"permissions_2_31\",\"8\"],[\"encryption\",\"enabled\",\"no\"],[\"encryption\",\"default_module\",\"no\"]]}", "last_sent": "1599200113", "types": "" }, "systemtags": { "enabled": "yes", "installed_version": "1.10.0", "types": "logging" }, "tasks": { "enabled": "yes", "installed_version": "0.13.3", "types": "" }, "tasks_enhanced": { "enabled": "no", "installed_version": "0.4.1", "types": "" }, "templateeditor": { "enabled": "no", "installed_version": "0.2", "types": "" }, "text": { "enabled": "yes", "installed_version": "3.1.0", "types": "dav" }, "theming": { "backgroundMime": "image\/jpeg", "cachebuster": "22", "color": "#CB4637", "enabled": "yes", "installed_version": "1.11.0", "name": "My Cloud", "slogan": "REMOVED SENSITIVE VALUE", "types": "logging", "url": "REMOVED SENSITIVE VALUE" }, "twofactor_backupcodes": { "enabled": "yes", "installed_version": "1.9.0", "types": "" }, "updatenotification": { "apporder": "0.9.0", "bookmarks": "2.3.4", "bruteforcesettings": "1.1.0", "calendar": "2.0.2", "contacts": "3.2.0", "core": "19.0.4.2", "enabled": "yes", "external": "3.0.4", "files_pdfviewer": "1.1.2", "files_rightclick": "0.15.1", "installed_version": "1.10.0", "keeweb": "0.6.3", "tasks": "0.12.1", "theming": "1.4.5", "types": "", "update_check_errors": "0" }, "updater": { "enabled": "no", "installed_version": "0.6", "types": "" }, "user_migrate": { "enabled": "no", "installed_version": "0.1" }, "user_status": { "enabled": "yes", "installed_version": "1.0.0", "types": "" }, "viewer": { "enabled": "yes", "installed_version": "1.4.0", "types": "" }, "weather_status": { "enabled": "yes", "installed_version": "1.0.0", "types": "" }, "workflowengine": { "enabled": "yes", "installed_version": "2.2.0", "types": "filesystem" } } }
Nextcloud external user backend: none
Additional context Add any other context about the problem here.
Web server error log
Nextcloud log (nextcloud/data/nextcloud.log)
Browser log