pierre-alain-b / rainloop-nextcloud

Rainloop plugin for Nextcloud
110 stars 37 forks source link

NC25: Call to undefined method OC_App::registerPersonal() #285

Closed cscholz closed 2 years ago

cscholz commented 2 years ago

I have updated to Nextcloud 25 RC2 today. Rainloop can no longer be activated since then.

Okt 02 23:23:29 NCServer Nextcloud[2247002]: {"reqId":"IbQMh4ZFdyAE0sMcbDRm","level":3,"time":"October 02, 2022 23:23:29","remoteAddr":"12.34.56.78","user":"ruth","app":"no app in context","method":"GET","url":"/apps/files","message":"{\"Exception\":\"Error\",\"Message\":\"**Call to undefined method OC_App::registerPersonal()**\",\"Code\":0,\"Trace\":[{\"file\":\"/path/nextcloud/apps/rainloop/lib/AppInfo/Application.php\",\"line\":83,\"function\":\"registerPersonal\",\"class\":\"OCP\\\\App\",\"type\":\"::\",\"args\":[\"rainloop\",\"templates/personal\"]},{\"file\":\"/path/nextcloud/apps/rainloop/appinfo/app.php\",\"line\":13,\"function\":\"registerPersonalSettings\",\"class\":\"OCA\\\\RainLoop\\\\AppInfo\\\\Application\",\"type\":\"->\",\"args\":[]},{\"file\":\"/path/nextcloud/lib/private/legacy/OC_App.php\",\"line\":306,\"args\":[\"/path/nextcloud/apps/rainloop/appinfo/app.php\"],\"function\":\"require_once\"},{\"file\":\"/path/nextcloud/lib/private/legacy/OC_App.php\",\"line\":187,\"function\":\"requireAppFile\",\"class\":\"OC_App\",\"type\":\"::\",\"args\":[{\"__class__\":\"OCA\\\\RainLoop\\\\AppInfo\\\\Application\"}]},{\"file\":\"/path/nextcloud/lib/private/legacy/OC_App.php\",\"line\":141,\"function\":\"loadApp\",\"class\":\"OC_App\",\"type\":\"::\",\"args\":[\"rainloop\"]},{\"file\":\"/path/nextcloud/lib/base.php\",\"line\":1027,\"function\":\"loadApps\",\"class\":\"OC_App\",\"type\":\"::\",\"args\":[]},{\"file\":\"/path/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\",\"args\":[]}],\"File\":\"/path/nextcloud/lib/public/App.php\",\"Line\":54,\"message\":\"App rainloop threw an error during app.php load and will be disabled: Call to undefined method OC_App::registerPersonal()\",\"CustomMessage\":\"App rainloop threw an error during app.php load and will be disabled: Call to undefined method OC_App::registerPersonal()\"}","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.53","version":"25.0.0.14"}

According to nextcloud (lib/public/App.php), the registerPersonal function is deprecaed

[...]
        /**
         * Register a Configuration Screen that should appear in the personal settings section.
         * @param string $app appid
         * @param string $page page to be included
         * @return void
         * @since 4.0.0
         * @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections
         */
        public static function registerPersonal($app, $page) {
                \OC_App::registerPersonal($app, $page);
        }
[...]

It helped to disable the function call.

/apps/rainloop/appinfo/app.php
[...]
$app = new OCA\RainLoop\AppInfo\Application();
$app->registerNavigation();
//$app->registerPersonalSettings();
$app->getContainer()->query('RainLoopHelper')->registerHooks();
[...]
pierre-alain-b commented 2 years ago

Is there any impact of disabling the function call?

cscholz commented 2 years ago

The app can then be activated and used.

In the admin area, the menu item for setup can be reached further. I think with the user there was also a setting item. I don't see it anymore - if it was really there before.

the-djmaze commented 2 years ago

Check my above commit solution for the personal settings area

pierre-alain-b commented 2 years ago

I recommend that you take a loot at snappymail being ported to Nextcloud. Snappymail is maintained unlike Rainloop that seems not to be anymore. https://github.com/the-djmaze/snappymail/issues/96