• 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 - 1 through 15 (of 44 total)
  • Thread Starter petlazar

    (@petlazar)

    I have changed so it does not show the flag… it shows the name of the language… not nice but at least works…

    Another issue came up… show all languages, does not show all languages …any idea?

    Switching to English works fine… switching to Hungarian does not show post

    Thread Starter petlazar

    (@petlazar)

    I cannot see categories assigned to HU

    Plugin Support Chrystl

    (@chrystl)

    Hi

    From which Polylang version did you update?
    Could you provide a screenshot of your languages list table (Settings > Languages > Languages tab)?
    You can upload it via http://snag.gy and link to it here.

    Thread Starter petlazar

    (@petlazar)

    I don’t remember which version it was. It was together with the upgrade of WP to 4.4.1
    Here is the screenshot:
    http://snag.gy/61VMv.jpg

    Plugin Support Chrystl

    (@chrystl)

    Go in your Database.

    1) Then go in the wp_terms table find the term_id of your 4 languages, you must have more than 2 Magyar entries. Please filter the name column by “Magyar”. Here an example with 2 English entries: i.e: http://nimb.ws/Q2cgK6

    Please, provide me a screen shot where appear these Magyar” entries.

    2) Then go in the wp_term_taxonomy table. Check if in the description you see the locale: i.e: http://nimb.ws/UlXzyJ
    Please filter the taxonomy column by “language”.

    Please provide me a screen shot where appear these “language” entries.

    3) Then go in your wp_options table > option_name column > _transient_pll_languages_list.
    See: http://nimb.ws/uZAXBz

    Could you copy/paste the option_value’s result of the _transient_pll_languages_list in this tools (output: check print_r): http://www.unserialize.com/ ?

    Then forward me the result using the code button in the topic bare tools.

    Thread Starter petlazar

    (@petlazar)

    Thanks!!!!!

    1) http://snag.gy/hlPXb.jpg
    2) http://snag.gy/zrkMu.jpg
    3)

    Array
    (
        [0] => Array
            (
                [term_id] => 84
                [name] => Magyar
                [slug] => hu-2
                [term_group] => 0
                [term_taxonomy_id] => 84
                [taxonomy] => language
                [description] => a:3:{s:6:"locale";s:5:"hu_HU";s:3:"rtl";i:0;s:9:"flag_code";s:2:"hu";}
                [parent] => 0
                [count] => 9
                [tl_term_id] =>
                [tl_term_taxonomy_id] =>
                [tl_count] =>
                [locale] =>
                [is_rtl] =>
                [flag_url] =>
                [flag] =>
                [home_url] => http://www.orsolyaschuster.com/?page_id=4552
                [search_url] => http://www.orsolyaschuster.com/?lang=hu-2
                [host] =>
                [mo_id] =>
                [filter] => raw
                [page_on_front] => 4552
                [page_for_posts] =>
            )
    
        [1] => Array
            (
                [term_id] => 19
                [name] => English
                [slug] => en
                [term_group] => 1
                [term_taxonomy_id] => 19
                [taxonomy] => language
                [description] => en_US
                [parent] => 0
                [count] => 305
                [tl_term_id] => 20
                [tl_term_taxonomy_id] => 20
                [tl_count] => 25
                [locale] => en_US
                [is_rtl] => 0
                [flag_url] => http://www.orsolyaschuster.com/wp-content/plugins/polylang/flags/us.png
                [flag] => <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC" title="English" alt="English" />
                [home_url] => http://www.orsolyaschuster.com/?page_id=1512
                [search_url] => http://www.orsolyaschuster.com/?lang=en
                [host] =>
                [mo_id] => 4039
                [filter] => raw
                [flag_code] => us
                [page_on_front] => 1512
                [page_for_posts] =>
            )
    
    )
    Plugin Support Chrystl

    (@chrystl)

    In the wp_term table, in the “slug” column: have you another “hu”? Could you provide the screenshot?

    Thread Starter petlazar

    (@petlazar)

    I only see two, but here is the whole select:
    Part 1: http://snag.gy/6tjNo.jpg
    Part 2: http://snag.gy/hRsiC.jpg

    Plugin Support Chrystl

    (@chrystl)

    Before making you a fix, could you say me if your prefer to keep in your URL either the language code “hu-2” or “hu”?

    Thread Starter petlazar

    (@petlazar)

    I don’t think I have a preference… probably “hu” seems to be more convenient as that seems to be the “standard”.

    One more question that comes up: there are items that have “disappeared”. They are there, I see the count but they are not listed.

    Maybe related to this, but even if I click show all languages in the header (WP dashboard), they won’t show up.

    Plugin Support Chrystl

    (@chrystl)

    1) *Make a backup of your database.*

    2) Go in your wp_terms table then replace hu-2 by hu for the term_id “84” / name “Magyar”.

    3) Then resave your Polylang settings (Settings > languages > Settings). It will update the transient.

    4) 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.

    Thread Starter petlazar

    (@petlazar)

    Thank you Chrystl!

    Can I delete hu-2? See screenshot:
    http://snag.gy/U7nbM.jpg

    Plugin Support Chrystl

    (@chrystl)

    Weird since it shouldn’t create this third language “hu-2”.

    Before delete it, you must make a backup of your database.
    If you have created some strings translation for the Magyar language, could you check that they have been saved correctly?

    Thread Starter petlazar

    (@petlazar)

    I have deleted from “hu-2” from the Dashboard
    As I am going through all the items to fix it keeps coming back:
    http://snag.gy/MljT0.jpg

    Any idea?

    Thread Starter petlazar

    (@petlazar)

    Once I deleted “hu-2”, I have assigned all posts etc to default ….

    These remained @”hu-2″ and I cannot change it

    http://snag.gy/GTblM.jpg

    And “hu” comes back at the top of the dashboard:
    http://snag.gy/TBwT6.jpg

    hu-2 showed up in the wp_terms table:
    http://snag.gy/9OTvt.jpg

    And a new taxonomy showed up : 104
    http://snag.gy/oUGYQ.jpg

    Array
    (
        [0] => Array
            (
                [term_id] => 84
                [name] => Magyar
                [slug] => hu
                [term_group] => 0
                [term_taxonomy_id] => 84
                [taxonomy] => language
                [description] => hu_HU
                [parent] => 0
                [count] => 6
                [tl_term_id] => 30
                [tl_term_taxonomy_id] => 30
                [tl_count] => 4
                [locale] => hu_HU
                [is_rtl] => 0
                [flag_url] => http://www.orsolyaschuster.com/wp-content/plugins/polylang/flags/hu.png
                [flag] => <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFCSURBVHjaYjzLgAL+gMl/MMYfGBtCAhFAAA7E7QQAEAZi/XANJ+1WDuJC96iHEELIyt3d8dihpKIsFmlygPlOG7jnPAHEAjbo/+8nT/8Dlf79C5IDMoAkUCmQ/AVk/Pr/6xeQyyorC7QHIIBYwGb/R1YNlAaZClYKVg3U9gui/xcDA0AAMf79+5eRkRGk7f9/BjDEBYDKPn36BBBAECdBVcEZWAEDI+O/f/8AAogFoQi/+UAb/gMD5R9AADEy+DNkpWTdf3f/z98/v//++vXn96+/v37//Q1EIAaMC5RVFlI6W3AOIIBYGH4AA/APSMUfqKJff35BVYNIoOCvPyANf//8/wt0DkAAsTD8YgAGsiSPJDBQ/gDN+QfSBmb/AYYLUAAYHX//gAPxL0gDQAAxMlgzAPWA0A8MBhD9Z0ADAAEGACLkbQYCfrxnAAAAAElFTkSuQmCC" title="Magyar" alt="Magyar" />
                [home_url] => http://www.orsolyaschuster.com/?lang=hu
                [search_url] => http://www.orsolyaschuster.com/?lang=hu
                [host] =>
                [mo_id] =>
                [filter] => raw
                [flag_code] => hu
                [page_on_front] =>
                [page_for_posts] =>
            )
    
        [1] => Array
            (
                [term_id] => 104
                [name] => hu
                [slug] => hu-2
                [term_group] => 0
                [term_taxonomy_id] => 104
                [taxonomy] => language
                [description] =>
                [parent] => 0
                [count] => 2
                [tl_term_id] =>
                [tl_term_taxonomy_id] =>
                [tl_count] =>
                [locale] =>
                [is_rtl] =>
                [flag_url] =>
                [flag] =>
                [home_url] => http://www.orsolyaschuster.com/?lang=hu-2
                [search_url] => http://www.orsolyaschuster.com/?lang=hu-2
                [host] =>
                [mo_id] =>
                [filter] => raw
                [page_on_front] =>
                [page_for_posts] =>
            )
    
        [2] => Array
            (
                [term_id] => 19
                [name] => English
                [slug] => en
                [term_group] => 1
                [term_taxonomy_id] => 19
                [taxonomy] => language
                [description] => en_US
                [parent] => 0
                [count] => 306
                [tl_term_id] => 20
                [tl_term_taxonomy_id] => 20
                [tl_count] => 22
                [locale] => en_US
                [is_rtl] => 0
                [flag_url] => http://www.orsolyaschuster.com/wp-content/plugins/polylang/flags/us.png
                [flag] => <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC" title="English" alt="English" />
                [home_url] => http://www.orsolyaschuster.com/?page_id=1512
                [search_url] => http://www.orsolyaschuster.com/?lang=en
                [host] =>
                [mo_id] => 4039
                [filter] => raw
                [flag_code] => us
                [page_on_front] => 1512
                [page_for_posts] =>
            )
    
    )
Viewing 15 replies - 1 through 15 (of 44 total)

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