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

fix: fixing countDraftRelations to get locale as a prop #20324

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hiba-ijjig-nw
Copy link

What does it do?

Modified countDraftRelations to retrieve the locale from parameters, allowing it to verify the single type for the specified query locale instead of defaulting to the locale

Why is it needed?

Currently, countDraftRelations does not retrieve a specified locale. The locale is not provided in the parameters that's why the default locale is used to fetch the entity from the database. If the entity has not been created in the default locale, users will be unable to publish the single type in their specified locale.

How to test it?

  1. Choose a single type that hasn't been created for the default locale yet.
  2. Switch to a locale other than the default, and fill in the content.
  3. Try to publish it, and the content will be published successfully.

Related issue(s)/PR(s)

This PR fixes this issue #20188

Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contributor-docs ❌ Failed (Inspect) May 17, 2024 10:40am

@strapi-cla
Copy link

strapi-cla commented May 17, 2024

CLA assistant check
All committers have signed the CLA.

@joshuaellis joshuaellis added source: core:content-manager Source is core/content-manager package pr: fix This PR is fixing a bug fix:4 Fix made in Strapi 4 labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix:4 Fix made in Strapi 4 pr: fix This PR is fixing a bug source: core:content-manager Source is core/content-manager package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants