Batch Add Files problem Batch Add Files problem
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Batch Add Files problem

Started by Sandrina, October 30, 2011, 12:28:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sandrina

Hi.
I uploaded my gallery verion a few weeks ago and i have i problem, that i didn't have, when gallery was 1.4 version.
I prefered to upload images via Batch Add Files, so some FTP folders names are short, like "Photo Shoot01", but some are long like "68 - Out and About in Soho, NY - October 26, 2011" and when i try to add files from album, that named with long name - thay didn't add and i just jumped to the strat page of the Batch Add. When i have 1.4 version i don't have this error and files added from any album with any long name.
Tell me please, how can i fix it in 1.5 version? Thank you.

My gallery - http://ahathaway-online.info/gallery
Version - 1.5.16

Αndré

Please post the complete path (beginning with albums/...) of a directory (or maybe all) that doesn't work as expected.

Sandrina

Hi.
Here is example album link - ahathaway-online.info/gallery/albums/candids/2011/13 - Leaves Oscar Pre-Party at Chateau Marmont - February 23, 2011

Sandrina

Find another bug, that i didn't have in 1.4 version. Iа album name like "Name(2001)", i can't even open it. Only after i remove ( and ), i can see images in it. How can i fix this error? Bacuse when i have 1.4 version of gallery i upload many files in albums that was named like that, and now i can't add new images in them, bacause i can't upload them.

Sandrina

Ok, as i understand after testing, version 1.5 didn't like when there are next symbols in albums names (they was allowed in old version):
.  ,  (  ) 

So, can i fix it some how? Bacause gallery worked about 2 years on version 1.4 and many albums names are forbidden now to use and i can't add new files in them and this is really bad.
I will be waiting your answer very very much, because it's really important for me. Thanks.

Αndré

If you want to allow those characters, open searchnew.php, find
} elseif ($superCage->get->keyExists('startdir') && $matches = $superCage->get->getMatched('startdir', '/^[0-9A-Za-z\/\\\\_-\s]+$/')) {
and replace with
} elseif ($superCage->get->keyExists('startdir') && $matches = $superCage->get->getMatched('startdir', '/^[0-9A-Za-z\/\\\\\,\.\(\)_-\s]+$/')) {

Sandrina

Thank you very much for answer.
Now i can add albums with , and . characters.
But it's still didn't work, if i have ( or ) in folder name. For example, if folder named like Title (2002) i can't see any albums that i was created in that folder and any photos as well. Structure on that folder is like
Title (2002)
   Album 1
      photo1.jpg
      photo2.jpg
      photo3.jpg
   Album 2
      photo1.jpg
   Album 3

Sandrina

Αndré, can you give me any advice regarding my question (previous post)?
Thank you.

Αndré

You have to extend the regex in minibrowser.php, too:
find
$folder_regex = '/^([A-Za-z]:){0,1}[0-9A-Za-z\\.\\\\_\\-,&\' ]+$/';
and replace with
$folder_regex = '/^([A-Za-z]:){0,1}[0-9A-Za-z\\.\\\\_\\-,&\' \,\.\(\)]+$/';

find
$folder_regex = '/^[0-9A-Za-z\\.\\/_\\-,&\' ]+$/';
and replace with
$folder_regex = '/^[0-9A-Za-z\\.\\/_\\-,&\' \,\.\(\)]+$/';

Sandrina

now everything work perfectly! ;)
thank you very much!))