Error "Unable to configure link to 'Auto Send Messages'. Ensure ad-blockers are disabled and try reloading the page."

I’m trying to add a simple tab to use my new plugin but I get the following error message:

Unable to configure link to ‘Auto Send Messages’. Ensure ad-blockers are disabled and try reloading the page.

This new plugin is very simple, it should display a simple form in a new tab with some fields an admin user can set (subject, body, messages_limit, etc.). Then, after clicking a button a script will run and start sending private messages from a specific user to a set of users based on the fields mentioned before.

When pushing the changes to my dev VM in the cloud I get the same behavior. I tried with different browsers but I got the same screen. The plugin settings can be accessed in the settings menu but I can not see the new admin tab.

I found the following item in Discourse Resolving "SyntaxError: Unexpected identifier #..." caused by Cloudflare Auto Minify but the auto-minify feature is no longer available in CloudFlare, I could only clean the cache but it did not make any difference.

Is there another way to achieve this without my plugin? I need to send X messages daily without repeating the same users of the previous day’s ordering by user creation date or last seen.

1 Like

I am working with @Xavier_Garzon on this - I also have not been able to find any clues as to why we get this error, or how to rectify it. Does anyone have a plugin that creates an admin tab that is functional?

I spent sometime hunting around cloudflare (assuming that might be the problem) but as @Xavier_Garzon laid out, there is no auto-minify setting any more, at least not through their interface. I don’t know if that is indeed related to this issue, but it’s worth noting that setting is indeed gone.

Another update here, we turned off cloudflare completely and that appears to have no impact on this error. Does anyone have any other ideas here, or have a plugin that utilizes an admin tab that works?

You are going to need to share your current code here, impossible to answer without context

1 Like

Thanks @sam - no problem will do shortly.

Cc @Xavier_Garzon

Okay here we go, the plugin currently lives here, perhaps there is some obvious issue with our implementation:

Thanks all for the help!

Hmm it would be great if you could follow Creating consistent admin interfaces (plugin section). Most information you need is there.

Right off the bat I’m going to suggest a few things

  • use settings.yml instead of defining your settings in plugin.rb
  • add_admin_route "auto_send_messages.title", "auto-send-messages", use_new_show_route: true
2 Likes

Thanks @nat!

I adjusted the second point you mentioned and we can see the plugin in the tabs. We may be missing a simple route config.

Unfortunately, the application does not give errors beyond the 404 page. On the other hand, in the plugin settings, I can see the parameters we want to use.

Do you know about a simple plugin that uses a form and makes a request? That would be very useful for us.

1 Like

Thanks @nat ! Also worth noting the repo has the most recent changes as well if that helps with any ideas. Thanks all for the assistance!