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 Polylang #332

Open
hreimer opened this issue Feb 18, 2019 · 10 comments
Open

Compatibility with Polylang #332

hreimer opened this issue Feb 18, 2019 · 10 comments
Labels
help wanted type:bug Something isn't working. type:enhancement New feature or request.
Milestone

Comments

@hreimer
Copy link

hreimer commented Feb 18, 2019

First thanks for this awesome plugin, I have been playing with it the last few hours in a multisite setup as follows: WP 5.0.3, using Beaver Builder Theme (Page Builder) and Polylang plugin and trying to achieve this:

General Idea:
Root-Multisite has all the pages in all available languages translated (set up via Polylang Plugin, lets say de|en|ru), so when I have Subsite 1 i distribute all pages of the Root-Multisite in all the languages that I want on this specific subsite (lets assume de|en) and don't have to duplicate any pages, since they are still linked to their original counterpart on the root-multisite but can just establish the connection with the fields in the document settings for languages of the sidebar of the page, as I would do on the Root-Multisite.

What does work:
Root-Multisite has Page A published, distribute Page A to internal subsite, see all Contents in Editor "classic mode" like it was in Root-Multisite, all Texts, images etc.

What does not work:
Root-Multisite has Page A published, AND translated with polylang in another language, distribute Page A in Language 1 to internal subsite: Page itself with title is visible, but I cannot edit it at all or see the contents.
The same happens, when Page A Language 2 is distributed to an internal subsite, therefore

Background:
Polylang is installed and the languages are set up the exact same way in the multisite root as well as in the subsite. I know this is not a polylang support project, I was just thinking maybe some page-(meta)settings were not correctly distributed?

Am I heading into the right direction with this approach? Or is this something that was never intended to be supported by Distributor? If there are some hooks available where I could start looking I'd be also thankful, or any hints - thanks!

@hreimer hreimer changed the title Translated Polylang pages don't get distirbuted correctly Translated Polylang pages don't get distributed correctly Feb 18, 2019
@jeffpaul
Copy link
Member

@hreimer thanks for the feedback and welcome to Distributor, your input is greatly appreciated! I don't believe your specific WP/plugin/theme configuration has been tested, but your use case certainly makes sense. I'll review this with the engineering team to see who can best work on triaging your issue and determining if there's a Distributor enhancement/fix that could resolve what's not working for you.

@jeffpaul jeffpaul added the type:question Further information is requested. label Feb 19, 2019
@jeffpaul
Copy link
Member

jeffpaul commented Jun 6, 2019

Related to #382.

@jeffpaul jeffpaul added this to the Future Release milestone Jun 6, 2019
@jeffpaul jeffpaul added type:enhancement New feature or request. plugins and removed type:question Further information is requested. labels Jun 6, 2019
@grappler
Copy link
Contributor

We are facing a similar problem with Polylang. We have been able to pull both German and French pages but we would like to connect the both pages so that the language switcher works on the frontend.

It is not possible to connect the pages as the settings are disabled by distributor.
image

I am not fully sure how the settings have been disabled. Is there a way to allow changes to only one setting? That would be the simplest solution I think.

@grappler
Copy link
Contributor

grappler commented Feb 20, 2020

I have come across another problem that even after disconnecting the post the field to search for the translation is still disabled.

image

There is another problem that no posts are shown when only posts from a single language should be shown.
image

@jeffpaul jeffpaul modified the milestones: Future Release, 3.0.0 Feb 25, 2020
@jeffpaul
Copy link
Member

Thanks for the additional feedback @grappler, sounds like @dinhtungdu got some in-person details from you in the past week as well. I'll let @dinhtungdu add any additional information here, but we'll otherwise look to tackle this in a couple releases as we're already pretty set with fixes+features milestoned for our v2 and v2.1 releases. However, if someone is able to work on a PR to help on this topic, I'd be happy to pull that forward into a more current milestone.

@vikrampm1 vikrampm1 added type:bug Something isn't working. and removed plugins labels Dec 17, 2021
@jeffpaul jeffpaul modified the milestones: 3.0.0, 2.2.0 Jan 30, 2023
@krokodok
Copy link

4fe15cc

This change, while preventing Fatal Errors in PHP 8<=, prevents the pulling of translated posts completely. The message will just say "Post(s) have already been distributed".

To get the old behaviour, that was missing the translated post relationship, but was at least pulling the post, I needed to use the 2.0.1 version of the plugin together with a patch that simply checks for the existance of $duplicated['internal'], but did not enter the if clause and trigger continue 2;.

@jeffpaul
Copy link
Member

In chatting with @sebastienserre from the Polylang Helpdesk (support@polylang.com, open from Monday to Friday 9am to 6pm CET), they had the following to share on Distributor and Polylang compatibility:

As per @Chouby founder of Polylang, it comes from the fact that our non public taxonomy "post_translations" is surely notpulled
ID's are stored serialized in the term description
file-E1RbZMOFgS

They also noted that Broadcast's compatibility with Polylang is achieved via plugin and could be another starting place to see how that could be handled within Distributor.

@jeffpaul jeffpaul changed the title Translated Polylang pages don't get distributed correctly Compatibility with Polylang Jan 16, 2024
@zack-bishop
Copy link

Hello! Just wanted to reach out regarding this issue.

We're using this on a multisite that use Polylang. The main site and child sites use English as the default language and Spanish as the secondary language.

We've noticed that translated content appears as duplicate content on the child site's pull table (i.e. two items appear in the pull table with the same title, no way to tell which is the translation and which is the original). And when they're pulled into the child site, they're treated as two separate but duplicate posts.

For instance, let's say we have a bit of content called "Bob" with the urls /person/bob and /es/person/bob on the main site. In the child site, two instances of "Bob" show up in the Pull table. When we pull them into the child site, we end up with /person/bob and /person/bob-2. The Spanish version isn't treated a translated version.

However, things seem to work on if you push content "from" the parent site. I.e. if we edit bob and click the option to distribute it to the child site, both the English and Spanish versions get sent and work as expected.

Questions:

  1. Is there any gotchas / misconfigurations in Polylang and Distrubtor that you are aware of that could be causing this?
  2. Is there a way to do a bulk "push" from the main site to the child sites instead of "pulling" content on the child sites?

@zack-bishop
Copy link

@jeffpaul Hello! Sorry to bother you but are you able to provide any information on Distributor's compatibility with Polylang? We've been testing it out on a multisite. Everything works well, except when it comes to Polylang and its translations.

@jeffpaul
Copy link
Member

jeffpaul commented May 2, 2024

@zack-bishop the issue is like due to what's mentioned in #332 (comment), which also includes a tip on potential resolution within Distributor. This is not on our immediate roadmap, but if someone were to work on a PR then I'd be happy to get it through the team's review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type:bug Something isn't working. type:enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

6 participants