Using ä in customize broke Discourse, even after restore


#1

From logs:

Uncaught TypeError: Cannot create property ‘title’ on string ‘Ryhmät’ Url: https://MY Viestintävirasto - Fi-verkkotunnus Line: 4 Colum

What I did?
I went to customize texts and changed js.groups.index.title Groups into Finnish equivalent, “Ryhmät” (has ä, please note).

What happened?
Trying to reload the page gives only blank screen. I had one screen that hadn’t reloaded, so I changed the js.groups.index.title back to Groups, but still receiving blank screen.

How to fix?


How to find and amend un-translated strings
Site goes blank if you override translation for js.groups.index.title
#2

TypeError: Cannot create property ‘title’ on string 'Ryhmät’
at https://uskojarukous.fi/assets/application-2d0ffe0b71f8ab981febb0d5677192917cc844955c924f70db7635bf0e60dadd.js:41:3180
at Array.forEach (native)
at Object.initialize (https://uskojarukous.fi/assets/application-2d0ffe0b71f8ab981febb0d5677192917cc844955c924f70db7635bf0e60dadd.js:41:2857)
at Object.test.n.initialize (https://uskojarukous.fi/assets/application-2d0ffe0b71f8ab981febb0d5677192917cc844955c924f70db7635bf0e60dadd.js:1:20861)
at https://uskojarukous.fi/assets/ember_jquery-60dedd1dca1d8b8ce48b6d0087db3b96f3149b9b5af2d0c7c6357967d29031fb.js:4:28944
at e.each (https://uskojarukous.fi/assets/ember_jquery-60dedd1dca1d8b8ce48b6d0087db3b96f3149b9b5af2d0c7c6357967d29031fb.js:4:13681)
at e.topsort (https://uskojarukous.fi/assets/ember_jquery-60dedd1dca1d8b8ce48b6d0087db3b96f3149b9b5af2d0c7c6357967d29031fb.js:4:13176)
at e.topsort (https://uskojarukous.fi/assets/ember_jquery-60dedd1dca1d8b8ce48b6d0087db3b96f3149b9b5af2d0c7c6357967d29031fb.js:4:12584)
at i._runInitializer (https://uskojarukous.fi/assets/ember_jquery-60dedd1dca1d8b8ce48b6d0087db3b96f3149b9b5af2d0c7c6357967d29031fb.js:4:29123)
at i.runInstanceInitializers (https://uskojarukous.fi/assets/ember_jquery-60dedd1dca1d8b8ce48b6d0087db3b96f3149b9b5af2d0c7c6357967d29031fb.js:4:28889)

However, the value is already changed back. Do I rake:clean?


#3

I really need some help here. Even rebuild app doesn’t seem to work…


(Jeff Atwood) #4

Any ideas here @neil?


(Rafael dos Santos Silva) #5

You can try:

./launcher enter app
su postgres
psql -d discourse
DELETE FROM translation_overrides WHERE translation_key = 'js.groups.index.title';

#6

I will try after I get my system otherwise working again… Somehow I managed to get the docker not working…


(Rafael dos Santos Silva) #7

After too many rebuilds disk space ends.


#8

I’m still at 10G free. I’m trying to run cleanup, but am getting some weird problems:


#9

Ok, so after my fiasco I don’t think I’ll try again to change the name. I just disabled the Groups from the hamburger-menu…


#10

After seeing this…

… I think it’s not only the ä I used.

Also, disabling group directory did not hide it from the hamburger menu, as stated in that other report. I wonder if this is also responsible for my problems mentioned here:


(Alan Tan) #11

Can you try upgrading to latest? I can’t reproduce this so it might have been an error in one of the commits I made while working on the groups page.

Oops looks like renaming the site setting didn’t go smoothly. This has been fixed.


#12

Well, after my clean install + restore I didn’t try to rename the js.groups.index.title just to keep the forum floating :). I’ll upgrade discourse right away and see if Groups is still in the menu even after that…


(Pad Pors) #13

sorry to bother, I think I have the same problem here, and I don’t know which translation_key I should remove in the database.

and now we get blank page. can you guide?


(Alan Tan) #14

Is this still an issue?


(SMHassanAlavi) #15

We have this problem too and for removing this problem we have removed almost 10 translation from databse.


(Alan Tan) #16

Can you provide me with more details?

Which translation did you override and with what text? :slight_smile: Thank you!


(SMHassanAlavi) #17

I have deleted the translation which site errors on step by step.
after removing first translation I think this would fix the site but I see error on another translation. I deleted this translation and the site fixed.


(Alan Tan) #18

Ah I need the translation keys and the text pasted here. :slight_smile:

I don’t really know how to type those characaters :wink: