In the “Help wanted on plugin controller” thread, RGJ reports issues developing a Sitemap plugin for Discourse, specifically that the controller code is never executed, resulting in a “page not found” error despite correct routing attempts. zogstrip suggests the problem might be duplicate routes for sitemap.xml. RGJ later shares a workaround involving monkey-patching robots_txt instead of using the engine. EndruK confirms experiencing the same issue where controller methods are not called. Although RGJ admits the original controller issue was never resolved, EndruK provides a solution involving adding a client-side route equivalent to the server route and calling the server controller from the client. However, RGJ counters that this advice is inapplicable because robots.txt is requested by search engine bots rather than users, rendering the Ember route map unnecessary for this specific use case.
If I rename the generate method or change the route, I get an error that the controller could not be found, so I should be on the right path here. Is there anyone who can spot (the probably very trivial) issue?
Did you get it to work?
I got exactly the same problem, that my controller method code never gets called but the application knows the controller and his methods.