One of the changes to Discourse in the last week or so broke my plugin and I cannot work out what is actually wrong or how to fix it. Plugin worked fine for years until this point.
The plugin does various things, but the one that seems relevant here is adding a button to the user profile page.
Now, when I visit that page for any user, most of the page does not render (including the button my plugin aims to add):
Iām not sure what to make of that error as it isnāt my code, and the t which is not a function isnāt on the line, or anything near it, which the exception is coming from. Quite confusing. But I am not a JS expert so maybe Iām just missing something here.
From stepping through with the Chrome debugger, the problem happens on that line while processing my pluginās template, but I cannot see what is actually causing the problem, or if itās due to something I need to change/update or a bug in Discourse itself.
The plugin JS code and HBS template which I think are involved is in my user-profile-primary connector, which can be found here:
Hi @LeoDavidson - thanks for raising this issue. Youāre almost certainly correct that itās related to those commits - Iāll dig into it and try to work out what changed. I didnāt intend to introduce any changes in behaviour.
But in the meantime, this PR should fix the issue by moving your plugin connectors to a more common directory layout:
That extra /user/ in the path means that it isnāt detected by our 'unColocateConnectors` logic
I had a search through all-the-plugins and all-the-themes and I donāt see any other occurrences of this directory layout. So Iām going to leave things as-is for now, unless we get more reports of issues.