Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue 18, tags not appearing after craftcms/cms@636f778 #19

Merged
merged 1 commit into from
Oct 4, 2021
Merged

Fixing issue 18, tags not appearing after craftcms/cms@636f778 #19

merged 1 commit into from
Oct 4, 2021

Conversation

stevecomrie
Copy link
Contributor

@stevecomrie stevecomrie commented Sep 28, 2021

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

@benatleith
Copy link

benatleith commented Sep 28, 2021

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.

@stevecomrie
Copy link
Contributor Author

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.

@alanski66
Copy link

alanski66 commented Sep 28, 2021

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

@stevecomrie
Copy link
Contributor Author

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.

@Tam Tam changed the base branch from master to dev October 4, 2021 12:45
@Tam Tam merged commit 81d3825 into ethercreative:dev Oct 4, 2021
@stevecomrie stevecomrie deleted the issue-18-patch branch October 7, 2021 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recent Craft update causes no tags to be listed at /admin/tags
4 participants