#1 2025-01-16 10:50:21

picslover
Member
2025-01-16
1

failed with # in directory name

Hello/Hi/Greetings,

I have some photo folders named as #tttt# or yyy#yyy, when synch is done without fault, no photo thumbnail is displayed for those folders and no photo inside those folders(directories) is seen. but the synch says "n photos updated in the database".

A big red alart (Some photos are missing from your file system. Details provided by plugin Check Uploads ) is shown on top of admin tool maintenance page. And in i.php log ,  "[ERROR]    [i.php]    400 Missing ."

I have put # into local configure file as following:
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_~`.\#\~\(\)\[\]\ 【】<>《》()“”、, ·×\{\}、\^\?\%=★☆#@\s+]+$/u';

i tried dg2 and imagick both failed same.

the piwigo version is 15.3 and PHP is 7.4.33 MySQL is 5.7.41 the OS is Win10

Can anyone tell me what's wrong with my folder name?



Piwigo 15.3.0 Check for upgrade
Installed on 4 December 2023, 1 year 1 month 1 week 4 days ago
Operating system: WINNT
PHP: 7.4.33 (Show info) [2025-01-16 17:51:55]
MySQL: 5.7.41 [2025-01-16 17:51:55]
Graphics Library: ImageMagick ImageMagick 7.1.0-1

Last edited by picslover (2025-01-16 10:52:42)

Offline

 

#2 2025-01-20 11:19:25

erAck
Only trying to help
2015-09-06
2237

Re: failed with # in directory name

Yes, you simply can not use # in a directory or file name, because it is an URI reserved character and the URI fragment delimiter, and Piwigo doesn't do the urlencoding escapement that would be necessary to cope with that. See also the documentation for $conf['sync_chars_regex'] at https://github.com/Piwigo/Piwigo/blob/2 … C1-L919C51

Regarding your regex, you do not need to \-backslash escape literal characters other than ] or \ within a [] character class set expression.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB