Closed rafaucau closed 4 weeks ago
That seems right regarding the source - this is what Clockwork shows as the query coming with no user constraint
Is either of you able to provide a patch to 1.x. I'm not sure this applies to 2.x, I'd have to check.
I could create a PR. Probably, it is necessary to modify SlugDriverInterface to accept additional query parameters for this to work. Maybe @SychO9 has some hints?
@luceos path provided in #4008 and #4009
Current Behavior
The tag state is being loaded for the first user in the database instead of the currently logged-in user. This issue affects extensions like Follow Tags that rely on eager loading of the tag state, causing them to not function correctly. See: https://github.com/FriendsOfFlarum/follow-tags/issues/72#issuecomment-2222283587
Steps to Reproduce
Expected Behavior
The subscription state of tags should be loaded for the currently logged-in user, ensuring that extensions like Follow Tags work as expected.
Screenshots
Modified vendor/flarum/tags/src/Api/Controller/ShowTagController.php to display some info:![image](https://github.com/flarum/framework/assets/25438601/8a4cec07-de8e-43ea-88b4-dc3785a74975)
Environment
Additional Context
This issue was initially identified while troubleshooting an issue with the Follow Tags (v1.2.3) extension. The problem lies in this controller: ShowTagController
https://github.com/flarum/framework/blob/2a693db1b65cf7b0f7e76cbaa695a5e65bd947f6/extensions/tags/src/Api/Controller/ShowTagController.php#L72