nextcloud / officeonline

officeonline
43 stars 15 forks source link

fix: Load public share link file creation again #548

Closed juliushaertl closed 4 months ago

juliushaertl commented 4 months ago

Apparently I cleaned up a bit too much when preparing the 28 compatibility as the new files menu is still needed for public share links

alx-tuilmenau commented 4 months ago

On NC 271.8 (App Version 2.1.2, but 2.2.0 should have the same problem), I get error messages because of this Update.

Could not load event listener service OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener: Could not resolve OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener! Class \"OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener\" does not exist. Make sure the class is auto-loadable by the Nextcloud server container ``` {"reqId":"A576jGpFMWUPJ2t2sm7i","level":3,"time":"2024-04-23T21:52:11+00:00","remoteAddr":"xxx","user":"--","app":"no app in context","method":"GET","url":"/s/7XxxxPMqC5Ydn7a","message":"Could not load event listener service OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener: Could not resolve OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener! Class \"OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener\" does not exist. Make sure the class is auto-loadable by the Nextcloud server container","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15","version":"27.1.8.1","exception":{"Exception":"OC\\AppFramework\\Utility\\QueryNotFoundException","Message":"Could not resolve OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener! Class \"OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener\" does not exist","Code":0,"Trace":[{"file":"/data/nextcloud_a2/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/data/nextcloud_a2/lib/private/ServerContainer.php","line":171,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/data/nextcloud_a2/lib/private/EventDispatcher/ServiceEventListener.php","line":70,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/data/nextcloud_a2/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/data/nextcloud_a2/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/data/nextcloud_a2/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/data/nextcloud_a2/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/data/nextcloud_a2/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php","line":248,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/data/nextcloud_a2/apps/files_sharing/lib/Controller/ShareController.php","line":378,"function":"renderPage","class":"OCA\\Files_Sharing\\DefaultPublicShareTemplateProvider","type":"->"},{"file":"/data/nextcloud_a2/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"showShare","class":"OCA\\Files_Sharing\\Controller\\ShareController","type":"->"},{"file":"/data/nextcloud_a2/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/nextcloud_a2/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/data/nextcloud_a2/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/data/nextcloud_a2/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/data/nextcloud_a2/index.php","line":38,"function":"handleRequest","class":"OC","type":"::"}],"File":"/data/nextcloud_a2/lib/private/AppFramework/Utility/SimpleContainer.php","Line":131,"message":"Could not load event listener service OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener: Could not resolve OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener! Class \"OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener\" does not exist. Make sure the class is auto-loadable by the Nextcloud server container","exception":{},"CustomMessage":"Could not load event listener service OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener: Could not resolve OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener! Class \"OCA\\Officeonline\\Listener\\SharingLoadAdditionalScriptsListener\" does not exist. Make sure the class is auto-loadable by the Nextcloud server container"}} ```

There is no File "SharingLoadAdditionalScriptsListener.php"....

juliushaertl commented 4 months ago

Thanks for the info. Could you check with adding the patch from https://github.com/nextcloud/officeonline/pull/553

You can apply the patch by running this within the officeonline app directory:

wget -O /tmp/officeonline-553.patch https://github.com/nextcloud/officeonline/pull/553.patch
patch -p1 < /tmp/officeonline-553.patch
alx-tuilmenau commented 4 months ago

Thanks for the reply. It looks like the patch solves the problem with the error messages in the log. Unfortunately I cannot check if the online office works at this time, because it's only installed for testing purposes and the office server is not available by now.