#1 2015-02-22 01:32:48

rberthold01
Member
2015-02-20
2

Error Synchronizing Gallery 3 Directories and Files

Hello All,

Piwigo version: 2.7.4
PHP version: 5.6.5
Mariadb version: 10.0.15
Piwigo URL: http://berthold.servepics.com:7770/piwigo


I am trying to do a conversion from Gallery3 to Piwigo and I am getting stuck. I was trying to sync the gallery folders with Piwigo and I kept getting PWG-UPDATE-1 (wrong filename). So I followed this help section http://piwigo.org/forum/viewtopic.php?id=20373 and did the following:

there are spaces in you filenames

with the Plugin LocalFilesEditor add this to you local configuration (first tab)

Code:

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

I edited it further to trap on the characters that my files and directories contained but then I got this error when running a sync:



Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's-Droid-X','Ryan's-Droid-X','1','2','2,3','true','true','public','1','2.1')
  , ' at line 4

INSERT  INTO piwigo_categories
  (id,dir,name,site_id,id_uppercat,uppercats,commentable,visible,status,rank,global_rank)
  VALUES('2','Ryan-&-Natalie-Berthold','Ryan-&-Natalie-Berthold','1',NULL,'2','true','true','public','2','2')
  , ('3','Ryan's-Droid-X','Ryan's-Droid-X','1','2','2,3','true','true','public','1','2.1')
  , ('4','Nats-Droid-Phone','Nats-Droid-Phone','1','2','2,4','true','true','public','2','2.2')
  , ('5','Nat's-Chocolate-Phone','Nat's-Chocolate-Phone','1','2','2,5','true','true','public','3','2.3')
  , ('6','2008','2008','1','5','2,5,6','true','true','public','1','2.3.1')
  , ('7','2009','2009','1','5','2,5,7','true','true','public','2','2.3.2')
  , ('8','2008','2008','1','2','2,8','true','true','public','4','2.4')
  , ('9','02-14-2008-Colie','02- in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 830



Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
    AND status = 'private'' at line 3

SELECT id
  FROM piwigo_categories
  WHERE id IN ()
    AND status = 'private'
; in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 830


Fatal error: Call to a member function fetch_assoc() on boolean in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 891

Any advice would be greatly appreciated.

Thank you in advance,
Ryan Berthold

Offline

 

#2 2015-02-23 04:01:38

SnotRocket
Member
2014-08-15
63

Re: Error Synchronizing Gallery 3 Directories and Files

Welcome to hell.  I spent DAYS working on individual files... cleaning them up, spaces, brackets, dashes, etc.

This will help:

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

$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'ExifVersion',
  'Software',
  'DateTimeOriginal',
  'FNumber',
  'ExposureBiasValue',
  'FILE;FileSize',
  'ExposureTime',
  'Flash',
  'ISOSpeedRatings',
  'FocalLength',
  'FocalLengthIn35mmFilm',
  'WhiteBalance',
  'ExposureMode',
  'MeteringMode',
  'ExposureProgram',
  'LightSource',
  'Contrast',
  'Saturation',
  'Sharpness',
  );

My quote and the forum seems to not make this the way it should.  This whole next block of text is ONE line:


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

Last edited by SnotRocket (2015-02-23 04:03:25)

Offline

 

#3 2015-02-23 04:36:27

rberthold01
Member
2015-02-20
2

Re: Error Synchronizing Gallery 3 Directories and Files

Snot Rocket,
I put that string into the LocalFiles Editor and I received the same sql error when running the Sync. Do you have any other suggestions or did I do something wrong?

Offline

 

Board footer

Powered by FluxBB