Closed PrinzJuliano closed 1 year ago
@PrinzJuliano Will take a quick look
@PrinzJuliano Looked into it and can't replicate the is issue. if I do. http://localhost:1337/api/blogs?locale=nl and api/blogs is protected I don't have any issues.
For testing:
Add more than one locale in http://localhost:1337/admin/settings/internationalization
Now create multiple translations of (e.g. the blog model) the same entity
When accessing http://localhost:1337/api/blogs/1?populate[0]=localizations localizations
will not be populated
Accessing the findAll Route works as expected. Populating the localizations of a find One Route does not work when using the protected populations plugin.
I am sorry to not have clarified and provided a testing scenario.
I see now it is correct that is blocked I will write an update this weekend what will fix this issue
Thank you very much for your work. If you need anything to further test this issue, I am more than happy to provide. This plugin elevates some of the pain points I have in working and writing code for strapi customization.
@PrinzJuliano strapi-plugin-protected-populate@1.3.3 should fix your issue I added localizations to the UI when localization is enabled on the content-type
Thanks, I will try the update
I have tried the update and can report that everything works as expected.
Thank you very much for your work.
When protecting a route, the populated localizations will always be omitted.
Using the strapi i18n Plugin does not work with protected-routes. After manually adding the
locale
field in the config file, as the GUI does not support that, the field is returned. However, the populated localizations cannot be added this way.With an unprotected route, populating the
localizations
Field will return all entities with their respective locale.When protecting the route, the population will be omitted, with no way to add it back.
I tried adding it to the populate section in the index.json to no avail.