Piwigo / piwigo-videojs

Videojs port for piwigo. Play your videos on your web gallery!
http://piwigo.org/ext/extension_view.php?eid=610
GNU General Public License v3.0
64 stars 45 forks source link

videojs sync breaks with database error - incorrect handling of quotation marks? #213

Open outdoorbits opened 1 year ago

outdoorbits commented 1 year ago

The synchronization of VideoJS breaks off when I activate "Synchronize metadata". Unfortunately I don't get an error message in the log file ($conf['log_level'] = 'DEBUG';).

php error message is: `
Fatal error: Uncaught mysqli_sql_exception: Data truncated for column 'longitude' at row 1 in /www/piwigo/include/dblayer/functions_mysqli.inc.php:132 Stack trace:

0 /www/piwigo/include/dblayer/functions_mysqli.inc.php(132): mysqli->query()

1 /www/piwigo/plugins/piwigo-videojs/include/function_sync2.php(102): pwg_query()

2 /www/piwigo/plugins/piwigo-videojs/admin/admin_sync.php(140): require_once('...')

3 /www/piwigo/plugins/piwigo-videojs/admin/admin.php(68): include_once('...')

4 /www/piwigo/admin/plugin.php(53): include_once('...')

5 /www/piwigo/admin.php(345): include('...')

6 {main}

thrown in /www/piwigo/include/dblayer/functions_mysqli.inc.php on line 132
Probably the error might show up here: GPS Longitude : 8 deg 32' 25.80" E` Is there a problem about the quotation marks?

upgrade.php says "No upgrade required, the database structure is up to date".

update piwigo_config set value = 'a:0:{}' where param = 'vjs_sync'; didn't change anything.

Could anybody help me to get error messages or did anybody solve this problem?

Thank you!

Here is my config.inc.php: `<?php $conf['show_php_errors'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED; // +-----------------------------------------------------------------------+ // | log | // +-----------------------------------------------------------------------+ // Logs directory, relative to $conf['data_location'] $conf['log_dir'] = '/logs';

// Log level (OFF, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG) // development = DEBUG, production = ERROR $conf['log_level'] = 'DEBUG';

// Keep logs file during X days $conf['log_archive_days'] = 30;

$conf['upload_form_all_types'] = true; $conf['sync_charsregex'] = '/^[a-zA-Z0-9-. ]+$/'; $conf['use_exif'] = true; $conf['use_exif_mapping'] = array( 'date_creation' => 'DateTimeOriginal', ); $conf['show_exif'] = true; $conf['show_exif_fields'] = array( 'ExposureTime', // 'ShutterSpeed', // 'COMPUTED;ApertureFNumber', 'FNumber', 'ISOSpeedRatings', 'ExposureMode', 'DateTimeOriginal', // 'FocalLengthIn35mmFilm', 'Flash', 'FocalLength', 'UndefinedTag:0xA434', 'Make', 'Model', 'make', 'model', 'Software', 'ExposureBiasValue', 'FILE;FileSize', 'WhiteBalance', 'filesize', 'format', 'formatprofile', 'codecid', 'frame_rate', 'resolution', 'MeteringMode', 'ExposureProgram', 'LightSource', // 'Contrast', // 'Saturation', // 'Sharpness', 'bitrate', 'channel', 'date_creation', 'display_aspect_ratio', 'duration', 'latitude', 'longitude', 'playtime_seconds', 'sampling_rate', // 'type', 'rotation', 'ExifVersion', ); $conf['sync_exclude_folders'] = array ( 'NEF', '.videoThumbnails', 'NKSC PARAM','NKS PARAM', 'darktable exported', '.Thumbnails', '.thumbnails', ); $conf['inheritance_by_default'] = true; $conf['derivative_default_size'] = 'xlarge';

// picture_ext : file extensions for picture file, must be a subset of // file_ext $conf['picture_ext'] = array('jpg','jpeg','png','gif');

// file_ext : file extensions (case sensitive) authorized $conf['file_ext'] = array_merge( $conf['picture_ext'], array('tiff', 'tif', 'mpg','avi','mp3','ogg','svg') );

// enable_formats: should Piwigo search for multiple formats? $conf['enable_formats'] = false;

// format_ext : file extensions for formats, ie additional versions of a // photo (or nay other file). Formats are in sub-directory pwg_format. $conf['format_ext'] = array('cr2', 'tif', 'tiff', 'nef', 'dng', 'ai', 'psd'); ?>`

Piwigo 13.8.0

Environment: Ubuntu 22.04.2 LTS Apache/2.4.52 (Ubuntu) 10.6.12-MariaDB-0ubuntu0.22.04.1 MediaInfoLib - v21.09 ffprobe version 4.4.2-0ubuntu0.22.04.1 exiftool 12.4 ffmpeg version 4.4.2-0ubuntu0.22.04.1

GJSchaller commented 9 months ago

Edit - my error was different, related to: https://github.com/Piwigo/piwigo-videojs/issues/205