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

files_sharing is missing loadAdditionalScripts #22328

Closed
oparoz opened this issue Feb 11, 2016 · 8 comments · Fixed by #31480
Closed

files_sharing is missing loadAdditionalScripts #22328

oparoz opened this issue Feb 11, 2016 · 8 comments · Fixed by #31480

Comments

@oparoz
Copy link
Contributor

oparoz commented Feb 11, 2016

It's currently not possible to safely add Javascript to files_sharing as it's not dispatching the loadAdditionalScripts event.
Until this is fixed, core and any installed apps will be polluted by apps which add their scripts to app.php without making any checks to make sure they're on the page they target, leading to broken apps and core.

@oparoz oparoz added this to the 9.1-next milestone Feb 11, 2016
@nickvergessen
Copy link
Contributor

What do you mean? it should dispatch the event on the public page?

@oparoz
Copy link
Contributor Author

oparoz commented Feb 15, 2016

it should dispatch the event on the public page?

Exactly, allowing apps to behave properly by only loading their scripts on pages firing the loadAdditionalScripts event.

@PVince81
Copy link
Contributor

PVince81 commented Dec 8, 2016

backlog for now, PRs welcome

@Rello
Copy link
Contributor

Rello commented Apr 15, 2018

Hello,

any plan to fix this right now?
seems was fixed in NC already. for now, the "proper" code with

$eventDispatcher->addListener('OCA\Files_Sharing::loadAdditionalScripts',
does not trigger in OC.

e.g. gallery has now 2 versions per cloud which could be avoided I guess?
https://github.com/owncloud/gallery/blob/master/appinfo/app.php#L61-L67

https://github.com/nextcloud/gallery/blob/master/appinfo/app.php#L77

I would like to avoid this for the Audio Player in my case

@PVince81
Copy link
Contributor

I'd be fine adding this event if needed. Mind submitting a PR ?

@Rello
Copy link
Contributor

Rello commented Apr 29, 2018

@PVince81 I don´t have an idea on how to implement this. any chance that this is being provided by oC until the next release?

@PVince81
Copy link
Contributor

@Rello please test with #31480 and let me know if it works for you

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants