Search…

X3 Photo Gallery Support Forums

Search…
 
mayun
Topic Author
Posts: 2
Joined: 24 Dec 2020, 09:41

Questions about the menu

24 Dec 2020, 10:20

Hello, I encountered a problem when using it. The menu on the left did not display, and all displayed the first file name. I checked the menu cache, and the cache was also the first file name displayed. Is there a solution? thank you

My language: Chinese simplified

Environment used: nginx-1.18.0 php-7.4.13

Image


Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Questions about the menu

24 Dec 2020, 22:26

Hi. Thanks for reporting.

It's only the menu NAME that is wrong? I mean, when you click the menu items, the correct folder and content displays? It looks like a problem on your server with PHP basename and unicode (Chinese) characters. Basename normally returns the name from a path, for example /windows/你好/ will return 你好, and that's how it works in our demo also (see /tests/language/*), but on your server it's ignored.

This is reported as a bug in PHP, but I think it might be solved in newer versions:
https://bugs.php.net/bug.php?id=62119

If not, the solution would be to make sure the locale is set to UTF-8. Your server is likely set to another locale, either ASCII or some Chinese variation? It should really be UTF-8, since Chinese characters are unicode (multibyte characters).
https://stackoverflow.com/questions/452 ... file-names

Same issue:
https://github.com/thephpleague/flysystem/issues/235

Else we may need to consider creating a wrapper function.
 
mayun
Topic Author
Posts: 2
Joined: 24 Dec 2020, 09:41

Re: Questions about the menu

25 Dec 2020, 16:36

Hello, thank you for your answer. I reset the running environment once and it can be displayed normally. It may be a problem with my environment settings, which has been resolved, thank you