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

No categories in Standard CEs #689

Open
bernhardberger opened this issue Dec 16, 2023 · 4 comments
Open

No categories in Standard CEs #689

bernhardberger opened this issue Dec 16, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@bernhardberger
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
Create a CE (doesn't seem to matter which, tried Images and File Links) and add Categories
image

API doesn't output any categories, just an empty string.
image

Expected behavior
To get Categories in any form

TYPO3 version and TYPO3 Headless version
TYPO3 12.4.8, EXT:headless 4.2.3

@bernhardberger bernhardberger added the bug Something isn't working label Dec 16, 2023
@schloram
Copy link
Contributor

@bernhardberger Where are your category records stored?

@bernhardberger
Copy link
Author

Not on pid=0.

I figured it out that the TS select only gets categories from the root pid. Not sure if that's a good default tbh, especially for sites with multi tree.

@schloram
Copy link
Contributor

@bernhardberger Yes that is he issue here. Even though the TYPO3 Documentation has an example to get categories from root I don't think it's ideal since you might want to have different categories for different site roots.

In this case it would be better to use pidInList = leveluid : 0 with recursive imho. But since this would ignore the records from root (page uid 0) completely you would be better of overriding lib.contentElement.fields.categories with these changes yourself.

Another approach would be using pidInList = root with recursive to get every category from the root and below.

@lukaszuznanski
Copy link
Collaborator

I think it needs to be specified per project, but we can think of better default setting. @schloram approach with pidInList = root and recursive sounds good for starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants