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

Keep page fileds in sync with translated pages #373

Closed
lukasrad02 opened this issue Jul 18, 2023 · 1 comment · Fixed by #491
Closed

Keep page fileds in sync with translated pages #373

lukasrad02 opened this issue Jul 18, 2023 · 1 comment · Fixed by #491
Assignees
Labels
[P] major [T] bug Something isn't working

Comments

@lukasrad02
Copy link
Contributor

When translating a page, the values of additional fields like visible_for, is_public, and author_visible are copied to the translated page. However, they're not kept in sync automatically and using the sync translations button in the admin interface does not update these fields, either. Since the edit view of a page that is a translation of another page differs from the normal edit view, the values can't even be changed manually. On the example of visible_for, this means that the translation of a page could be invisible for everybody, if the translation has been created before the permissions on the original page have been set.

This issue seems to affect all fields except from the body and all types of pages. For fields like visible_for this is caused by the type (ManyToManyFields are not synced automatically according to https://www.wagtail-localize.org/concept/translatable-fields-autogen/), for the boolean fields I haven't found out what is the issue yet.

A temporal workaround is to edit the translated page, click the arrow next to the "Save draft"/"Publish" button and select "Stop synced translation". This will take you to the normal edit view where one can adjust all fields to their liking. To resume the normal translation of the page body, just select "Start synced translation". The values of all non-synced fields seem to be left untouched, but changes made to the translated page body will be lost!

As a permanent fix, I think we have to specify translatable and synced fields as described in https://www.wagtail-localize.org/how-to/field-configuration/.

Steps to reproduce

  1. Have two users A and B
  2. Have a group G and make B a member of G
  3. Use user A to create a page P in German, ensure it is not visible for group G, and publish it
  4. Create a translation P' of P
  5. Log in as user B: B can see neither page P nor P' (expected behavior)
  6. Change the permissions of P so that group G is allowed to visit the page and publish the changes
  7. Log in as user B again: B can see page P (expected behavior) but not page P' (bug)
@lukasrad02 lukasrad02 added [T] bug Something isn't working [P] major labels Jul 18, 2023
@lukasrad02
Copy link
Contributor Author

It seems like setting ParentalManyToManyFields to synchronized is not possible at the moment: wagtail/wagtail-localize#563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[P] major [T] bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant