You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want people to create discussions using at minimum one primary tag and at minimum one primary subtag, it doesn't work properly because the primary subtag doesn't equal the secondary tag.
It gives an error about lack of permission.
Steps to Reproduce
Create a primary tag and put a primary subtag in it
In the settings specify minimum primary tags 1 and minimum secondary tags 1
Try to create a discussion by specifying one primary tag and a primary subtag
It will give a permissions error
Expected Behavior
When you create a discussion using at minimum one primary tag and one primary sub tag the discussion should create and not give permission errors
Screenshots
No response
Environment
Flarum version: 1.8.7
Webserver: nginx/1.18
Hosting environment: vps
PHP version: 8.3.8
Browser: Firefox 131
Output of php flarum info
No response
Possible Solution
After reviewing the open-source code of the tag extension, I concluded that the check for whether a tag is secondary is done through "tags.position == null".
However, primary subtags have a position, and to fix this, we need to use the following check: "tags.position == null || tags.parent_id != null".
This way, primary subtags will also be considered as secondary tags, as they currently should be.
I also believe we need to check if "tags.parent_id != null" and if the parent of this tag is included in the selected tags.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
This is a feature request rather than a bug because it assumes that subtags should be considered secondary tags, but that's not the case.
What should be done is a new min max count requirement per parent/sub tag.
So if the primary tag requirement is set to 3, the admin should be able to determine 2 for parent, 1 for sub tag(for example) or leave those empty and it works the way it currently does.
It's definitely a feature request. I do think the tags extension is confusing at best, and proposals have passed in the past to refactor the extension at least in terminology, but adding another min/max for nested/sub/child tags is definitely something to line up.
I believe a refactoring of tags under 2.x would be wise.
Current Behavior
If I want people to create discussions using at minimum one primary tag and at minimum one primary subtag, it doesn't work properly because the primary subtag doesn't equal the secondary tag.
It gives an error about lack of permission.
Steps to Reproduce
Expected Behavior
When you create a discussion using at minimum one primary tag and one primary sub tag the discussion should create and not give permission errors
Screenshots
No response
Environment
Output of
php flarum info
No response
Possible Solution
After reviewing the open-source code of the tag extension, I concluded that the check for whether a tag is secondary is done through "tags.position == null".
However, primary subtags have a position, and to fix this, we need to use the following check: "tags.position == null || tags.parent_id != null".
This way, primary subtags will also be considered as secondary tags, as they currently should be.
I also believe we need to check if "tags.parent_id != null" and if the parent of this tag is included in the selected tags.
Additional Context
No response
The text was updated successfully, but these errors were encountered: