#16 2012-08-21 22:47:04

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

I ran a test which failed. I added this code below to the LocalFile Editor, with the "space" before the close "Bracket".

// permitted characters for files/directoris during synchronization
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

The gallery then displays the photo name correctly but will not show the thumbnail or image. Everything works fine if I use the underscore rather than a space when naming.

Last edited by tplowe56 (2012-08-21 22:47:46)

Offline

 

#17 2012-08-22 13:23:13

flop25
Piwigo Team
2006-07-06
7037

Re: Filename and directories with spaces in them.

Okay this is a bug which has been solved http://piwigo.org/dev/search?q=multi+size+works The next release will solved the problem, but if you can't wait you can apply the changes http://piwigo.org/dev/changeset/17315


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#18 2012-08-24 18:51:09

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

flop25 wrote:

Okay this is a bug which has been solved http://piwigo.org/dev/search?q=multi+size+works The next release will solved the problem, but if you can't wait you can apply the changes http://piwigo.org/dev/changeset/17315

I added the code and it works fine, bit I still need to exempt more characters and I can't get the code to work.

Code:

// permitted characters for files/directoris during synchronization
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

Need to add thse characters: !&'@é

I have tried:

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.\sÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ!\(\)\&\°]+$@é/';

Spaces are allowed  but"é" "@" still generate an error.

Last edited by tplowe56 (2012-08-24 19:38:02)

Offline

 

#19 2012-08-24 20:25:46

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

Code:

// permitted characters for files/directoris during synchronization
$conf['sync_chars_regex'] = '/^a-zA-Z0-9-_. +$/@&!é';

Result when syncing:

Warning: preg_match() [function.preg-match]: Unknown modifier '@' in /home/content/55/2392255/html/gallery2/admin/site_update.php on line 377

Offline

 

#20 2012-08-25 18:18:14

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

OK....I have it cleared up except for one character. The following code exempts everything in my gallery except "é"

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. é\@\'\&\,\!]+$/';

The word "Santé" causes an error when syncing. It returns "Sant�  PWG-UPDATE-1 (wrong filename)"

Offline

 

#21 2012-08-26 01:49:31

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

I guess special characters opens up a can of worms. When I run (not in simulation) I get this error:

Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's.07.12.01.jpg','Dinner at Lowe's.07.12.01','2012-08-25 16:44:34','./galleries/2' at line 8

INSERT  INTO piwigo_images
  (id,file,name,date_available,path,representative_ext,storage_category_id,added_by)
  VALUES('291','Bounce!!!.07.12.01.jpg','Bounce!!!.07.12.01','2012-08-25 16:44:34','./galleries/2012/Summer/Bounce!!!.07.12.01.jpg',NULL,'3','1')
  , ('292','Bounce!!!.07.12.02.jpg','Bounce!!!.07.12.02','2012-08-25 16:44:34','./galleries/2012/Summer/Bounce!!!.07.12.02.jpg',NULL,'3','1')
  , ('293','Bounce!!!.07.12.03.jpg','Bounce!!!.07.12.03','2012-08-25 16:44:34','./galleries/2012/Summer/Bounce!!!.07.12.03.jpg',NULL,'3','1')
  , ('294','Bounce!!!.07.12.04.jpg','Bounce!!!.07.12.04','2012-08-25 16:44:34','./galleries/2012/Summer/Bounce!!!.07.12.04.jpg',NULL,'3','1')
  , ('295','Bounce!!!.07.12.05.jpg','Bounce!!!.07.12.05','2012-08-25 16:44:34','./galleries/2 in /home/content/55/2392255/html/gallery2/include/dblayer/functions_mysql.inc.php on line 770



Warning:  [mysql error 1062] Duplicate entry '291-3' for key 1

INSERT  INTO piwigo_image_category
  (image_id,category_id)
  VALUES('291','3')
  , ('292','3')
  , ('293','3')
  , ('294','3')
  , ('295','3')
  , ('296','3')
  , ('297','3')
  , ('298','3')
  , ('299','3')
  , ('300','3')
  , ('301','3')
  , ('302','3')
  , ('303','3')
  , ('304','3')
  , ('305','3')
  , ('306','3')
  , ('307','3')
  , ('308','3')
  , ('309','3')
  , ('310','3')
  , ('311','3')
  , ('312','3')
  , ('313','3')
  , ('314','3')
  , ('315','3')
  , ('316','3')
  , ('317','3')
  , ('318','3')
  , ('319','3')
  , ('320','3')
  , ('321','3')
  , ('322','3')
  , ('323','3')
  , ('324','4')
  , ('325','4')
  , ('326','4')
  , ('327','4')
  , ('328','4')
  , ('329','4')
  , ('330','4')
  , ('331','4')
  , ('332','4')
  , ('333','4')
  , ('334','4')
  , ('335','4')
  , ('336','4')
  , ('337','4')
  , ('338','4')
  , ('339','4') in /home/content/55/2392255/html/gallery2/include/dblayer/functions_mysql.inc.php on line 770


Warning: Cannot modify header information - headers already sent by (output started at /home/content/55/2392255/html/gallery2/include/dblayer/functions_mysql.inc.php:769) in /home/content/55/2392255/html/gallery2/include/page_header.php on line 105


And the web pages loads this error:


Notice: Undefined index: 295 in /home/content/55/2392255/html/gallery2/include/category_cats.inc.php on line 313

    Mexico
    Mexico

    107 photos
    Summer
    Summer

    184 photos

    Fatal error: Call to a member function has_size() on a non-object in /home/content/55/2392255/html/gallery2/include/derivative.inc.php on line 198


Quite a mess.

Offline

 

#22 2013-04-06 09:18:32

BCAdventures
Guest

Re: Filename and directories with spaces in them.

Just wanted to thank you for your valuable comments...... Using the regex line and your suggestions I added the space, bracket symbols, and was able to I port my photos (over 1800 for year 2011) as a test..... Eventually 2012 and 2013 will do the same !

 

#23 2013-09-15 15:46:47

Bigs38
Guest

Re: Filename and directories with spaces in them.

Hello,
I create a file config.inc.php with this line to accept space and some accentuated caracters

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. \à\é]+$/';

It works when syncing and only thumbnail didn't appear ... If I understand posts above, normaly it must work for version of Piwigo over 2.4 and I use 2.5.2

Could you help me
Thanks.

 

#24 2013-09-15 15:55:34

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Filename and directories with spaces in them.

hello

not related

please search in the forum and read http://piwigo.org/doc/doku.php?id=user_ … es_missing

Offline

 

#25 2013-09-15 16:50:54

bigs38
Guest

Re: Filename and directories with spaces in them.

Hello, thanks for your answer but this topic is on filenames and directories with spaces and on and some accentuated caracters?

Actually I can import pictures who have specials caracters in their name, but just for them I couldn't have tumbnails.

I activate log file and I have this error when I try to generate thumbnails for pictures with specials caracters :

ERROR 400 Invalid chars in request

 

#26 2013-09-15 16:56:19

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Filename and directories with spaces in them.

yes this topic is about special char
and your problem is not related directly to special chars, but thumbnail generation

please follow the forum rules: open a new topic (and don't bump old topics)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact