Language code invalide (hu-2)
-
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 flagFurthermore 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.
-
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
I cannot see categories assigned to HU
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.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.jpgGo 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/uZAXBzCould 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.
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] => ) )In the wp_term table, in the “slug” column: have you another “hu”? Could you provide the screenshot?
I only see two, but here is the whole select:
Part 1: http://snag.gy/6tjNo.jpg
Part 2: http://snag.gy/hRsiC.jpgBefore making you a fix, could you say me if your prefer to keep in your URL either the language code “hu-2” or “hu”?
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.
1) *Make a backup of your database.*
2) Go in your wp_terms table then replace
hu-2byhufor 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.Thank you Chrystl!
Can I delete hu-2? See screenshot:
http://snag.gy/U7nbM.jpgWeird 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?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.jpgAny idea?
Once I deleted “hu-2”, I have assigned all posts etc to default ….
These remained @”hu-2″ and I cannot change it
And “hu” comes back at the top of the dashboard:
http://snag.gy/TBwT6.jpghu-2 showed up in the wp_terms table:
http://snag.gy/9OTvt.jpgAnd a new taxonomy showed up : 104
http://snag.gy/oUGYQ.jpgArray ( [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] => ) )
The topic ‘Language code invalide (hu-2)’ is closed to new replies.