Closed stevecomrie closed 3 years ago
This also works (in ether\tagManager\elements\db\TagQuery
)
public static function find (): ElementQueryInterface { return new TagQuery('craft\elements\Tag'); }
edit: this will get the tag list working but it's not a fix for the underlying element type issue.
This also works (in
ether\tagManager\elements\db\TagQuery
)
public static function find (): ElementQueryInterface { return new TagQuery('craft\elements\Tag'); }
There's the elegant solution that I knew had to exist but was eluded by my ham fists.
public static function find (): ElementQueryInterface { return new TagQuery('craft\elements\Tag'); }
Lovely solution - wish i understood it better!
For anyone seeking to implement meestaben's solution above it goes in Tag.php vendor/ether/tags/src/elements/Tag.php
I did just notice that while meestaben's solution does work, there is a small difference in that tags that are editable do not show up as having a blue underline in the UI.
Where as with my solution they do.
Not sure what's causing that or if it's the only side-effect but just something to keep in mind in-case anyone notices anything else that isn't quite working properly.
Not 100% sure if this is the right way to fix the issue, but this gets the job done given the recent element type filtering introduced in craftcms/cms@636f778
Hopefully it's at least a road map toward a more elegant solution.
Resolves #18