• Resolved dmadele

    (@dmadele)


    Hi, great plugin. Worked well until I moved website from sub-directory to root folder on same server. The move was successful (full back-ups were made beforehand) but I somehow lost all the translations in the process (I have three languages on the website: Hebrew, English, German).

    I was on version 1.5.2 but then this issue occurred so I updated to 1.5.3 in hopes that it would solve the problem. It didn’t.

    I checked the database and it appears that all the translations are present in wp_terms (unless I’m reading that wrong). They look something like this:

    term_id | name              | slug              | term_group
    --------+-------------------+-------------------+-----------
    276     | pll_5318472f26d18 | pll_5318472f26d18 | 0
    298     | pll_531d901e60199 | pll_531d901e60199 | 0
    352     | pll_5326cfdbb1f2b | pll_5326cfdbb1f2b | 0

    So…is there some disconnect between the plugin and my database? Why should my translations suddenly disappear? What could I have done to prevent this from happening?

    Any help at all would be greatly appreciated!

    https://wordpress.org/plugins/polylang/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    I am not sure of what happened. You are right that terms above are used to link translations. You should find corresponding entries in wp_term_taxonomy and wp_term_relationships. Making a full DB copy should keep the translation relations intact.

    There is only one known issue when “just” copying the db. The home urls which are cached in a transient are kept from the old site (but saving polylang settings just resets the cache).

    Thread Starter dmadele

    (@dmadele)

    Yes, I checked and the corresponding entries are in wp_term_taxonomy and wp_term_relationships.

    All other elements of the plugin work: language switcher, etc.. The elements that don’t show in my admin interface though are the string translations. All I can see are the custom string names but no translations that were previously there. Any way to bring those back?

    Thread Starter dmadele

    (@dmadele)

    So I took a look at the database entries (in Notepad. Incidentally, is there a better way to be doing this?) and it appears that something in there is still pointing to the old sub-domain folder from where I moved the site (eg.: /my-site.com/wordpress/?post_type=polylang_mo&p=23)

    All the string translations that don’t show up in the Admin interface are here so they’re not gone…they just didn’t make the move somehow.

    What am I missing? How to tell Polylang that the directory has moved?

    Plugin Author Chouby

    (@chouby)

    Did you try to resave Polylang settings?
    Yes there are better ways to look at DB: for example phpmyadmin.

    Thread Starter dmadele

    (@dmadele)

    I did try to resave the settings. That didn’t help.

    Also, was using phpmyadmin to look at the DB but couldn’t see the actual text(maybe I’m doing it wrong >.< ) just the names & slugs etc. like so: pll_5318472f26d18. On the other hand, in Notepad I could see all the text so I managed to pull the translations out from there and re-enter them on the Strings Translation tab.

    Fine. Saved that but now something else is happening :-/ Immediately after saving, the language switcher appears to have stopped working properly. I can view the site in one language and switch to the other two but then it gets “stuck” on one language despite multiple clicking attempts on the language selector. Reproduced the issue in another browser also.

    I checked Polylang settings and unchecked the option to determine language from browser settings. That didn’t help.

    Plugin Author Chouby

    (@chouby)

    I believe that I misunderstood your problem. Did you lost the “link” between posts or did you lost the strings translations?

    The strings translations are stored in the wp_posts table with the post type “polylang_mo”. That’s pretty unreadable as this is a serialized array. But you can recognize your strings.

    Thread Starter dmadele

    (@dmadele)

    I see now that I wasn’t too clear in my explanation. The issue at first was lost strings translations. They were still in the database and without knowing where exactly they were stored I found them while viewing the db in notepad.

    From this info I re-entered the strings on the admin interface. Immediately following this, however, a new issue appeared with the language switcher. I am only assuming, based on the sequence of actions, that this is related to the first issue.

    I can do one ‘cycle’ through the three language options via flag selector but then things get stuck. Either:

    • the content on the page (page or post) changes to the selected language and the menus and other page elements (produced by widgets & the theme) do not,
    • or as is the case on the homepage, all elements remain stuck despite selecting a new language.

    Incidentally, after noting this issue I tried to work backwards; ended up doing a database restore from a backup made just before the wp move. This restored my old strings translations…

    Thread Starter dmadele

    (@dmadele)

    It’s working now.

    I recreated my menus for the three languages and in Polylang settings I changed the default language to another one and saved. I suspect that changing this particular option caused the reset of the Polylang settings which apparently wasn’t happening before when I had changed other settings in an effort to reset.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Lost translations after moving WP’ is closed to new replies.