Batch Manager does not work when specifying an International charset with setlocale. Piwigo 2.9.1. Firefox 55.0.3
Very strange issue, but Quick Local Synchronization did not function when the filenames or directories contained International/Swedish characters. After a lot of troubleshooting, I found a solution by simply adding:
setlocale(LC_ALL,'sv_SE.utf8');
in the file config.inc.php.
All was fine and dandy. But I recently noticed that the Batch Manager page did not display correctly. The menu on the left is fully expanded (on all other menu items/pages it is only the current menu that is expanded) . Also, the Selection area doesn’t work. I.e. when I click on one of the: ‘The whole page, The whole set, None, Invert’, nothing happens. And the grey information box to the right is empty and very small. The browser also throws SyntaxErrors when I have the setlocale enabled.
After a whole lot of troubleshooting, I discovered that if I comment out the 'setlocale' line in my config.inc.php, and refresh the Batch Manager page – it displays perfectly.
So I am guessing there is something in the batch_manager.php script, or related files, that is charset or locale sensitive.
Anyone have ideas on where to report this and get it fixed? The setlocale is great for allowing Swedish characters everywhere else in Piwigo, and I would hate for the solution to fix Batch Manager to be – "Don't use setlocale".
Batch Manager does not work when specifying an International charset with setlocale. Piwigo 2.9.1. Firefox 55.0.3
Very strange issue, but Quick Local Synchronization did not function when the filenames or directories contained International/Swedish characters. After a lot of troubleshooting, I found a solution by simply adding:
setlocale(LC_ALL,'sv_SE.utf8');

in the file config.inc.php.
All was fine and dandy. But I recently noticed that the Batch Manager page did not display correctly. The menu on the left is fully expanded (on all other menu items/pages it is only the current menu that is expanded) . Also, the Selection area doesn’t work. I.e. when I click on one of the: ‘The whole page, The whole set, None, Invert’, nothing happens. And the grey information box to the right is empty and very small. The browser also throws SyntaxErrors when I have the setlocale enabled.



After a whole lot of troubleshooting, I discovered that if I comment out the 'setlocale' line in my config.inc.php, and refresh the Batch Manager page – it displays perfectly.



So I am guessing there is something in the batch_manager.php script, or related files, that is charset or locale sensitive.
Anyone have ideas on where to report this and get it fixed? The setlocale is great for allowing Swedish characters everywhere else in Piwigo, and I would hate for the solution to fix Batch Manager to be – "Don't use setlocale".
<!-- github-sync-id:256230330 -->
@malien24 can you give us more details from your web browser console? We need something like "Syntax Error on line xxx" and if you click on the associated file name, it should show you the line.
My guess is that it's specific to a language which brings a string breaking the javascript code. We just need to findthis string and fix it.
@malien24 can you give us more details from your web browser console? We need something like "Syntax Error on line xxx" and if you click on the associated file name, it should show you the line.
My guess is that it's specific to a language which brings a string breaking the javascript code. We just need to findthis string and fix it.
<!-- github-comment-id:609006475 -->
Ok.
If paste setlocale (LC_ALL, 'ru_RU.UTF-8'); in local/config/config.inc.php, BatchManager not working:
in top of page I see "Notice: A non well formed numeric value encountered in /var/www/piwigo/admin/batch_manager.php on line 788"
In console I see:
Ok.
If paste `setlocale (LC_ALL, 'ru_RU.UTF-8');` in local/config/config.inc.php, BatchManager not working:
in top of page I see "Notice: A non well formed numeric value encountered in /var/www/piwigo/admin/batch_manager.php on line 788"
In console I see:

