Error after successful upgrade from 24.0.7 to 25.0.1, "pageMode is not a valid attribute"

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): debian 11.5
Apache or nginx version (eg, Apache 2.4.25): apache 2.4.54
PHP version (eg, 7.4): 7.4

The issue you are facing:

After upgrading from version 24.0.7 to 25.0.1 (no errors during upgrade), i’m getting “internal server error” on almost all pages (for example dashboard page or user settings page) as response when trying to access them with the browser and the error mentioned below shows up in the logs.

Is this the first time you’ve seen this error? (Y/N):
y

Steps to replicate it:

  1. With version 24.0.7 installed, run updater.phar to upgrade to 25.0.1
  2. Access dashboard page

The output of your Nextcloud log (from syslog):

{"reqId":"6p5wK4R1qNykZMF2dVmC","level":3,"time":"2022-11-18T16:15:20+00:00","remoteAddr":"<hidden identifiable information>","user":"<hidden identifiable information>","app":"index","method":"GET","url":"/","message":"{\"Exception\":\"BadFunctionCallException\",\"Message\":\"pageMode is not a valid attribute\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php\",\"line\":165,\"function\":\"setter\",\"class\":\"OCP\\\\AppFramework\\\\Db\\\\Entity\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php\",\"line\":73,\"function\":\"__call\",\"class\":\"OCP\\\\AppFramework\\\\Db\\\\Entity\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php\",\"line\":322,\"function\":\"fromRow\",\"class\":\"OCP\\\\AppFramework\\\\Db\\\\Entity\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php\",\"line\":340,\"function\":\"mapRowToEntity\",\"class\":\"OCP\\\\AppFramework\\\\Db\\\\QBMapper\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/collectives/lib/Db/CollectiveMapper.php\",\"line\":107,\"function\":\"findEntities\",\"class\":\"OCP\\\\AppFramework\\\\Db\\\\QBMapper\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/collectives/lib/Service/CollectiveHelper.php\",\"line\":52,\"function\":\"findByCircleIds\",\"class\":\"OCA\\\\Collectives\\\\Db\\\\CollectiveMapper\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/collectives/lib/Mount/MountProvider.php\",\"line\":75,\"function\":\"getCollectivesForUser\",\"class\":\"OCA\\\\Collectives\\\\Service\\\\CollectiveHelper\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/collectives/lib/Mount/MountProvider.php\",\"line\":126,\"function\":\"getFoldersForUser\",\"class\":\"OCA\\\\Collectives\\\\Mount\\\\MountProvider\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php\",\"line\":124,\"function\":\"getMountsForUser\",\"class\":\"OCA\\\\Collectives\\\\Mount\\\\MountProvider\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/SetupManager.php\",\"line\":225,\"function\":\"addMountForUser\",\"class\":\"OC\\\\Files\\\\Config\\\\MountProviderCollection\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/SetupManager.php\",\"line\":317,\"function\":\"OC\\\\Files\\\\{closure}\",\"class\":\"OC\\\\Files\\\\SetupManager\",\"type\":\"->\",\"args\":[\"*** sensitive parameters replaced ***\"]},{\"file\":\"/var/www/nextcloud/lib/private/Files/SetupManager.php\",\"line\":226,\"function\":\"setupForUserWith\",\"class\":\"OC\\\\Files\\\\SetupManager\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/legacy/OC_Util.php\",\"line\":111,\"function\":\"setupForUser\",\"class\":\"OC\\\\Files\\\\SetupManager\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1086,\"function\":\"setupFS\",\"class\":\"OC_Util\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php\",\"Line\":136,\"CustomMessage\":\"--\"}","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0","version":"25.0.1.1"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '<hidden identifiable information>',
  'passwordsalt' => '<hidden identifiable information>',
  'datadirectory' => '/srv/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.1.1',
  'dbname' => '<hidden identifiable information>',
  'dbhost' => '127.0.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => '<hidden identifiable information>',
  'dbpassword' => '<hidden identifiable information>',
  'installed' => true,
  'loglevel' => '3',
  'log_type' => 'syslog',
  'maxZipInputSize' => 1073741824,
  'allowZipDownload' => true,
  'theme' => '',
  'maintenance' => false,
  'forcessl' => true,
  'trusted_domains' => 
  array (
    0 => '<hidden identifiable information>',
    1 => '<hidden identifiable information>',
    2 => '<hidden identifiable information>',
  ),
  'secret' => '<hidden identifiable information>',
  'share_folder' => '/Shared',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'sendmail',
  'mail_domain' => '<hidden identifiable information>',
  'trashbin_retention_obligation' => 'auto',
  'updater.release.channel' => 'stable',
  'default_language' => 'de',
  'overwrite.cli.url' => '<hidden identifiable information>',
  'mail_smtpauthtype' => 'LOGIN',
  'mysql.utf8mb4' => true,
  'default_phone_region' => 'DE',
);

I searched for the “pageMode is not a valid attribute” message and found one result, which unfortunately has no hint for the cause at the time i am writing this:

Same problem here.

Nextcloud version: 25.0.1.1
OS: Debian 11
Apache 2.4.54
PHP 7.4.33

Updated from 24.0.7 to 25.0.1 via WebUpdater without problem. After the update a generic “internal server error” was shown.

Used occ upgrade and occ maintenance:repair (no errors were shown). After that, the dashboard is still unavailable - but the internal server error is now “nextcloud branded” (instead of the generic one before)

Nextcloud log shows the same message:

....,"app":"index","method":"GET","url":"/","message":"pageMode is not a valid attribute","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.1.1","exception":{"Exception":"BadFunctionCallException","Message":"pageMode is not a valid attribute","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php","line":165,"function":"setter","class":"OCP\\AppFramework\\Db\\Entity","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php","line":73,"function":"__call","class":"OCP\\AppFramework\\Db\\Entity","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":322,"function":"fromRow","class":"OCP\\AppFramework\\Db\\Entity","type":"::"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":340,"function":"mapRowToEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/collectives/lib/Db/CollectiveMapper.php","line":107,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/collectives/lib/Service/CollectiveHelper.php","line":52,"function":"findByCircleIds","class":"OCA\\Collectives\\Db\\CollectiveMapper","type":"->"},{"file":"/var/www/nextcloud/apps/collectives/lib/Mount/MountProvider.php","line":75,"function":"getCollectivesForUser","class":"OCA\\Collectives\\Service\\CollectiveHelper","type":"->"},{"file":"/var/www/nextcloud/apps/collectives/lib/Mount/MountProvider.php","line":126,"function":"getFoldersForUser","class":"OCA\\Collectives\\Mount\\MountProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php","line":124,"function":"getMountsForUser","class":"OCA\\Collectives\\Mount\\MountProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":225,"function":"addMountForUser","class":"OC\\Files\\Config\\MountProviderCollection","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":317,"function":"OC\\Files\\{closure}","class":"OC\\Files\\SetupManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":226,"function":"setupForUserWith","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":111,"function":"setupForUser","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1086,"function":"setupFS","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php","Line":136,"CustomMessage":"--"}}

I found the culprit: disabling Collectives (i ran version 2.0.0) solved the problem for me. Disabled via

sudo -u www-data php occ app:disable collectives
1 Like

I can confirm that after disabling the “collectives” app, the error is gone. At this point the instance is usable again, thanks!

Looks like this is an issue with the migration to 1.6 of collectives which may persist if updating to Nextcloud 25 and collectives 2.0.0 afterwards.
This comment has a workaround for enabling collectives again:

Also 2.1.0 with a fix will be published asap.

FYI: Collectives 2.1.0 has just been released. Works without problems on NC25!