Loading...
 
Skip to main content

Profile not applied properly (after 1st image inserted) when init_files defined in a file gallery

Status
Closed
Subject
Profile not applied properly (after 1st image inserted) when init_files defined in a file gallery
Version
15.x
15.x Regression
16.x
16.x Regression
17.x
17.x Regression
Category
  • Error
  • Regression
Feature
Installer (profiles, upgrades and server-related issues)
Resolution status
Fixed or Solved
Submitted by
Xavier de Pedro
Lastmod by
Xavier de Pedro
Rating
(0)
Description

This profile, for instance, has some file defined in the file gallery that is created by the profile, and only the first is created through the profile, instead of the whole set as in the past (Tiki12), and the rest of the profile is not applied. If you remove the init_files then the whole profile is applied.
https://profiles.tiki.org/Easy+GeoBlog

These are the type of error messages (after many notices) shown in the shell when the profile is applied with

Copy to clipboard
php console.php d:i --force; php console.php p:a "Easy GeoBlog" > log_egb.txt 2>&1

Copy to clipboard
(...) PHP Warning: preg_match() expects parameter 2 to be string, object given in /var/www/html/16.x/lib/filegals/filegallib.php on line 3932 PHP Stack trace: PHP 1. {main}() /var/www/html/16.x/console.php:0 PHP 2. Symfony\Component\Console\Application->run() /var/www/html/16.x/console.php:184 PHP 3. Symfony\Component\Console\Application->doRun() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Application.php:126 PHP 4. Symfony\Component\Console\Application->doRunCommand() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Application.php:195 PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Application.php:874 PHP 6. Tiki\Command\ProfileInstallCommand->execute() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253 PHP 7. Tiki_Profile_Installer->install() /var/www/html/16.x/lib/core/Tiki/Command/ProfileInstallCommand.php:67 PHP 8. Tiki_Profile_Installer->doInstall() /var/www/html/16.x/lib/core/Tiki/Profile/Installer.php:375 PHP 9. Tiki_Profile_InstallHandler->install() /var/www/html/16.x/lib/core/Tiki/Profile/Installer.php:450 PHP 10. Tiki_Profile_InstallHandler_FileGallery->_install() /var/www/html/16.x/lib/core/Tiki/Profile/InstallHandler.php:24 PHP 11. Tiki_Profile_InstallHandler_FileGallery->upload() /var/www/html/16.x/lib/core/Tiki/Profile/InstallHandler/FileGallery.php:159 PHP 12. FileGalLib->get_info_from_url() /var/www/html/16.x/lib/core/Tiki/Profile/InstallHandler/FileGallery.php:173 PHP 13. FileGalLib->get_info_from_http() /var/www/html/16.x/lib/filegals/filegallib.php:3889 PHP 14. preg_match() /var/www/html/16.x/lib/filegals/filegallib.php:3932 PHP Catchable fatal error: Object of class Zend\Http\Header\Etag could not be converted to string in /var/www/html/16.x/lib/core/TikiDb/Pdo.php on line 77 PHP Stack trace: PHP 1. {main}() /var/www/html/16.x/console.php:0 PHP 2. Symfony\Component\Console\Application->run() /var/www/html/16.x/console.php:184 PHP 3. Symfony\Component\Console\Application->doRun() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Application.php:126 PHP 4. Symfony\Component\Console\Application->doRunCommand() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Application.php:195 PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Application.php:874 PHP 6. Tiki\Command\ProfileInstallCommand->execute() /var/www/html/16.x/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253 PHP 7. Tiki_Profile_Installer->install() /var/www/html/16.x/lib/core/Tiki/Command/ProfileInstallCommand.php:67 PHP 8. Tiki_Profile_Installer->doInstall() /var/www/html/16.x/lib/core/Tiki/Profile/Installer.php:375 PHP 9. Tiki_Profile_InstallHandler->install() /var/www/html/16.x/lib/core/Tiki/Profile/Installer.php:450 PHP 10. Tiki_Profile_InstallHandler_FileGallery->_install() /var/www/html/16.x/lib/core/Tiki/Profile/InstallHandler.php:24 PHP 11. Tiki_Profile_InstallHandler_FileGallery->upload() /var/www/html/16.x/lib/core/Tiki/Profile/InstallHandler/FileGallery.php:159 PHP 12. FileGalLib->attach_file_source() /var/www/html/16.x/lib/core/Tiki/Profile/InstallHandler/FileGallery.php:185 PHP 13. AttributeLib->set_attribute() /var/www/html/16.x/lib/filegals/filegallib.php:3983 PHP 14. TikiDb_Table->insertOrUpdate() /var/www/html/16.x/lib/attributes/attributelib.php:89 PHP 15. TikiDb->queryException() /var/www/html/16.x/lib/core/TikiDb/Table.php:56 PHP 16. TikiDb_Pdo->query() /var/www/html/16.x/lib/core/TikiDb.php:72 PHP 17. TikiDb_Pdo->_query() /var/www/html/16.x/lib/core/TikiDb/Pdo.php:118 PHP 18. PDOStatement->execute() /var/www/html/16.x/lib/core/TikiDb/Pdo.php:77


By the way, In Tiki15, not a single file is added to the file gallery.

Solution

fixed by kroky6 today in
kroky6 r60503 branches/16.x/lib/filegals/filegallib.php
FIX filegal get_info/upload_single_file fixes for bad parameters errors (effectively fixes applying profiles with remote files) (thanks xavi)

kroky6 r60504 branches/15.x/lib/filegals/filegallib.php
bp/60503 FIX filegal get_info/upload_single_file fixes for bad parameters errors (effectively fixes applying profiles with remote files) (thanks xavi)

Importance
6
Easy to solve?
5
Priority
30
Demonstrate Bug on Tiki 19+
Please demonstrate your bug on show2.tiki.org
Demonstrate Bug (older Tiki versions)
Ticket ID
6140
Created
Wednesday 19 October, 2016 12:11:09 UTC
by Xavier de Pedro
LastModif
Thursday 01 December, 2016 22:55:30 UTC


Collapse/expand modules below
Show PHP error messages