<!-- github-comment-id:609009088 -->
OK, and if you click on the admin.php:910:15 at the end of the line of the web browser console, what do you see?
OK, and if you click on the `admin.php:910:15` at the end of the line of the web browser console, what do you see?
<!-- github-comment-id:609020626 -->
like at the first message I see that:
" The menu on the left is fully expanded (on all other menu items/pages it is only the current menu that is expanded) . Also, the Selection area doesn’t work. I.e. when I click on one of the: ‘The whole page, The whole set, None, Invert’, nothing happens. And the grey information box to the right is empty and very small. The browser also throws SyntaxErrors when I have the setlocale enabled."
like at the first message I see that:
" The menu on the left is fully expanded (on all other menu items/pages it is only the current menu that is expanded) . Also, the Selection area doesn’t work. I.e. when I click on one of the: ‘The whole page, The whole set, None, Invert’, nothing happens. And the grey information box to the right is empty and very small. The browser also throws SyntaxErrors when I have the setlocale enabled."
<!-- github-comment-id:609039777 -->
in old versions of piwigo I must set "setlocale (LC_ALL, 'ru_RU.UTF-8');" in config.inc.php to piwigo work with cyrilic symbols in file names, and with upgrade to new versions, this function begin crash batch manager, but batch manager work without that string in piwigo 2.10.2 and piwigo understand cyrilic symbols....
in old versions of piwigo I must set "setlocale (LC_ALL, 'ru_RU.UTF-8');" in config.inc.php to piwigo work with cyrilic symbols in file names, and with upgrade to new versions, this function begin crash batch manager, but batch manager work without that string in piwigo 2.10.2 and piwigo understand cyrilic symbols....
<!-- github-comment-id:609040457 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Batch Manager does not work when specifying an International charset with setlocale. Piwigo 2.9.1. Firefox 55.0.3
Very strange issue, but Quick Local Synchronization did not function when the filenames or directories contained International/Swedish characters. After a lot of troubleshooting, I found a solution by simply adding:
setlocale(LC_ALL,'sv_SE.utf8');

in the file config.inc.php.
All was fine and dandy. But I recently noticed that the Batch Manager page did not display correctly. The menu on the left is fully expanded (on all other menu items/pages it is only the current menu that is expanded) . Also, the Selection area doesn’t work. I.e. when I click on one of the: ‘The whole page, The whole set, None, Invert’, nothing happens. And the grey information box to the right is empty and very small. The browser also throws SyntaxErrors when I have the setlocale enabled.
After a whole lot of troubleshooting, I discovered that if I comment out the 'setlocale' line in my config.inc.php, and refresh the Batch Manager page – it displays perfectly.

So I am guessing there is something in the batch_manager.php script, or related files, that is charset or locale sensitive.
Anyone have ideas on where to report this and get it fixed? The setlocale is great for allowing Swedish characters everywhere else in Piwigo, and I would hate for the solution to fix Batch Manager to be – "Don't use setlocale".
I confirm this issue on Piwigo 2.10.2 php7.0, 7.1, 7.2, 7.3
@malien24 can you give us more details from your web browser console? We need something like "Syntax Error on line xxx" and if you click on the associated file name, it should show you the line.
My guess is that it's specific to a language which brings a string breaking the javascript code. We just need to findthis string and fix it.
Ok.

If paste
setlocale (LC_ALL, 'ru_RU.UTF-8');in local/config/config.inc.php, BatchManager not working:in top of page I see "Notice: A non well formed numeric value encountered in /var/www/piwigo/admin/batch_manager.php on line 788"
In console I see:
If remove
setlocale (LC_ALL, 'ru_RU.UTF-8');, all workingOK, and if you click on the
admin.php:910:15at the end of the line of the web browser console, what do you see?like at the first message I see that:
" The menu on the left is fully expanded (on all other menu items/pages it is only the current menu that is expanded) . Also, the Selection area doesn’t work. I.e. when I click on one of the: ‘The whole page, The whole set, None, Invert’, nothing happens. And the grey information box to the right is empty and very small. The browser also throws SyntaxErrors when I have the setlocale enabled."
in old versions of piwigo I must set "setlocale (LC_ALL, 'ru_RU.UTF-8');" in config.inc.php to piwigo work with cyrilic symbols in file names, and with upgrade to new versions, this function begin crash batch manager, but batch manager work without that string in piwigo 2.10.2 and piwigo understand cyrilic symbols....