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

Respect Language public status for page public status #2017

Merged
merged 3 commits into from
Feb 8, 2021

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Feb 5, 2021

What is this pull request for?

A page is only considered public if the language is also public. This is always the case for the default language, because there cannot be at least one public default language (assurred in the language validations).

Also do not unpublish all pages if language gets unpublished. This was a very destrutive behavior and should not be done.
Instead we should take the languages public status into account for the page publication status.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen requested a review from mamhoff February 5, 2021 16:42
@tvdeyen tvdeyen added this to the 6.0 milestone Feb 5, 2021
@tvdeyen tvdeyen force-pushed the page-public-if-language-public branch from 95cab72 to caef536 Compare February 5, 2021 17:35
@tvdeyen tvdeyen force-pushed the page-public-if-language-public branch from caef536 to 1c8fc80 Compare February 5, 2021 18:17
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

This is a very destrutive behavior and should not be done.
Instead we should take the languages public status into account
for the page publication status.
A page is only considered public if the language is also public. This is
always the case for the default language, because there cannot be at
least one public default language (assurred in the language validations).
@tvdeyen tvdeyen force-pushed the page-public-if-language-public branch from 1c8fc80 to 86e7223 Compare February 8, 2021 08:39
In order to tell people that they should publish the language before
publishing the page we disable the publish button with a nice little
notice.
@tvdeyen tvdeyen force-pushed the page-public-if-language-public branch from 86e7223 to 96152f3 Compare February 8, 2021 08:41
@tvdeyen tvdeyen merged commit 5550816 into AlchemyCMS:six-o Feb 8, 2021
@tvdeyen tvdeyen deleted the page-public-if-language-public branch February 8, 2021 08:51
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.

2 participants