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

Compatibility with wagtailtrans #200

Open
drcongo opened this issue Apr 23, 2019 · 2 comments
Open

Compatibility with wagtailtrans #200

drcongo opened this issue Apr 23, 2019 · 2 comments

Comments

@drcongo
Copy link

drcongo commented Apr 23, 2019

Is anyone successfully using wagtail-personalisation in a project that also includes wagtailtrans? I've come across two issues using the two together...

  1. My variant pages never show. Stepping through the debugger, I found that serve_variant calls serve on TranslatablePage, which when passed a view in the serve_args by serve_variant ends up returning view(request, *args, **kwargs) on the canonical page instead of on the variant.

  2. The second issue is that it seems it's not possible to create a variant of a home page when using both packages because wagtailtrans requires precisely one homepage per language.

If anyone has solved these issues, I'd love to know how.

@pimvernooij
Copy link
Contributor

Hi Andy,

We have looked into this combination for one of our projects, and identified what needs to happen to make the modules compatible. However the project was canceled, so we never started/completed the work.

@mikedebock could you weigh in perhaps?

Best,
Pim

@mikedebock
Copy link
Collaborator

Page sync

The page sync function doesn't work as expected in combination with Wagtailtrans and wagtail-personalisation.

For example;

  • When i create a page-variant in the default language (NL), that works well
    homepage-nl
  • Wagtailtrans also creates this page-variant for all the other languages (EN)
  • This isn't a problem, but they aren't linked to the TranslatablePage, so Wagtail responds like it are separate pages and not a variant.
    homepage-en

The issues are:

  • They page-variant are displayed as separate pages in my page-tree.
  • They doesn't respond as a variant, that means they aren't active for the selected segments and never displayed.

Wagtailtrans Hide Translation tree

If WAGTAILTRANS_HIDE_TRANSLATION_TREES=True, WagtailTrans should display only one page tree, and a dropdown "Edit in" with all the available languages.

When i create a variant for the page, and i click on "Edit in", i see multiple times the "English" language.
languages

I think they should be suffixed with the variant-name so we can see the differences between the pages.

For example:

  • English
  • English (variant 1)
  • English (variant 2)

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

No branches or pull requests

3 participants