This seems kind of similar to #2778565: Multilingual support for Panelizer, but that is a Drupal 8 issue and also seems a bit different, so I'm filing this new issue. If you think it should be a duplicate of the other one, that's fine too...

Anyway, here's the issue. I'm encountering it on a dev site for drupal.org. What's happening:

a) We have a content type on drupal.org for Documentation pages, which uses Panelizer for its page layout.

b) We have a few of these pages that are translated into several languages (User Guide).

c) On a dev copy of drupal.org, I went into Panelizer UI, and added something to the Content area, saved, cleared cache just in case. I first saw this problem with a custom "content type" plugin for Panels (like a block but done as a content plug in), but then I was also able to reproduce by just using a standard "Custom content" pane with some dummy text in it.

d) The new content pane shows up on the English pages, but not in the other-language pages.

Note: We are also using Features, and the new content pane is not yet in the in-code version of the Feature, if that makes a difference... but I don't see why it would.

Comments

jhodgdon created an issue. See original summary.

jhodgdon’s picture

I did some more testing and have some additional information. What I have found is that when you make a change to the Content in Panelizer for a particular node type:

a) The change applies immediately to existing English nodes.

b) The change applies to newly created translation nodes.

c) The change doesn't apply to existing translated nodes.

d) The change doesn't apply to the translated nodes when you edit or update them.

e) Making sure that the change to Panelizer content is in both the in-code and database (because we are using Features) did not make a difference.

jhodgdon’s picture

After further exploration, we found that the translated nodes that we imported using Feeds came in with Panelizer thinking they had custom panels. We are not sure why.

It doesn't seem to be a Feeds problem. When I go to a Documentation Guide page on the dev site and add a new child page, and then go to node/####/panelizer, it shows that the status is Default.

But when I translate a node, it comes in as Custom.

So, the Feeds import we are using is just getting the same problem you'd have if you translated using the Drupal UI.

jhodgdon’s picture

OK, I've tracked through the Panelizer code to see what is happening. It seems like it must be a problem in the logic in
PanelizerEntityDefault::hook_entity_insert()

There is code in there that attempts to clone the panelizer stuff from the translation source, but somewhere in there it is going wrong and deciding it has been customized instead of realizing it should be the default.

drumm’s picture

jhodgdon’s picture

Oh, apparently drupal.org is running the patch from #2070891-12: Support core Content Translation by cloning the Panelizer display for the new entity. That looks like the problem. I will comment on that issue.

jhodgdon’s picture

Status: Active » Closed (duplicate)

I think it's probably time to close this as a duplicate of #2070891: Support core Content Translation by cloning the Panelizer display for the new entity. As far as I can tell, it arises due to the patch in #12 on that issue. The patch in #15 fixes the problem.