Category: Console / Command Line
Show subcategories objects| Name | Type |
|---|---|
| Error in updating Tiki 18 to last version | tracker item |
|
(A blocker if confirmed) errors in trunk database upgrade through console.php keys too long and invalid default value
I've updated trunk in a server, and I got these error messages after upgrading the database with console.php command: {CODE(ln="1" colors="shell")} root@server:/var/www/tikitrunk# php console.php d:u --site=mysite.example.com PHP Warning: The requested theme's CSS file could not be read. Falling back to default theme. in /var/www/tikitrunk/lib/setup/theme.php on line 100 PHP Stack trace: PHP 1. {main}() /var/www/tikitrunk/console.php:0 PHP 2. require_once() /var/www/tikitrunk/console.php:59 PHP 3. require_once() /var/www/tikitrunk/tiki-setup.php:150 PHP 4. trigger_error() /var/www/tikitrunk/lib/setup/theme.php:100 Update completed. Installed: 20111231_change_datetime_defaults_to_null_tiki Installed: 20180609_change_log_column_type_tiki Installed: 20180705_fix_calendaritem_tracker_attributes_tiki Installed: 20180706_remove_menu_reports_tiki Installed: 20180803_semaphore_value_tiki Installed: 20180815_merge_topic_read_perm_tiki Installed: 20180918_remove_poweredby_module_tiki Installed: 20180923_convert_collation_to_utf8mb4_tiki Queries executed successfully: 277 Error in unknown patch script ALTER TABLE index_5a6715b9e9160 convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE index_pref_en convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE metrics_metric convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE metrics_tab convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE tiki_acct_journal convert to character set DEFAULT COLLATE DEFAULT Invalid default value for 'journalDate' Error in unknown patch script ALTER TABLE tiki_acct_stack convert to character set DEFAULT COLLATE DEFAULT Invalid default value for 'stackDate' Error in unknown patch script ALTER TABLE tiki_banning convert to character set DEFAULT COLLATE DEFAULT Invalid default value for 'date_to' Error in unknown patch script ALTER TABLE tiki_comments convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE tiki_links convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE tiki_object_attributes convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE tiki_profile_symbols convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE tiki_secdb convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes Error in unknown patch script ALTER TABLE users_objectpermissions convert to character set DEFAULT COLLATE DEFAULT Specified key was too long; max key length is 1000 bytes {CODE} |
tracker item |
|
Filegallery, Console batch upload; Displayed message about duplicate is wrong
__This bug report has been created to emphasise the need for an option to manage duplicates when using the Tiki console to import files__ Fixing it by really rejecting the upload of a duplicate file will be quit bad as it will make the automatisation of the upload unusable for many case (files can't be updated with a new version). Using the [https://doc.tiki.org/Console|Tiki Console] you can import files from a [https://doc.tiki.org/File-Gallery-User#Batch_uploads|batch upload] folder. {CODE()}php7.4 console.php files:batchupload 5 --subdirToSubgal --createSubgals --confirm{CODE} You can automatise the task using the [https://doc.tiki.org/Scheduler|Tiki Scheduler]. Displayed message in the shell and the scheduler about duplicate is not true. {CODE()} error: Duplicate file found as `49456187_a.jpg`. Upload rejected. error: Duplicate file found as `49456187_b.jpg`. Upload rejected. error: Duplicate file found as `49456187_c.jpg`. Upload rejected. error: Duplicate file found as `49456187_d.jpg`. Upload rejected. error: Duplicate file found as `49456187_e.jpg`. Upload rejected. error: Duplicate file found as `49456187_f.jpg`. Upload rejected. error: Duplicate file found as `49456187_g.jpg`. Upload rejected. error: Duplicate file found as `49456187_h.jpg`. Upload rejected. error: Duplicate file found as `49456187_i.jpg`. Upload rejected. {CODE} But in reality the files are created and duplicates just accumulates with the same name without limit. (there 3 pages like this) {img fileId="1805" thumb="box"} |
tracker item |
|
index.php in the storage directory folder shouldn’t be reported as an issue
When I run php console.php files:check it shows Found 1 Issues, details below: The following files are unknown, exists in the folder, but not in the database +-----------+----------------------+ | Name | Path | +-----------+----------------------+ | index.php | ../mypath | +-----------+----------------------+ It shouldn’t see it as an issue (may prevent monitoring automatisation). |
tracker item |
|
It should be possible to flush any Tiki logs or syslogs from console commands
{syntax type="tiki" editor="plain"} As the title says, it should be possible to use the Tiki console (console.php) to empty any tiki logs. That would ease and even allow automatisation of maintenance operations. |
tracker item |
|
New parameter to set by default (for all new gallery) the maximum of version (archive) per file.
Explaining the way to reproduce the issue; Using a default Tiki21; Set storage to use directory Enable batch-upload and set the batch-upload directory Upload folders with files in the batch-upload directory Run the following in your terminal (change the fileId for the gallery you want): ~pp~php console.php files:batchupload 1 --subdirToSubgal --createSubgals —confirm~/pp~ It will create the subgalleries and place the files in each subgalleries. You’ll have ~~#F00:1~~ file in your file directory for 1 file in your file galleries. Redo the same operation with the same files and folder. It will add a version to the previous files. You’ll have ~~#F00:2~~ files in your file directory for 1 file in your file galleries. Etc... It will add a file each time. To illustrate: {img fileId="1359" thumb="box"} {img fileId="1358" thumb="box"} You may want only to store 1 file (especially if you have automatic script running that is the most important reason to use the console command) --- How to limit the number of stored file per file in the file galleries. In each file gallery subdirectory there is a setting "Maximum number of archives for each file" that is set to 0 (meaning unlimited). As the file subgalleries are created by the console.php they are create by default with unlimited. We need a way to set the value by default for all new created subgalleries. I suggest a new parameter to set by default (for all new gallery) the maximum of version (archive) per file. Eventually a parameter to override it in the console.php command. |
tracker item |
|
Parameter for the Index Rebuild with log Console command to flush previous logs
{syntax type="tiki" editor="plain"} When you issue this command, the "new" log will add-up to previous logs. This is good because you can then compare results. -+php console.php i:r --log+- However there are many case when you need a brand new log session without the previous logs interfering in search or filtering. In this case you need wo delete or empty the previous log file manually. I suggest we add a parameter that will create a fresh log from the console command. |
tracker item |
| PhantomJS | wiki |
|
Preference report should be multitiki-ready
Preferences report reports "" when you run it on a multitiki based installation {CODE()} root@server:/var/www/tiki18farm# php doc/devtools/prefreport.php > prefreport.csv root@server:/var/www/tiki18farm# cat prefreport.csv Cannot initiate database. Tiki is not installed. {CODE} Or autodetect that it's on a multitiki install and prompt the user which tiki you want to have your report on (like with TRIM). or just report them all, with suffixes corresponding to the multitiki names in the installation. I tagged it also against "Community projects" after the discussions we had in the TAG meeting from today: https://tiki.org/20180808-TAG-Meeting. |
tracker item |
|
Running setup.sh Composer from the command line
setup.sh offers to run Composer only, but how can we launch this from the command line? For example: {CODE()}sh setup.sh composer{CODE} |
tracker item |
|
Server Check; Compatibility error (wss/ping?) while all row says versions and settings are good
On a Tiki25 freshly updated after "ec7baa4a7a5852584de95ed133ba3b2a078b3c81": https://gitlab.com/tikiwiki/tiki/-/commit/ec7baa4a7a5852584de95ed133ba3b2a078b3c81 Tested on a Debian 11 server and Local OSX using server check I see: PHP 7.4.33 good PHP version is supported by one of Tiki versions Database MariaDB 10.5.15-MariaDB-0+deb11u1 good Database version is supported by one of Tiki Versions. Tiki Version 25.1 info Current Tiki version Supported Tiki versions Tiki Version PHP MySQL MariaDB Fitness Explanation Tiki 25.x 7.4+ 5.7+ 5.5+ good Recommended version Tiki 24.x 7.4+ 5.7+ 5.5+ info Supported version Etc... everything as usual, so I should be good, but on the top of it I have a remarksbox with an error: ^ Server compatibility The server does not match the minimum requirements for this Tiki version.^ I see an error in the DOM console: WebSocket connection to 'wss://domain.com/ws/ping' failed: Unexpected response code: 404 {img fileId="1927" thumb="box"} |
tracker item |
|
setup.php first default value contradicts message just above it
When running sh setup.sh on a fresh install, it shows the following message: «Composer: If you are installing via a released Tiki package (zip, tar.gz, tar.bz2, 7z), you can and should skip using Composer. If you are installing and upgrading via SVN, you need to run Composer after 'svn checkout' and 'svn upgrade'. More info at https://dev.tiki.org/Composer» But the first default is always [c] (Composer). This is only correct when one installs from an svn checkout. When installing from tar, zip or other archives, the first default value should be [f] (fix permissions) |
tracker item |
|
Tiki 22 command-line installation
Hello, Bitnami developer here, We are working on supporting the latest Tiki 22. First, we would like to know if this version is considered stable since it is not shown on https://info.tiki.org/Download (we detected it from https://sourceforge.net/projects/tikiwiki/files/Tiki_22.x_Corona_Borealis/). Apart from that, we are trying to follow the command-line installation following the documentation from http://doc.tiki.org/Manual-Installation. However, this version shows us only a small list of commands: {MARKDOWN()} ``` php console.php list Tiki Console Tool Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --site=SITE Multi-Tiki instance --as-user=AS-USER Run the command as a different Tiki user -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: help Displays help for a command list Lists commands database database:configure Database: Configure (write local.php) dev dev:fixbom Fix BOM and line endings for all files installer installer:lock Disable the installer scss scss:compile Compile SCSS theme files into CSS translation translation:englishupdate Fix English strings after modifying them. translation:getstrings Update language.php files with new strings vcs vcs:update Update SVN to latest version & perform tasks for a smooth update. ``` {MARKDOWN} Could you please share with us the exact commands that the installer should run to pass the installation? Thanks in advance, |
tracker item |
|
Tiki Comments, Errors; Missing fields are now reported from within tiki commented (tc) blocks on the wiki page and in the console
{syntax type="tiki" editor="plain"} On a Tiki25 I have a test page to test stuff and I keep a long list of test and setting commented using the Tiki Comments. ~np~~~/np~tc~ On an updated Tiki25 and Tiki26 an error is now visible as it was not visible previously. The error is also reported now in the console command. {img fileId="2077" thumb="box"} {img fileId="2078" thumb="box"} {img fileId="2079" thumb="box"} |
tracker item |
|
Tiki\Composer\PatchCypht hardcoded to php command?
Seems that Cypht patch is hardcoded to -+php+- command not taking into consideration there can be multiple php versions installed on the server with commands like -+php72+-. On my CentOS server I get this: {CODE()} [luci@vm5163 tikitrunk]$ sh setup.sh -pphp72 composer Local PHP version 72 >= to required PHP version 72 - good You are already using composer version 1.9.0 (stable channel). Gathering patches from patch file. > Tiki\Composer\RestoreVendors::restore > Tiki\Composer\CleanVendorAfterVendorBundledMigration::cleanLinks Loading composer repositories with package information Installing dependencies from lock file Package operations: 1 install, 0 updates, 0 removals Gathering patches from patch file. Gathering patches for dependencies. This might take a minute. - Installing components/bootstrap (3.4.1): Loading from cache Package zendframework/zend-version is abandoned, you should avoid using it. Use ocramius/package-versions instead. Generating autoload files > ComponentInstaller\Installer::postAutoloadDump Compiling component files > Tiki\Composer\ThemeInstaller::setup > Tiki\Composer\BootstrapCompiler::build > Tiki\Composer\CleanVendors::clean > Tiki\Composer\CleanVendorAfterVendorBundledMigration::clean > Tiki\Composer\PatchCypht::setup PHP Warning: require(/var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/vendor/paragonie/random_compat/lib/random.php): failed to open stream: No such file or directory in /var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/lib/framework.php on line 38 PHP Fatal error: require(): Failed opening required '/var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/vendor/paragonie/random_compat/lib/random.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/lib/framework.php on line 38 Could not build Cypht package configuration. Check the output below and make sure minimum PHP version is available and executable as CLI. Warning: require(/var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/vendor/paragonie/random_compat/lib/random.php): failed to open stream: No such file or directory in /var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/lib/framework.php on line 38 Fatal error: require(): Failed opening required '/var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/vendor/paragonie/random_compat/lib/random.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/lib/framework.php on line 38 Script Tiki\Composer\PatchCypht::setup handling the post-install-cmd event terminated with an exception [ErrorException] copy(/var/www/clients/client1/web16/subdirs/tikitrunk/vendor_bundled/vendor/jason-munro/cypht/site/site.js): failed to open stream: No such file or directory install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]... {CODE} |
tracker item |
|
Tracker import from console throw error (Tabular import from HTML doesn't)
Since Tiki21 I use tabular import through the console to daily import and update items. It went through with Tiki22 and worked fine for several month then a few month before Tiki23 it started to throw errors. I updated to Tiki23 to check and it is the same. It is interesting to note that the __tabular import from the HTML front end doesn't throw any error__ and that in the end __both import successfully__ all the items. This is the error I have for the 13 items that are imported {CODE()} xxx:~/public_html$ php7.4 console.php tracker:import 20 ../biens/biens_avendre_24_10_2021.csv Importing tracker... Array to string conversion on line 141 of /home/elyseavenue/public_html/lib/core/Tracker/Tabular/Writer/TrackerWriter.php Array to string conversion on line 141 of /home/elyseavenue/public_html/lib/core/Tracker/Tabular/Writer/TrackerWriter.php Undefined index: status on line 2113 of /home/elyseavenue/public_html/lib/trackers/trackerlib.php ... <feedback>feedback: 13 tracker(s) item(s) updated </feedback> {CODE} |
tracker item |
|
Undefined variable: useCache when importing files using the console
I batch import files in Tiki files gallery for a year now. {CODE()}php console.php files:batchupload 5 --subdirToSubgal --createSubgals --confirm{CODE} 6 month ago I started to see a new warning when importing files. I have A LOT like this, look to me one per file. {CODE()} Undefined variable: useCache on line 1321 of /var/www/virtual/xxx.fr/html/lib/filegals/filegallib.php Undefined variable: useCache on line 1325 of /var/www/virtual/xxx.fr/html/lib/filegals/filegallib.php Undefined variable: useCache on line 1330 of /var/www/virtual/xxx.fr/html/lib/filegals/filegallib.php {CODE} |
tracker item |
|
Undefined variable: useCache when importing files using the console command
Since Tiki21 I use batchupload through the console to daily import files. It went through with Tiki22 and worked fine for several month then lately started to throw warnings. I updated to Tiki23 to check and eventually solve as Tiki22 is nearly end of life. There is one error per file, for ALL the file I import. The duplicate is a kind of normal (there are duplicates) and doesn't affect all the files (work as expected). {CODE()} ~/public_html$ php7.4 console.php files:batchupload 5 --subdirToSubgal --createSubgals --confirm Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1328 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1332 of /home/elyseavenue/public_html/lib/filegals/filegallib.php Undefined variable: useCache on line 1337 of /home/elyseavenue/public_html/lib/filegals/filegallib.php error: Duplicate file found as `47283599_a.jpg`. Upload rejected. error: Duplicate file found as `47283599_b.jpg`. Upload rejected. error: Duplicate file found as `47283599_c.jpg`. Upload rejected. {CODE} |
tracker item |
|
Undefined variable: useCache when using console.php batch upload command
From within a shell script I run: php ../html/console.php files:batchupload 5 --subdirToSubgal --createSubgals --confirm It work fine (subdir are created and file imported accordingly. However I got a bunch of notices. (I guess one for each file) {CODE()} PHP Notice: Undefined variable: useCache in /var/www/virtual/elyseavenue-paris15.fr/html/lib/filegals/filegallib.php on line 1313 PHP Notice: Undefined variable: useCache in /var/www/virtual/elyseavenue-paris15.fr/html/lib/filegals/filegallib.php on line 1317 PHP Notice: Undefined variable: useCache in /var/www/virtual/elyseavenue-paris15.fr/html/lib/filegals/filegallib.php on line 1322 PHP Notice: Undefined variable: useCache in /var/www/virtual/elyseavenue-paris15.fr/html/lib/filegals/filegallib.php on line 1313 .../... {CODE} |
tracker item |
|
Verbose lost when MySQL is not running (on MAMP ?)
On my local when MAMP is not active (servers and mysql is off) I used to see a message when trying to use php console.php. Something like "Is MySQL running"... Now I have a less verbosed error: {CODE()} MacBook-Pro:xxx_tiki22 Bernard$ php console.php scss:compile Bernard Compiling scss files from themes Clearing all caches A error was encountered while running a command Call to a member function query() on null on line 27 of /Users/Bernard/Documents/Shocksite/www/htdocs/xxxx/lib/core/TikiDb/Bridge.php {CODE} |
tracker item |
|
Console, MySQL; Confusing (and not helping) message output from the console.php when mysql is off
Tested on Tiki24 an still here: {CODE()} Bernards-MBP:tsaharoniki.com_tiki24 bernardsfez$ php console.php scss:compile tsaharoniki Compiling scss files from themes Clearing all caches A error was encountered while running a command Call to a member function query() on null on line 28 of /Users/bernardsfez/Documents/Shocksite/www/htdocs/tsaharoniki.com_tiki24/lib/core/TikiDb/Bridge.php {CODE} It should just say: "MySQL is not running, check your server" (or something like that) |
tracker item |
|
YAML: one line preference containing operand characters results in PHP fatal error when applying profile
While working on a profile with exported preferences from -+tiki-admin.php?page=profiles&cookietab=2+- I have realized when trying to apply that YAML code as a ((doc:Local Profiles|local profile)) using the following command: -+php console.php profile:apply my-preferences profiles+- the result is fatal error: {CODE()}PHP Fatal error: Unsupported operand types in /var/www/clients/client1/web16/subdirs/.../lib/core/Horde/Yaml/Loader.php on line 363{CODE} The problem is my profile YAML file (which I saved as -+my-preferences.yml+- in a -+profiles/+- dir) contains one line preferences like this: {CODE()} preferences: main_shadow_end: {if $page eq "HomePage"}</div>{/if} main_shadow_start: {if $page eq "HomePage"}<div class="home">{/if} ... {CODE} When I change it to the multiline syntax (notice the "|" character and new indented line): {CODE()} preferences: main_shadow_end: | {if $page eq "HomePage"}</div>{/if} main_shadow_start: | {if $page eq "HomePage"}<div class="home">{/if} ... {CODE} then it works with no fatal error anymore! What can we do to fix this? Fix the YAML exporter somehow to detect if there are any operands like ~gt~ or ~lt~ and if yes export the preference value as multiline even when it is just one line of text? Anything else? Thanks for your time reviewing this bug. luci |
tracker item |
{CODE(label="just normal steps")}root@firstheberg01:/var/www/luci-199-6485# svn up
…
Updated to revision 67723.
root@firstheberg01:/var/www/luci-199-6485# php console.php c:c
Clearing all caches
root@firstheberg01:/var/www/luci-199-6485# php console.php d:u
Update completed.
Installed: 20100909_ckeditor_upgrade_tiki
Installed: 20171010_action_log_info_new_column_tiki
Installed: 20180411_schedulers_change_column_to_text_tiki
Installed: 20180419_scheduler_run_stalled_column_tiki
Installed: 20180421_scheduler_run_healed_column_tiki
Installed: 20180503_fix_throttled_newsletters_tiki
Installed: 20180705_fix_calendaritem_tracker_attributes_tiki
Failed: 20180405_remove_unused_user_id_tiki
Queries executed successfully: 6
Error 0 in 20180405_remove_unused_user_id_tiki
ALTER TABLE tiki_custom_route DROP COLUMN `user_id`
Table 'luci_199_6485.tiki_custom_route' doesn't exist{CODE}