modifyClass does not override action?

I’m working on fixing deprecations in GitHub - paviliondev/discourse-legal-tools: Tools to help with legal compliance when using Discourse and I found that the api.modifyClass('controller:user-activity', {}); does not seem to be doing anything anymore (here)

The exportUserArchive() function still exists and the initializer is being called.

I already tried changing this to a pre-initializer and move the function outside of the actions{} but to no avail.

Is there anyone who can shine some light on this?

EDIT to add, this is apparently broken in 3.1 already.

5 Likes

So that code turns out to be stale.

The button was moved to preferences/account UX: move data export to preferences page for new user nav (#20141) · discourse/discourse@e5f557b · GitHub and the old code was never removed from the other controller.

5 Likes

Well done!

3 Likes

@awesomerobot @david does some code here need removal?

3 Likes

Indeed! thanks for mentioning it… this will do it:

7 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.