Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Load public share link file creation again #548

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Apr 16, 2024

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

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr added 3. to review Waiting for reviews bug Something isn't working labels Apr 16, 2024
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr self-assigned this Apr 16, 2024
Copy link
Contributor

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a little bit of deprecation removal would be nice on top.
🍰

})
}

axios.post(OC.generateUrl('apps/officeonline/ajax/documents/create'), { mimetype, filename, dir }).then(({ data }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use @nextcloud/router for generateUrl ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/helpers/url.js could also use that fix.

@juliusknorr juliusknorr merged commit bf6ce47 into main Apr 17, 2024
27 checks passed
@juliusknorr juliusknorr deleted the fix/load-sharing-create-file branch April 17, 2024 11:18
@alx-tuilmenau
Copy link

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"....

@juliusknorr
Copy link
Member Author

Thanks for the info. Could you check with adding the patch from #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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants