Problem with cyrillic links
Asked by Main User:

Hello.

We're trying to migrate from 6.4.0 to 6.15.2 using full xml backup. Articles and attachments were imported correctly, but all links containing cyrillic characters are broken. When editing an article, you can easily insert a link to any of those articles, but after saving it becomes broken too.

**OS:** CentOS 7  
**DB:** PostgreSQL 9.6.3

DB params are fine:

```
select datname,pg_encoding_to_char(encoding) as encoding,datcollate,datctype FROM pg_database WHERE datname = 'confluencedb';
confluencedb UTF8 en_US.utf8 en_US.utf8
```

Raw format doesn't show anything strange:

```
<ac:link><ri:page ri:content-title="?????? ?? ???????????" /></ac:link>
```

It looks completely the same in the database.

Encoding test page (/admin/encodingtest.action) works fine too with one small exception of "The file name has been mangled". I don't think that matters.

I also tried to follow this article - <https://confluence.atlassian.com/confkb/links-to-attachments-and-pages-that-contains-non-latin-characters-are-randomly-broken-966676202.html>  
Symptoms are pretty similar, however all attachments are working fine. I tried reinstalling confluence numerous times, recreating database from scratch, exporting and reimporting everything - nothing helps.

Temporary solution is to open an article and immediately save it, that way all links to it starts working again, but after a day or so it returns to a previous, broken state.

I am completely lost, please help.


Answers:
author: Main User
body: So we moved to xwiki (it can import your data from confluence just fine), since there is no support for atlassian products. Thanks for nothing, i guess.

comments: author: Gonchik Tsymzhitov
body: Wow, I meet with the same error


author: Gonchik Tsymzhitov
body: Finally I fixed via adjusting DB for the content table


author: Diego
body: Hey, hello there!  
Great to have you here in the Community. So, as I understand Andrew all links with Cyrillic characters are broken after some time in Confluence. Is that correct?

This behaviour is indeed similar to the one described under**[Links to attachments and pages that contains non-latin characters are randomly broken.](https://confluence.atlassian.com/confkb/links-to-attachments-and-pages-that-contains-non-latin-characters-are-randomly-broken-966676202.html?_ga=2.34015201.1908094307.1555939211-79410561.1553795485)**

However you said that all the steps described there have been tried and you have also tried a new installation from scratch but the behaviour is the same.

With the above in mind, could you clarify some points for us? Here they are:
> 1. What locales are supplied with your system?
>    1. You should be able to check this with the command locale -a
> 2. Are **all types of links** broken or just the ones pointing to pages in Confluence?
> 3. Do links with **Latin characters** behave as expected?
> 4. What happens if you change the page name to Latin characters and then link to it?

Further, could you provide screenshots of:

1. The broken links
2. The source from a working link
3. The source from a broken link
4. The output from **locale -a** command

You can check the source of your page with the **source editor in Confluence:**

**[Confluence Source Editor](https://marketplace.atlassian.com/apps/1210722/confluence-source-editor?hosting=server&tab=overview)**

Please, keep in mind that the Community is an open place. Any information posted here can be seen by anyone. So take care not to **disclose any sensitive information** with the screenshots!

Looking forward to your reply Andrew!

comments: author: Main User
body: Hello.

1. *locale -a* show all standard stuff, including en_US.utf8 and ru_RU.utf8, full output is available [here](https://d7.wtf/s/locales.txt).

2. Only links pointing to internal pages are broken. Attachments and external links work just fine.

3. Links with latin characters behave as expected.

4. Changing page name to latin fixes the problem permanently.

I [made you a video](https://d7.wtf/s/Screen%20Recording%202019-04-23%20at%2018.06.34.mp4) showing everything in detail (including page sources), it's high quality and you can just stop it anywhere you want.

Steps i do in that video:

1. Showing main page full of broken links.

2. Opening random page (one of those broken links).

3. Starting to edit it and immediately save it without any changes (source stays the same).

4. Returning back to main page, link to page edited in #3 miraculously **fixes itself**. Main page is not touched in any way.

**After some time (1 day max) it will become broken again.** That's why i think it's an indexing problem, some timed operation brakes it after completion. I tried to reproduce it manually by running tasks from "Scheduled Jobs" but failed.


author: Gonchik Tsymzhitov
body: Hm, it something with caches.

I reproduce it.

links became broken after cleaning cache.


Tags: confluence-server

server