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

[BUGFIX] Respect configured Doktypes while Auto-Tagging #235

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

magicHatOfTYPO3
Copy link
Contributor

If Page Indexer has configured non-standard doktypes, respect them for auto-tagging.

Fixes #233

@christianbltr
Copy link
Member

Thanks for the bugfix. Could you please have a look at the failed CI checks and fix them?

You are using preg_match() to check if the parameter contains a comma-separated list. While this should work totally fine I'm wondering if it would be better to use a combination of GeneralUtility:intExplode() and array_unique().
I see the following advantages:

  • Easier to read and understand than regex.
  • Will work with with trailing and leading commata (,1,2,3 or 1,2,3,). Of course this is not a correct comma-separated list but I guess it could happen because the value is entered manually.
  • Using array_unique() we will have each number in the where clause only once which is a bit cleaner in my opinion.

@magicHatOfTYPO3
Copy link
Contributor Author

Hi @christianbltr ,

thanks for your reply. I agree, that GU:intExplode is the better option and have refactored the code.

@christianbltr christianbltr merged commit 751e908 into tpwd:master Jul 19, 2024
4 checks passed
@christianbltr
Copy link
Member

Thanks!

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.

Auto-Tagging does not work on custom Page-Types
2 participants