Tiny Tiny RSS: Community

Scriptaliculous/controls.js failing to load after recent updates: breaking plugins?


Recent updates seem to have broken my plugin, ttrss-to-wallabag_v2

After updating to v18.12 (fca78f7), refreshing ttrss gives the following errors in console:

Loading failed for the <script> with source “https://ttrss.example.com/lib/scriptaculous/controls.js”.
this is followed by:
failed to initialize plugin JS: wallabag_v2
ReferenceError: "hotkey_actions is not defined"

Removing the hotkey_actions bit from the plugin, the plugin loads but still fails to execute with an error complaining that notify_progress is not defined. Removing notify_progress results in an error complaining that param_escape is not being defined, and so on.

Running this on Ubuntu 18.04, latest updates at the time of posting, with nginx and php7.2-fpm.


due to many recent changes in base tt-rss code, pretty much all plugins with javascript code will have to be updated


Is there a reference that you can point me to so that I can quickly make these changes? Also, would these changes explain why scriptaculous/controls.js is failing to load?


lol reference
im afraid the reference is the source code

re controls.js: the file was not removed, as to why it doesn’t load for you, i have no idea
checking httpd logs would be a good start


Reading through the source. :slight_smile:
Reading through the logs.


well i hope you will enjoy reading it as much as i enjoyed writing it



It was brainlessly simple to alter notify_progress to Notify.progress, and the rest of the notify issues, and likewise switching param_escape to encodeURIComponent. I am still looking for the hotkey_actions switch?

Regardless, httpd logs show nothing regarding control.js. Not sure what is happening there. Things are still working, but it isn’t loading, nor is there anything meaningful being produced to let me know why.


hotkey actions live in the App object, you will have to write a tiny pluginhost hook to get to it
theres a yesterday’s thread about it


I had the same “issue” with hotkey_actions.

You can see my little plugin which now uses PluginHost here:

Thank you @fox for all your hard work and your help !


Thanks! I was reading through your code already.

I have everything set up but for one last issue, my plugin used getActiveArticleId when sharing. I’m getting the error complaining that this, too is not defined!


Also, thank you @fox for your quick replies and for ttrss. I appreciate the hard work you put into this!


all these methods have been renamed, it’s getActive now AFAIK.


Indeed! Article.getActive did the trick!

Thank you @ggrandou


Here is the resultant js for berevity.