Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Polylang: Menu sections emptied #50

Open
strarsis opened this issue Aug 10, 2018 · 1 comment
Open

Polylang: Menu sections emptied #50

strarsis opened this issue Aug 10, 2018 · 1 comment

Comments

@strarsis
Copy link

strarsis commented Aug 10, 2018

@NateWr: Polylang is used to translate a FDM menu.
When saving a FDM menu in particular language with
specific FDM menu sections (which also are in that respective language),
the sections of other languages of that FDM menu are emptied.

Steps to reproduce:

  1. Install FDM + Polylang
  2. Set two Polylang languages
  3. Create a new FDM section.
  4. Save the FDM section with both languages (e.g. 'Wines' and 'Vins').
  5. Create a new FDM menu (e.g. 'Drinks').
  6. Add the previously created FDM section to the FDM menu
    (correctly only the FDM sections with same language as FDM menu are listed).
  7. Save the FDM menu (with its current translation).
  8. Swtich to the other language of FDM menu.
  9. Add the FDM section to the FDM menu.
  10. Save the FDM menu.
  11. Again, switch to other language of FDM menu.
    Notice that the sections had been lost.

Polylang saves for each translation a different post with different ID,
when the field is just copied over, the ID of a different language is used.

Edit: It seems to be fixed by replacing in Food and Drink menu wpml-config.xml

    <custom-field action="copy">fdm_menu_column_one</custom-field>
    <custom-field action="copy">fdm_menu_column_two</custom-field>

with

    <custom-field action="translate">fdm_menu_column_one</custom-field>
    <custom-field action="translate">fdm_menu_column_two</custom-field>

Apparently it isn't possible to override these settings from
within another (site specific) plugin wpml-config.xml.

@strarsis
Copy link
Author

@NateWr: How can I further help debugging this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant