Php 7.4.18 breaking owncloud 10.6 wih postgresql 9.6 on CentOS 7

My owncloud 10.6 server got php packages upgraded from 7.4.16 to 7.4.18 by the nightly ‘yum update’ process. After that requests to the database stated to fail.

Expected behaviour

database requests should work

Actual behaviour

Tell us what happens instead
the web interface displays the “Directory not available” message
and postgres server logs

< 2021-04-29 08:57:09.670 CEST > ERROR:  operator does not exist: character varying = integer at character 124
< 2021-04-29 08:57:09.670 CEST > HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
< 2021-04-29 08:57:09.670 CEST > STATEMENT:  SELECT "object_id" AS "id", COUNT("object_id") AS "count" FROM "oc_comments" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3, $4, $5)) AND ("object_id" NOT IN (SELECT "
object_id" FROM "oc_comments_read_markers" crm WHERE (crm."user_id" = $6) AND (crm."marker_datetime" >= c."creation_timestamp") AND (c."object_id" = crm."object_id"))) GROUP BY "object_id"

Reverting (yum downgrade) to php 7.4.16 packages fixes the server.

Server configuration

Operating system:
CentOS Linux release 7.9.2009 (Core)

Web server:
Server version: Apache/2.4.6 (CentOS)
Server built: Nov 16 2020 16:18:20

Database:
postgres (PostgreSQL) 9.6.21

PHP version:
7.4.18

ownCloud version: (see ownCloud admin page)
10.6.0

Updated from an older ownCloud or fresh install:
Updated from olfer verson

Where did you install ownCloud from:
soruce tarball

Signing status (ownCloud 9.0 and above):


No errors have been found.

The content of config/config.php:

{
    "basic": {
        "license key": "***REMOVED SENSITIVE VALUE***",
        "date": "Thu, 29 Apr 2021 14:54:41 +0000",
        "ownCloud version": "10.6.0.5",
        "ownCloud version string": "10.6.0",
        "ownCloud edition": "Community",
        "server OS": "Linux",
        "server OS version": "Linux wellington 3.10.0-1160.24.1.el7.x86_64 #1 SMP Thu Apr 8 19:51:47 UTC 2021 x86_64",
        "server SAPI": "apache2handler",
        "webserver version": "Apache\/2.4.6 (CentOS) OpenSSL\/1.0.2k-fips PHP\/7.4.16",
        "hostname": "cloud.laas.fr",
        "logged-in user": "root"
    },
    "stats": {
        "users": {
            "LDAP": {
                "count": 998,
                "seen": 592,
                "logged in (30 days)": 285
            },
            "Database": {
                "count": 1,
                "seen": 1,
                "logged in (30 days)": 1
            }
        },
        "groups": {
            "OC\\Group\\Database": 1,
            "OCA\\User_LDAP\\Group_Proxy": 277
        }
    },
    "config": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/owncloud\/data",
        "dbtype": "pgsql",
        "version": "10.6.0.5",
        "dbname": "clouddb",
        "dbhost": "localhost:\/var\/run\/postgresql\/.s.PGSQL.5432",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "theme": "",
        "logfile": "\/owncloud\/data\/owncloud.log",
        "loglevel": 2,
        "log_rotate_size": 104857600,
        "log_authfailip": true,
        "instanceid": "50b52a8c63484",
        "maintenance": false,
        "forcessl": true,
        "trusted_domains": [
            "cloud.laas.fr",
            "bespin.laas.fr"
        ],
        "share_folder": "\/Shared",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "singleuser": false,
        "has_internet_connection": true,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "\/var\/run\/redis\/redis.sock",
            "port": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "trashbin_retention_obligation": "auto, 90",
        "appstore.experimental.enabled": true,
        "integrity.ignore.missing.app.signature": [
            "theme-laas"
        ]
    },
    "integritychecker": {
        "passing": true,
        "enabled": true,
        "result": []
    },
    "core": {
        "installedat": "1340978856.2958",
        "remote_ampache": "media\/remote.php",
        "remote_core.css": "\/core\/minimizer.php",
        "remote_core.js": "\/core\/minimizer.php",
        "remote_filesync": "files\/appinfo\/filesync.php",
        "public_documents": "documents\/public.php",
        "remote_contactthumbnail": "contacts\/thumbnail.php",
        "public_shorty_relay": "shorty\/relay.php",
        "public_shorty_qrcode": "shorty\/qrcode.php",
        "public_shorty_query": "shorty\/query.php",
        "backgroundjobs_mode": "cron",
        "public_calendar": "calendar\/share.php",
        "public_caldav": "calendar\/share.php",
        "public_files": "files_sharing\/public.php",
        "public_gallery": "gallery\/public.php",
        "shareapi_enforce_expire_date": "no",
        "repairlegacystoragesdone": "yes",
        "backgroundjobs_step": "queued_tasks",
        "umgmt_show_storage_location": "true",
        "remote_files": "dav\/appinfo\/v1\/webdav.php",
        "remote_contacts": "dav\/appinfo\/v1\/carddav.php",
        "remote_carddav": "dav\/appinfo\/v1\/carddav.php",
        "remote_calendar": "dav\/appinfo\/v1\/caldav.php",
        "remote_caldav": "dav\/appinfo\/v1\/caldav.php",
        "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
        "shareapi_expire_after_n_days": "15",
        "backgroundjobs_task": "",
        "outgoing_server2server_share_enabled": "no",
        "shareapi_allow_resharing": "no",
        "shareapi_allow_mail_notification": "yes",
        "shareapi_enforce_links_password_read_only": "***REMOVED SENSITIVE VALUE***",
        "vendor": "owncloud",
        "OC_Channel": "stable",
        "shareapi_default_expire_date": "yes",
        "umgmt_show_backend": "true",
        "global_cache_gc_lastrun": "1441897202",
        "shareapi_allow_public_notification": "yes",
        "incoming_server2server_share_enabled": "yes",
        "shareapi_enforce_links_password_read_write": "***REMOVED SENSITIVE VALUE***",
        "shareapi_enforce_links_password_write_only": "***REMOVED SENSITIVE VALUE***",
        "updater.secret.created": "1609869671",
        "remote_webdav": "dav\/appinfo\/v1\/webdav.php",
        "remote_dav": "dav\/appinfo\/v2\/remote.php",
        "lastcron": "1619707516",
        "lastupdatedat": "1619706433",
        "lastupdateResult": "{\"version\":\"10.7.0\",\"versionstring\":\"ownCloud 10.7.0\",\"url\":\"https:\\\/\\\/download.owncloud.org\\\/community\\\/owncloud-10.7.0.zip\",\"web\":\"https:\\\/\\\/doc.owncloud.org\\\/server\\\/10.6\\\/admin_manual\\\/maintenance\\\/upgrade.html\"}"
    },
   /* ... redacted... */
    "phpinfo": {
        "apache2handler": {
            "Apache Version": "Apache\/2.4.6 (CentOS) OpenSSL\/1.0.2k-fips PHP\/7.4.16",
            "Apache API Version": "20120211",
            "Server Administrator": "root@localhost",
            "Hostname:Port": "cloud.laas.fr:0",
            "User\/Group": "apache(48)\/48",
            "Max Requests": "Per Child: 0 - Keep Alive: on - Max Per Connection: 100",
            "Timeouts": "Connection: 60 - Keep-Alive: 5",
            "Virtual Server": "Yes",
            "Server Root": "\/etc\/httpd",
            "Loaded Modules": "core mod_so http_core mod_access_compat mod_actions mod_alias mod_allowmethods mod_auth_basic mod_auth_digest mod_authn_anon mod_authn_core mod_authn_dbd mod_authn_dbm mod_authn_file mod_authn_socache mod_authz_core mod_authz_dbd mod_authz_dbm mod_authz_groupfile mod_authz_host mod_authz_owner mod_authz_user mod_autoindex mod_cache mod_cache_disk mod_data mod_dbd mod_deflate mod_dir mod_dumpio mod_echo mod_env mod_expires mod_ext_filter mod_filter mod_headers mod_include mod_info mod_log_config mod_logio mod_mime_magic mod_mime mod_negotiation mod_remoteip mod_reqtimeout mod_rewrite mod_setenvif mod_slotmem_plain mod_slotmem_shm mod_socache_dbm mod_socache_memcache mod_socache_shmcb mod_status mod_substitute mod_suexec mod_unique_id mod_unixd mod_userdir mod_version mod_vhost_alias mod_dav mod_dav_fs mod_dav_lock mod_lua prefork mod_proxy mod_lbmethod_bybusyness mod_lbmethod_byrequests mod_lbmethod_bytraffic mod_lbmethod_heartbeat mod_proxy_ajp mod_proxy_balancer mod_proxy_connect mod_proxy_express mod_proxy_fcgi mod_proxy_fdpass mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_wstunnel mod_ssl mod_systemd mod_cgi mod_php7 mod_xsendfile",
            "engine": "1",
            "last_modified": "0",
            "xbithack": "0"
        },
}

List of activated apps:

Enabled:
  - calendar: 1.6.4
  - comments: 0.3.0
  - configreport: 0.2.0
  - contacts: 1.5.5
  - dav: 0.6.0
  - federatedfilesharing: 0.5.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_pdfviewer: 0.12.1
  - files_sharing: 0.14.0
  - files_trashbin: 0.9.1
  - files_videoplayer: 0.10.1
  - firstrunwizard: 1.2.0
  - gallery: 16.1.1
  - impersonate: 0.5.0
  - market: 0.6.0
  - notifications: 0.5.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - tasks: 0.9.7
  - theme-laas: 1.0.2
  - updatenotification: 0.2.1
  - user_ldap: 0.15.2
Disabled:
  - encryption
  - external
  - files_mediaviewer
  - files_versions
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/…

no

Are you using encryption: yes/no

no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

yes LDAP

LDAP configuration (delete this part if not used)

+-------------------------------+--------------------------------------+
| Configuration                 |                                      |
+-------------------------------+--------------------------------------+
| hasMemberOfFilterSupport      |                                      |
| hasPagedResultSupport         |                                      |
| homeFolderNamingRule          |                                      |
| lastJpegPhotoLookup           | 0                                    |
| ldapAgentName                 |                                      |
| ldapAgentPassword             | ***                                  |
| ldapAttributesForGroupSearch  |                                      |
| ldapAttributesForUserSearch   | cn;uid                               |
| ldapBackupHost                |                                      |
| ldapBackupPort                | 389                                  |
| ldapBase                      | dc=laas,dc=fr                        |
| ldapBaseGroups                | ou=groups,dc=laas,dc=fr              |
| ldapBaseUsers                 | ou=users,dc=laas,dc=fr               |
| ldapCacheTTL                  | 600                                  |
| ldapConfigurationActive       | 1                                    |
| ldapDynamicGroupMemberURL     |                                      |
| ldapEmailAttribute            | laas-mainMail                        |
| ldapExperiencedAdmin          | 0                                    |
| ldapExpertUUIDGroupAttr       | entryuuid                            |
| ldapExpertUUIDUserAttr        | entryuuid                            |
| ldapExpertUsernameAttr        | uid                                  |
| ldapGroupDisplayName          | cn                                   |
| ldapGroupFilter               | (&(|(objectclass=laas-group)))       |
| ldapGroupFilterGroups         |                                      |
| ldapGroupFilterMode           | 0                                    |
| ldapGroupFilterObjectclass    | laas-group                           |
| ldapGroupMemberAssocAttr      | memberUid                            |
| ldapHost                      | ldap.laas.fr                         |
| ldapIgnoreNamingRules         |                                      |
| ldapLoginFilter               | (&(objectclass=laas-user)(uid=%uid)) |
| ldapLoginFilterAttributes     |                                      |
| ldapLoginFilterEmail          | 1                                    |
| ldapLoginFilterMode           | 1                                    |
| ldapLoginFilterUsername       | 1                                    |
| ldapNestedGroups              | 0                                    |
| ldapNetworkTimeout            | 2                                    |
| ldapOverrideMainServer        | 0                                    |
| ldapPagingSize                | 500                                  |
| ldapPort                      | 389                                  |
| ldapQuotaAttribute            | 35GB                                 |
| ldapQuotaDefault              |                                      |
| ldapTLS                       | 1                                    |
| ldapUserDisplayName           | uid                                  |
| ldapUserDisplayName2          |                                      |
| ldapUserFilter                | (|(objectclass=laas-user))           |
| ldapUserFilterGroups          |                                      |
| ldapUserFilterMode            | 1                                    |
| ldapUserFilterObjectclass     | laas-user                            |
| ldapUserName                  | samaccountname                       |
| ldapUuidGroupAttribute        | auto                                 |
| ldapUuidUserAttribute         | auto                                 |
| turnOffCertCheck              | 0                                    |
| useMemberOfToDetectMembership | 1                                    |
+-------------------------------+--------------------------------------+

Client configuration

Browser:
Firefox 88.0

Operating system:
Linux Ubuntu 20.04

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

{"reqId":"YIpYxbPqq7OeL0@3olX1gQAAAB0","level":4,"time":"2021-04-29T06:57:09+00:00","remoteAddr":"140.93.9.233","user":"marribat","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/marribat/PartageGabinMathieu","message":"Exception: An exception occurred while executing 'SELECT "object_id" AS "id", COUNT("object_id") AS "count" FROM "oc_comments" c WHERE ("object_type" = ?) AND ("object_id" IN (?, ?, ?, ?)) AND ("object_id" NOT IN (SELECT "object_id" FROM "oc_comments_read_markers" crm WHERE (crm."user_id" = ?) AND (crm."marker_datetime" >= c."creation_timestamp") AND (c."object_id" = crm."object_id"))) GROUP BY "object_id"' with params ["files", 19040197, 19046758, 19042384, 19048301, "marribat"]: SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: character varying = integer LINE 1: ...ts" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3...^ HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.: {"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing 'SELECT "object_id" AS "id", COUNT("object_id") AS "count" FROM "oc_comments" c WHERE ("object_type" = ?) AND ("object_id" IN (?, ?, ?, ?)) AND ("object_id" NOT IN (SELECT "object_id" FROM "oc_comments_read_markers" crm WHERE (crm."user_id" = ?) AND (crm."marker_datetime" >= c."creation_timestamp") AND (c."object_id" = crm."object_id"))) GROUP BY "object_id"' with params ["files", 19040197, 19046758, 19042384, 19048301, "marribat"]: SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: character varying = integer
LINE 1: ...ts" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3...^ HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.","Code":0,"Trace":"
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(172): D\
octrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(151): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(918): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/owncloud/lib/private/DB/Connection.php(187): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(207): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(141): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/Comments/Manager.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php(114): OC\Comments\Manager->getNumberOfUnreadCommentsForNodes()
#8 /var/www/owncloud/lib/composer/sabre/event/lib/WildcardEmitterTrait.php(89): OCA\DAV\Connector\Sabre\CommentPropertiesPlugin->handleGetProperties()
#9 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1052): Sabre\DAV\Server->emit()
#10 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(984): Sabre\DAV\Server->getPropertiesByNode()
#11 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1661): Sabre\DAV\Server->getPropertiesIteratorForPath()
#12 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1646): Sabre\DAV\Server->writeMultiStatus()
#13 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/CorePlugin.php(346): Sabre\DAV\Server->generateMultiStatus()
#14 /var/www/owncloud/lib/composer/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin->httpPropFind()
#15 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server->emit()
#16 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server->invokeMethod()
#17 /var/www/owncloud/apps/dav/lib/Server.php(330): Sabre\DAV\Server->start()
#18 /var/www/owncloud/apps/dav/appinfo/v2/remote.php(31): OCA\DAV\Server->exec()
#19 /var/www/owncloud/remote.\
php(165): require_once('/var/www/ownclo...')
#20 {main}","File":"/var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php","Line":89}"}
{"reqId":"YIpYxbPqq7OeL0@3olX1gQAAAB0","level":4,"time":"2021-04-29T06:57:09+00:00","remoteAddr":"140.93.9.233","user":"marribat","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/marribat/PartageGabinMathieu","message":"Caused by: {"Exception":"Doctrine\DBAL\Driver\PDOException","Message":"SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: character varying = integer
LINE 1: ...ts" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3...^ HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.","Code":"42883","Trace":"
#0 /var/www/owncloud/lib/co\
mposer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(906): Doctrine\DBAL\Driver\PDOStatement->execute()
#1 /var/www/owncloud/lib/private/DB/Connection.php(187): Doctrine\DBAL\Connection->executeQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(207): OC\DB\Connection->executeQuery()
#3 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(141): Doctrine\DBAL\Query\QueryBuilder->execute()
#4 /var/www/owncloud/lib/private/Comments/Manager.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()
#5 /var/www/owncloud/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php(114): OC\Comments\Manager->getNumberOfUnreadCommentsForNodes()
#6 /var/www/owncloud/lib/composer/sabre/event/lib/WildcardEmitterTrait.php(89): OCA\DAV\Connector\Sabre\CommentPropertiesPlugin->handleGetProperties()
#7 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1052): Sabre\DAV\Server->emit()
#8 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(984): Sabre\DAV\Server->getPropertiesByNode()
#9 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1661): Sabre\DAV\Server->getPropertiesIteratorForPath()
#10 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1646): Sabre\DAV\Server->writeMultiStatus()
#11 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/CorePlugin.php(346): Sabre\DAV\Server->generateMultiStatus()
#12 /var/www/owncloud/lib/composer/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin->httpPropFind()
#13 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server->emit()
#14 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server->invokeMethod()
#15 /var/www/owncloud/apps/dav/lib/Server.php(330): Sabre\DAV\Server->start()
#16 /var/www/owncloud/apps/dav/appinfo/v2/remote.php(31): OCA\DAV\Server->exec()
#17 /var/www/owncloud/remote.php(165): require_once('/var/www/ownclo...')
#18 {main}","File":"/var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":131}"}
{"reqId":"YIpYxbPqq7OeL0@3olX1gQAAAB0","level":4,"time":"2021-04-29T06:57:09+00:00","remoteAddr":"140.93.9.233","user":"marribat","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/marribat/PartageGabinMathieu","message":"Caused by: {"Exception":"PDOException","Message":"SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: character varying = integer
LINE 1: ...ts" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3...^ HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.","Code":"42883","Trace":"
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(129): PDOStatement->execute()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(906): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/owncloud/lib/private/DB/Connection.php(187): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(207): OC\DB\Connection->executeQuery()
#4 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(141): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/owncloud/lib/private/Comments/Manager.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/owncloud/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php(114): OC\Comments\Manager->getNumberOfUnreadCommentsForNodes()
#7 /var/www/owncloud/lib/composer/sabre/event/lib/WildcardEmitterTrait.php(89): OCA\DAV\Connector\Sabre\CommentPropertiesPlugin->handleGetProperties()
#8 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1052): Sabre\DAV\Server->emit()
#9 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(984): Sabre\DAV\Server->getPropertiesByNode()
#10 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1661): Sabre\DAV\Server->getPropertiesIteratorForPath()
#11 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(1646): Sabre\DAV\Server->writeMultiStatus()
#12 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/CorePlugin.php(346): Sabre\DAV\Server->generateMultiStatus()
#13 /var/www/owncloud/lib/composer/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin->httpPropFind()
#14 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server->emit()
#15 /var/www/owncloud/lib/composer/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server->invokeMethod()
#16 /var/www/owncloud/apps/dav/lib/Server.php(330): Sabre\DAV\Server->start()
#17 /var/www/owncloud/apps/dav/appinfo/v2/remote.php(31): OCA\DAV\Server->exec()
#18 /var/www/owncloud/remote.php(165): require_once('/var/www/ownclo...')
#19 {main}","File":"/var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":129}"}

Browser log


Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

database log

< 2021-04-29 08:57:09.670 CEST > ERROR:  operator does not exist: character varying = integer at character 124
< 2021-04-29 08:57:09.670 CEST > HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
< 2021-04-29 08:57:09.670 CEST > STATEMENT:  SELECT "object_id" AS "id", COUNT("object_id") AS "count" FROM "oc_comments" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3, $4, $5)) AND ("object_id" NOT IN (SELECT "object_id" FROM "oc_comments_read_m
arkers" crm WHERE (crm."user_id" = $6) AND (crm."marker_datetime" >= c."creation_timestamp") AND (c."object_id" = crm."object_id"))) GROUP BY "object_id"
< 2021-04-29 08:57:10.024 CEST > ERROR:  operator does not exist: character varying = integer at character 124
< 2021-04-29 08:57:10.024 CEST > HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
< 2021-04-29 08:57:10.024 CEST > STATEMENT:  SELECT "object_id" AS "id", COUNT("object_id") AS "count" FROM "oc_comments" c WHERE ("object_type" = $1) AND ("object_id" IN ($2, $3, $4, $5, $6, $7, $8)) AND ("object_id" NOT IN (SELECT "object_id" FROM "oc_com
ments_read_markers" crm WHERE (crm."user_id" = $9) AND (crm."marker_datetime" >= c."creation_timestamp") AND (c."object_id" = crm."object_id"))) GROUP BY "object_id"
< 2021-04-29 08:57:29.335 CEST > ERROR:  operator does not exist: character varying = integer at character 124

Sorry, I’m unfortunately not a postgreSQL user, so I have very limited knowledge.

However I noticed:

Perhaps you’d be able to try to reproduce the issue with the latest 10.7 release of ownCloud?

1 Like

@mherrb I modified the log files to make it easier to read :wink:

I can see that you have a problem in oc_comments_read_markers when the users marribat tries to do something with the files with the ID 19040197, 19046758, 19042384, 19048301.

Try to check with something like: select * from oc_comments_read_markers
And look in your user marribat if it looks similar like this:

+----------+---------------------+-------------+-----------+
| user_id  | marker_datetime     | object_type | object_id |
+----------+---------------------+-------------+-----------+
| carlos   | 2018-03-01 19:29:35 | files       | 3676275   |
| carlos   | 2018-04-03 15:33:27 | files       | 3742366   |

The error from your database says:

 ERROR:  operator does not exist: character varying = integer at character 124

It looks like some character doesn’t match as an integer.

Quick solution that could work, remove the wrong comment from oc_comments and oc_comments_read_markers that could be related with PartageGabinMathieu

But as @@eneubauer said, I’m not a Postgres expert either. But It looks like your upgrade also upgraded the Database too and the configuration changed. Now the select needs quotes.

Check this explanation: https://stackoverflow.com/questions/50594882/sqlstate42883-undefined-function-you-might-need-to-add-explicit-type-casts

1 Like

https://github.com/owncloud/core/pull/38682 should fix the problem. It hasn’t been fully tested but it should work for postgresql

1 Like

Hi,

Yes your patch fixes the issue on my test system. Thanks for your help.

2 Likes

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