Errors after migrating to a new version (1.9.0.beta3)


(Evgeny) #1

Increase the website loading time

Prior to the upgrade: 220mc
After updating: 2321mc

Use: safe_mode - 2122mc

doscobot became fully English

default locale = russian

Trying to find the text to be translated: Excellent! Now you can easily find your way back to our private conversation… (and all other texts)

The translation could not be found
Earlier, the bot has been fully translated into Russian language via admin panel

Increased significantly the number of requests: this is the best time

The update is done via: launcher rebuild app

app.yml
templates:
 - "templates/cron.template.yml"
 - "templates/postgres.template.yml"
 - "templates/redis.template.yml"
 - "templates/web.template.yml"


## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "25654:80"   # http

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "128MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 2

This file has not changed since last time

# DISCOURSE_DEFAULT_LOCALE: en -> DISCOURSE_DEFAULT_LOCALE: ru ?

Errors /logs no


When switching: default locale -> en (admin/site_settings/category/basic)
the speed of loading pages is reduced: 2434мс to 187мс


(Sam Saffron) #2

@eviltrout can you have a look at this?


(Evgeny) #3

Maybe this will help. Looking for lyrics (you are invited), which came in the letter. Next -> edit. And there is a test translated. Mail text comes without translation.

:arrow_down:


(Evgeny) #5

I looked at the following lines

A letter came (bot). Looking for text. The text is not found. But the translation it is. Looking for search: random_mention.

But the main thing is


(Alan Tan) #6

Might be a bug that I introduced with the recent translation fallback changes. I’ll have a look today.


(Alan Tan) #7

@Stranik Thank you for reporting! The performance problem is fixed in


(Alan Tan) #8

Hi I don’t really understand the second bug which you’ve posted. Are you saying that your text are no longer appearing in Russian?


(Evgeny) #11

I did a little research. Checked in. At the registration stage, I saw the inscription:

You’re almost done! We sent an activation mail to *@.org. Please follow the instructions in the mail to activate your account.

If it doesn’t arrive, check your spam folder.

Russian (activate_email: no)

In the Russian version of this string do not: activate_email:

The search site I can find: login.activate_email (admin/customize/site_texts?overridden=login.activate_email&q=login.activate_email)
This string has a translation

So, if the string is not in the localization file, all translations are not working.

The bot is similar. In the localization file there is no translation.

This is the last line.

PS I will try soon to translate. But I still think it should not be. If there are no translation files, it should work local translation.


(Alan Tan) #12

Sorry but I think the bug you’re describing is getting lost in translation. The translations look OK to me here

[6] pry(main)> I18n.locale = :en
=> :en
[7] pry(main)> I18n.t("discourse_narrative_bot.advanced_user_narrative.certificate.alt")
=> "Advanced User Track Certificate of Achievement"
[8] pry(main)> I18n.locale = :ru
=> :ru
[9] pry(main)> I18n.t("discourse_narrative_bot.advanced_user_narrative.certificate.alt")
=> "Свидетельство о прогрессе для опытных пользователей"

Is this something you’re not expecting?


(Evgeny) #13

This is the last line of (115) where there is a translated. Next, the script bot I translated with the help of the admin (admin/customize/site_texts). All subsequent rows. They do not work. If there are no translation files, it should work local translation?


(Evgeny) #14

It may be more clear

Before, if the translation was not in the file, it was possible to translate through admin area (http://***.ru/admin/customize/site_texts/badges.first_reply_by_email.description)
Now it’s not working. And only those that were translated before.

That is, the data from the table are not displayed?

COPY translation_overrides (id, locale, translation_key, value, created_at, updated_at, compiled_js) FROM stdin;
562	ru	badges.crazy_in_love.description	Used 50 likes in a day 20 times 123454321	2017-07-08 06:24:23.603068	2017-07-08 07:06:06.747101	\N

I specifically 123454321 added to the translation. In the table they came from. On the website they are not.


(Evgeny) #15

Ie I understand that the data from the table are not used for translation? The text in the table is changed, but the translation comes entirely from files?

And in view of the fact that the data is taken from the cache, then the data from that table (translation_overrides) is not stored in the cache.
When the change in the table (translation_overrides) - cache not updated.
It turned out that the last patch just caches the translation files. The table is not taken into account.

Very strange

In addition, it happens only with old records.

id 562 - the old entry. Change in the table on the site do not occur.
id 563 - - a new record. Change the table, change the new entry visible on the site.

And due to the fact that: badges.autobiographer.description is in the file. And badges.crazy_in_love.description not in the file.

Ie. table (translation_overrides) is taken into account only when the variable types (badges.crazy_in_love.description) in the file. If not, the field in the table is not working.


(Alan Tan) #16

@Stranik Thank you for the repro. Can you see if this fixed it for you?


(Evgeny) #17

Thank you! Everything works fine! :trophy:


(Sam Saffron) #18

Big :call_me_hand: for persisting and giving us all the help we needed in isolating this issue :heart_eyes:


(Jeff Atwood) #19

This topic was automatically closed after 43 hours. New replies are no longer allowed.