• After updating WP and Polylang … my language have mixed up.

    I have English (works fine), flag positioned
    I have a secondary language: Hungarian
    When I add it does not add fully: Missing WP language code (should be hu_HU), have an invalid language code: hu-2, no flag

    Furthermore if I try to edit and fix it always writes back hu and gives the invalid error message. Any idea?

    site: http://www.orsolyaschuster.com

    Thanks a lot in advance.

    https://ww.wp.xz.cn/plugins/polylang/

Viewing 15 replies - 16 through 30 (of 44 total)
  • Plugin Support Chrystl

    (@chrystl)

    Could you confirm that when you have deleted (by clicking on the red link “Delete”) this “hu-2” it comes back again?

    Thread Starter petlazar

    (@petlazar)

    YES! Confirm! Delete on the dashboard:
    http://snag.gy/dfzhy.jpg

    It only comes back, when I start going through the objects to fix them… I assume that brings it back.

    Plugin Support Chrystl

    (@chrystl)

    I see that you have in the wp_terms table a term_id: 25/ name: HU / slug: hu-2. What is it, a category, a tag ..?

    Thread Starter petlazar

    (@petlazar)

    How do you check it?

    Plugin Support Chrystl

    (@chrystl)

    Provide a screenshot, filtering the wp_terms table by the name: HU. And another one filtering the table by the slug: hu-2.

    How do you check it?

    You should have create a taxonomy that you have named “HU”. You can check that in your categories, tags …

    Thread Starter petlazar

    (@petlazar)

    wp_terms by name:
    http://snag.gy/UYlfv.jpg

    wp_terms by slug:
    http://snag.gy/Tmj4d.jpg

    I could not find any among the categories or tags in neither languages

    Plugin Support Chrystl

    (@chrystl)

    *Make a backup of your database.*

    Could restore your database backup? You will start from the beginning.

    1) In the wp_terms table and for the term_id 25, change the slug hu-2 by menu-hu.

    2) Then in the wp_terms table and wp_term_taxonomy table, delete the raw with term_id 104.

    2) After that, in the wp_terms table replace hu-2 by hu for the term_id “84” / name “Magyar”.

    4) Then resave your Polylang settings.

    5) Go in your languages table, then check that you have your flag for the Magyar language with the code hu. Check that all work fine.

    I have assigned all posts etc to default ….

    *Do not* other operations, before you are sure that all work fine.

    Thread Starter petlazar

    (@petlazar)

    Should I restore? or Just create a backup?

    Plugin Support Chrystl

    (@chrystl)

    Restore the backup that I asked you to do before changing the database.

    Thread Starter petlazar

    (@petlazar)

    Exported SQL cannot be imported 🙁 I have to figure out what is wrong… or can I just edit the current status?

    http://snag.gy/vHM6p.jpg

    Plugin Support Chrystl

    (@chrystl)

    Try directly to change the existing database, but you will need certainly to recreate some links between your translations.
    So do:
    1) In the wp_terms table and for the term_id 25, change the slug hu-2 by menu-hu.

    2) Then in the wp_terms table and wp_term_taxonomy table, delete the raw with term_id 104.

    3) Then resave your Polylang settings.

    4) Provide the screenshot of your language list table.

    Thread Starter petlazar

    (@petlazar)

    Thread Starter petlazar

    (@petlazar)

    Ok! Here is the situation:
    http://snag.gy/xqgkt.jpg

    Once I was finished with above steps.

    I went to Settings / Language / Settings – there is no Save button, so I opened the Syncronization and clicked Save there

    I looked at the language settings: http://snag.gy/kimNF.jpg

    Then I went to SuperSlide objects:
    http://snag.gy/YaTBu.jpg
    The HU version does not have any language tag so I do quick edit:
    http://snag.gy/MVeke.jpg
    And select Magyar.
    This is the result:
    http://snag.gy/VaKmh.jpg

    At languages
    http://snag.gy/2iJmd.jpg

    So something is still not good…

    Do I not have to delete the relevant items in wp_term_relationships too?

    As you see 104, 105 (after following your instruction), 106 (when doing this step-by-step)
    is in this table.

    Plugin Support Chrystl

    (@chrystl)

    Go in your database, I think that there is still an element “hu” which we missed in the wp_terms table.
    In this table make this search: http://nimb.ws/zjSa9F
    Then please provide me the screenshot.

    Thread Starter petlazar

    (@petlazar)

Viewing 15 replies - 16 through 30 (of 44 total)

The topic ‘Language code invalide (hu-2)’ is closed to new replies.