rainlab/translate-plugin

v2.x: Messages did not get migrated and cannot be edited

guus-frenken opened this issue ยท 7 comments

Plugin version: 2.0.1
October CMS version: 3.1.0

I upgraded to October CMS 3.1, then upgraded the Translate plugin to 2.0.1 using the upgrade guide. I created a site for each locale and the migration command appears to have completed successfully.

My translation messages are still intact in the rainlab_translate_messages table, but in the front-end, it's not displaying the correct values.

When I go to Settings > Translate Messages, it is not showing any translated values. When I change a translation message, it does not get updated in the database, and as soon as I click 'Scan for Messages', the newly updated tranlation message is reset to the default value.

Am I misunderstanding how to use translation messages going forward? I assumed I would manage them via the 'Translate Messages' page as before.

It sounds like something isn't working correctly. Although it works fine on our side. We may need to do some more investigation.

My translation messages are still intact in the rainlab_translate_messages table, but in the front-end, it's not displaying the correct values.

To clarify, you ran the php artisan translate:migratev1 command. Do you see new data appearing in the rainlab_translate_message_data table? Did you clear the cache?

When I go to Settings > Translate Messages, it is not showing any translated values. When I change a translation message, it does not get updated in the database

To confirm, when you select a different language, then enter a new value in the table and then refresh the page, the value disappears?

Hi @daftspunk

Correct, I ran the php artisan translate:migratev1 command and the rainlab_translate_message_data table has one row for each locale with the data and usage columns containing the serialized translations.

I observed the following behaviour:

  1. I change a random translation message in Settings > Translate Messages
  2. The record in rainlab_translate_messages_data is updated and the front-end shows the new translation
  3. After I refresh the page, the new translation is reverted to the original and so is the database record.

I have not cleared my cache, nor have I clicked 'Scan for new messages'. The new translation behaved like a flash message that disappeared after a page refresh.

I have similar issue. I created 2 sites. 1 Germany (de), 2 United States (en). German is default site.

I migrated translated messages with artisan command and they are visible in the backend settings.

First issue is when you change message from German Standard -> German. The changed value is only available for first CMS page refresh (frontend) and then reverted to original value.

Second issue I have that on United States site the messages are not translated at all, but I see them translated in the backend area.

I tried scan for new messages (with purge) and clearing the cache with button and with artisan command. Nothing woks for me.

Appreciate the detailed reports. There were a couple of bugs causing this (be8ccc3). Please update to v2.0.2 to see if it helps.

My issues are resolved after update. Thanks!

The issue is resolved with the 2.0.2 update, thank you!

On a side note, what is a good way to check if v2 of the plugin is installed? I used to check for the existence of \RainLab\Translate\Models\Locale but this class is back in 2.0.2

On a side note, what is a good way to check if v2 of the plugin is installed? I used to check for the existence of \RainLab\Translate\Models\Locale but this class is back in 2.0.2

Ah, sorry about that. I was trying to be helpful, but this is perhaps too helpful. We will remove the class again and release 2.0.3 (788d616)

Glad to hear this has been resolved. Thank you!