• Hi,

    If you register a string in your database like so:

    pll_register_string(“My Project”, “login-form-email”, “My Project”);

    And then you accidentally register it again, but at an earlier point in the code so that it comes before the first time you registered it, then all of the strings in the database following the accidental register will have the wrong translation the moment you save on the string translation page. They’ll all be off by one, so string #10 that you registered will get its translation from string #11.

    My database now has about 350 strings with incorrect translations now, and I haven’t found a way to “reset” it. I doubt it’s possible now anyway.

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

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

    (@chouby)

    Hi!

    Sorry, double registration is not something I forecasted. I believe that in such a case, only the second translation is saved by Polylang. So if you translate only the first one, it is not saved. I fear that your translations are lost unless you made a backup before.

    Thread Starter brian1037

    (@brian1037)

    Thankfully I was able to get a backup from a coworkers development database. Unfortunately the error happened because of a mistake between myself and my colleague, which I imagine is a realistic scenario. Thanks again for the amazing plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Registering string twice breaks other strings’ is closed to new replies.