Category: Console / Command Line
Show subcategories objects| Name | Type |
|---|---|
|
php console.php cache:clear --all has no effect
{flash type="url" movie="display750" width="1141" height="529"} |
tracker item |
|
12.0 fresh install: sh setup.sh tries and fails to install developer tools
{CODE()}[root@tikisuite 12]# sh setup.sh Tiki setup.sh - your options ============================ c run composer and exit (recommended to be done first) f fix (classic default) o open (classic option) S clear screen predefined Tiki Permission Check models: ---------------------------------------- 1 paranoia 2 paranoia-suphp w suphp workaround 3 sbox W sbox workaround 4 mixed 5 worry 6 moreworry 7 pain 8 morepain 9 risky a insane q quit x exit There are some other commands recommended for advanced users only. More documentation about this: http://doc.tiki.org/Permission+Check Your choice [c]? #!/usr/bin/env php Some settings on your machine may cause stability issues with Composer. If you encounter issues, try to change the following: Your PHP (5.3.3) is quite old, upgrading to PHP 5.3.4 or higher is recommended. Composer works with 5.3.2+ for most people, but there might be edge case issues. Downloading... Composer successfully installed to: /var/www/html/12/temp/composer.phar Use it: php temp/composer.phar Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension d om is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension d om is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/ phpunit[3.7.28]. Composer failed, retrying in 5 seconds, for a few times. Hit Ctrl-C to cancel. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/phpunit[3.7.28]. Composer failed, retrying in 5 seconds, for a few times. Hit Ctrl-C to cancel. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/phpunit[3.7.28]. Composer failed, retrying in 5 seconds, for a few times. Hit Ctrl-C to cancel. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/phpunit[3.7.28]. Composer failed, retrying in 5 seconds, for a few times. Hit Ctrl-C to cancel. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/phpunit[3.7.28]. Composer failed, retrying in 5 seconds, for a few times. Hit Ctrl-C to cancel. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/phpunit[3.7.28]. Composer failed, retrying in 5 seconds, for a few times. Hit Ctrl-C to cancel. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 3.7.28 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit 3.7.28 -> satisfiable by phpunit/phpunit[3.7.28].{CODE} |
tracker item |
|
Add --auto-fix option to the doc/devtools/check_template_translation_standards.php script
Add --auto-fix option to the doc/devtools/check_template_translation_standards.php script. So running -+~np~$ php doc/devtools/check_template_translation_standards.php --all --auto-fix~/np~+- would automatically replace the reported occurrences (matches). |
tracker item |
|
Add a command to console.php to invalidate certain objects in the search index
In some cases, e.g. where reindexing takes a long time, it would sometimes be useful to invalidate certain objects and then do -+index:catch-up+- to process the queue, e.g. {CODE()}php console.php index:invalidate trackeritem 1234,1235,1236,1237{CODE} (for instance) |
tracker item |
|
add param to console.php to process ALL sites from a multitiki installation at once
Right now, if you have a multitiki installation with 10 sites, and you want to rebuild the unified search index for them all, you have to run 10 times the command with the "--site=" para adapted to each case. However, when you run setup.sh, by default setup.sh runs for all sites in a multitiki installation. It would be nice if console.php had the chance (by default or not) to be run once for all sites in that multitiki installation at once with some param like "--site=all": {CODE(colors="shell")} php console.php d:u --site=all {CODE} |
tracker item |
|
Console, Batch upload; Additional parameter in the console to deal with duplicate files import
Using the batchupload command on the console it should be possible to set what to do when there is a duplicate file detected, when you upload a file with the same name than a file that is already in the file gallery. -+ --duplicatedFileReplacesPrevious +- To replace the file with the new one and delete the previous. -+ --duplicatedFileIgnored +- To Ignore new one if a file with the same name is already there. ''It seems it should be the default, but it is not applied (tested on Tiki22, 23 and 24)'' Additionally the process allow a file gallery to be created if it doesn't exist; -+ --createSubgals +- Providing the value for "Maximum number of archives for each file" in newly created file gallery. -+ --createdSubgalMaxNumArchives=1 +- |
tracker item |
|
After upgrade from tiki 16 to trunk, index rebuild fails
After upgrade from tiki 16 to trunk, index rebuild fails. {CODE()}php console.php index:rebuild PHP Notice: Undefined index: pass_chr_num in /var/www/trunk/lib/user/blacklistlib.php on line 51 Started rebuilding index... [TikiDb_Exception] Specified key was too long; max key length is 1000 bytes{CODE} |
tracker item |
|
Cleaning and improving console.php batch:upload command feedback
{CODE()}[root@ip-xxxxx html]# php console.php files:batchupload 5 --confirm <feedback>feedback: Image was reduced: %s x %s -> %s x %s </feedback>{CODE} *HTML feedback is returned when using the console.php: It should be returned without tag. *Un-needed or malformed feedback was returned: If no reduction it should return nothing or something like "Images where upload at original size". *Expected message is missing: Should return something like "n files were successfully uploaded" (can be improved with the files, path and galleryId ?) Is it returned only when all files are images or even if files are PDF (message is not relevant and erroneous) --- *HTML feedback is returned also for tracker:import {CODE()} <feedback>feedback: 9 tracker(s) item(s) updated </feedback> {CODE} |
tracker item |
|
Command line re-indexing of search: should give you stats like web interface
php console.php index:rebuild works well However, it doesn't give any feedback. The web interface reports: wiki page: 2850 blog post: 4 article: 1708 file: 4321 trackeritem: 6988 comment: 13 Execution time: 510.07 secs Memory usage: 116.50MB Queries: 245172 in 163. secs Last update from SVN (12.0svn): Friday 02 of August, 2013 11:11:40 EDT- REV 46958 |
tracker item |
|
console , translation:getstrings with a single language argument create (duplicate) an .old file for all languages
When using ~pp~php console.php translation:getstrings --lang=en~/pp~ or using with the basedir argument ~pp~php console.php translation:getstrings --basedir=themes/Bernard/templates --lang=en~/pp~ all the /lang/*/language.php files are generated (or just duplicated I can’t say) and a "language.php.old" is added in all the language directories. When a language is specified only this languages files should be targeted. |
tracker item |
|
Console cache:clear command creates files as the current user
Recently (since 21.x i think) the command -+php console.php c:c+- clears the cache files but then recreates several but using the current user (so -+root+- if using sudo to repair a previous issue). Then when using the browser to clear all caches we get these sort of errors: {CODE()} Cache file temp/templates_c/en_basic^c0a74c88a95913ac40aae6373020e7a6b2c0f1f9_0.file.cookie_consent.tpl.php is not writable Error Cache file temp/cache/1a11dae0a46d862cd81ddc7650f62cb8 is not writable Error Cache file temp/cache/container.php is not writable Error Cache file temp/cache/cd13e8c5df46647a6182a0cc858c8ed9 is not writable {CODE} Solution: console clear cache should not regenerate any cache files. |
tracker item |
|
Console command; Rebuilt index with -p (progress) parameter display errors on Terminal
{CODE()} php console.php i:r -p [2023-06-22 09:51] Started rebuilding index... Unified search -------------- Engine: MySQL, version 10.5.19-MariaDB-0+deb11u2 Implicit conversion from float 5066.792011260986 to int loses precision on line 68 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php < 1 sec/< 1 sec [>---------------------------] -- Rebuilding...Implicit conversion from float 13.790607452392578 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php < 1 sec/< 1 sec [>---------------------------] -- Processing file gallery documentsImplicit conversion from float 13.790607452392578 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 13.790607452392578 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 13.790607452392578 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 15.047073364257812 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php Implicit conversion from float 2.9579798380533853 to int loses precision on line 332 of /home/stockgallery/public_html/vendor_bundled/vendor/symfony/console/Helper/ProgressBar.php {CODE} The index complete anyway. |
tracker item |
|
Console commands no longer respect multitiki --site param
Since recent console.php refactoring the --site parameter is no longer respected in (for instance) the database:update command. When running -+php console.php --site=example.com database:update+- the code in -+\Installer::buildPatchList+- builds the patch list from the default db/local.php database, not the db/example.com/local.php. --- I think related to this, even once i've done the database:update in the browser, i cannot rebuild the index, when i do: -+php console.php --site=example.com index:rebuild+- i get {sign user="jonnybradley" datetime="2020-03-05T11:11:59+00:00"} {QUOTE()}Command not available at this stage. The database needs to be updated. Solved by: php console.php database:update{QUOTE} --- I think this commit was the source of the regression and i'm afraid i can't fix it {gitlab id="2ee93280"} {sign user="jonnybradley" datetime="2020-03-05T11:29:44+00:00"} |
tracker item |
|
console import:tracker ignores "Import updates" setting
When importing a CSV from command line: console.php tracker:import ''format_number'' ''file_name'' ... tabular format "import updates" checkbox has no effect. As far as I understand structure configuration is not being loaded in TrackerImportCommand.php I've added the following line and everything seems to work: {CODE(theme="default")}$schema = new \Tracker\Tabular\Schema($tracker); $schema->loadFormatDescriptor($info['format_descriptor']); $schema->loadFilterDescriptor($info['filter_descriptor']); // Added line $schema->loadConfig($info['config']); $schema->validate();{CODE} Please, let me know if there is a better way to solve this issue. Thanks, Javier.- |
tracker item |
|
In Tiki 18.x with PHP 7.2: Console ListExecute: PHP Deprecated idn_to_ascii(): INTL_IDNA_VARIANT_2003
Runing a command like this {CODE(colors="shell")} php console.php list:execute "Foo page" "Bar Action" {CODE} produced these report with warnings: {CODE()} PHP Stack trace: PHP 1. {main}() /var/www/tiki18farm/console.php:0 PHP 2. Tiki\Command\Application->run() /var/www/tiki18farm/console.php:80 PHP 3. Tiki\Command\Application->doRun() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Application.php:148 PHP 4. Tiki\Command\Application->doRunCommand() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Application.php:248 PHP 5. Tiki\Command\ListExecuteCommand->run() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Application.php:946 PHP 6. Tiki\Command\ListExecuteCommand->execute() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Command/Command.php:252 PHP 7. ParserLib->parse_data() /var/www/tiki18farm/lib/core/Tiki/Command/ListExecuteCommand.php:68 PHP 8. ParserLib->parse_first() /var/www/tiki18farm/lib/parser/parserlib.php:1667 PHP 9. ParserLib->plugin_execute() /var/www/tiki18farm/lib/parser/parserlib.php:439 PHP 10. wikiplugin_listexecute() /var/www/tiki18farm/lib/parser/parserlib.php:1031 PHP 11. Search_Action_Sequence->execute() /var/www/tiki18farm/lib/wiki-plugins/wikiplugin_listexecute.php:172 PHP 12. Search_Action_ActionStep->execute() /var/www/tiki18farm/lib/core/Search/Action/Sequence.php:56 PHP 13. Search_Action_TrackerItemModify->execute() /var/www/tiki18farm/lib/core/Search/Action/ActionStep.php:64 PHP 14. Search_Action_TrackerItemModify->executeOnItem() /var/www/tiki18farm/lib/core/Search/Action/TrackerItemModify.php:86 PHP 15. Services_Tracker_Utilities->updateItem() /var/www/tiki18farm/lib/core/Search/Action/TrackerItemModify.php:138 PHP 16. Services_Tracker_Utilities->replaceItem() /var/www/tiki18farm/lib/core/Services/Tracker/Utilities.php:24 PHP 17. TrackerLib->replace_item() /var/www/tiki18farm/lib/core/Services/Tracker/Utilities.php:98 PHP 18. Tiki_Event_Manager->trigger() /var/www/tiki18farm/lib/trackers/trackerlib.php:2116 PHP 19. Tiki_Event_Manager->internalTrigger() /var/www/tiki18farm/lib/core/Tiki/Event/Manager.php:66 PHP 20. Tiki_Event_Chain->__invoke() /var/www/tiki18farm/lib/core/Tiki/Event/Manager.php:82 PHP 21. Tiki_Event_Manager->internalTrigger() /var/www/tiki18farm/lib/core/Tiki/Event/Chain.php:21 PHP 22. Tiki_Event_Lib->__invoke() /var/www/tiki18farm/lib/core/Tiki/Event/Manager.php:82 PHP 23. TrackerLib->send_replace_item_notifications() /var/www/tiki18farm/lib/core/Tiki/Event/Lib.php:26 PHP 24. TikiMail->send() /var/www/tiki18farm/lib/trackers/trackerlib.php:5268 PHP 25. tiki_send_email() /var/www/tiki18farm/lib/webmail/tikimaillib.php:246 PHP 26. Zend\Mail\Transport\Sendmail->send() /var/www/tiki18farm/lib/mail/maillib.php:185 PHP 27. Zend\Mail\Transport\Sendmail->prepareHeaders() /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Transport/Sendmail.php:125 PHP 28. Zend\Mail\Headers->toString() /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Transport/Sendmail.php:237 PHP 29. Zend\Mail\Header\From->toString() /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Headers.php:426 PHP 30. Zend\Mail\Header\From->getFieldValue() /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Header/AbstractAddressList.php:191 PHP 31. Zend\Mail\Header\From->idnToAscii() /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Header/AbstractAddressList.php:132 PHP 32. idn_to_ascii() /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Header/AbstractAddressList.php:105 PHP Warning: Filter not found: boolean in /var/www/tiki18farm/lib/core/TikiFilter.php on line 125 PHP Stack trace: PHP 1. {main}() /var/www/tiki18farm/console.php:0 PHP 2. Tiki\Command\Application->run() /var/www/tiki18farm/console.php:80 PHP 3. Tiki\Command\Application->doRun() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Application.php:148 PHP 4. Tiki\Command\Application->doRunCommand() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Application.php:248 PHP 5. Tiki\Command\ListExecuteCommand->run() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Application.php:946 PHP 6. Tiki\Command\ListExecuteCommand->execute() /var/www/tiki18farm/vendor_bundled/vendor/symfony/console/Command/Command.php:252 PHP 7. ParserLib->parse_data() /var/www/tiki18farm/lib/core/Tiki/Command/ListExecuteCommand.php:68 PHP 8. ParserLib->parse_first() /var/www/tiki18farm/lib/parser/parserlib.php:1667 PHP 9. ParserLib->plugin_execute() /var/www/tiki18farm/lib/parser/parserlib.php:439 PHP 10. wikiplugin_listexecute() /var/www/tiki18farm/lib/parser/parserlib.php:1031 PHP 11. Search_Action_Sequence->execute() /var/www/tiki18farm/lib/wiki-plugins/wikiplugin_listexecute.php:172 PHP 12. Search_Action_ActionStep->execute() /var/www/tiki18farm/lib/core/Search/Action/Sequence.php:56 PHP 13. Search_Action_EmailAction->execute() /var/www/tiki18farm/lib/core/Search/Action/ActionStep.php:64 PHP 14. JitFilter_Element->boolean() /var/www/tiki18farm/lib/core/Search/Action/EmailAction.php:76 PHP 15. JitFilter_Element->__call() /var/www/tiki18farm/lib/core/Search/Action/EmailAction.php:76 PHP 16. JitFilter_Element->filter() /var/www/tiki18farm/lib/core/JitFilter/Element.php:60 PHP 17. TikiFilter::get() /var/www/tiki18farm/lib/core/JitFilter/Element.php:48 PHP 18. trigger_error() /var/www/tiki18farm/lib/core/TikiFilter.php:125 PHP Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /var/www/tiki18farm/vendor_bundled/vendor/zendframework/zend-mail/src/Header/AbstractAddressList.php on line 105 {CODE} |
tracker item |
|
Console task being able to execute listexecute actions
Actually to have the plugin listExecute action initiate by a cron job you have to use curl, send user (admin) credentials and use http(s) authentification which is not very safe. {CODE()}curl -u admin:adminpassword "http://yourtiki.com/YourActionPage" --form "list_action=ActionName" --form "objects~0=ALL" {CODE} It would be nice to to have a console task being able to execute listexecute actions on a particular page avoiding unsafe communications. |
tracker item |
|
Console, Index rebuild; The entire process fail if log command is used and there is an issue writing the log file
On a local setup and on Tiki25 I used hundreds of times the console with this command: {CODE()}php console.php i:r -p --log{CODE} Since a few days (I updated to the last bread) I have an error. I believe extra-checks have been added or something has changed in the console process (because my configuration didn't changed) and it is causing all the process to fail if the log file cannot be written: ^ php console.php i:r -p --log sh: tesseract: command not found [2023-04-30 02:19] Started rebuilding index... Logging to file(s): * ../tmp/Search_Indexer_mysql_xxxxx_tiki25_console.log Unified search -------------- Engine: MySQL, version 5.7.39 < 1 sec/< 1 sec [>---------------------------] -- Rebuilding...sh: tesseract: command not found 1 sec/1 sec [============================] -- Rebuilding preferences indexerror: The search index could not be rebuilt. __"../tmp/Search_Indexer_mysql_xxxx_tiki25_console.log" cannot be opened with mode "w"__ The search index could not be rebuilt. "../tmp/Search_Indexer_mysql_xxxx_tiki25_console.log" cannot be opened with mode "w" ^ I have re-re-run the setup.sh permissions setup. Removing the "--log" allow the index:rebuilt to complete. This is may be totally legit and true however, it should not stop the process. "index:rebuild" is critical today to keep freshness of data and correct Tiki behavior. I suggest a warning to be displayed, but the process to keep on. |
tracker item |
|
Console, List execute; Action working when done manually, rejected when using the CLI (die silently with tiki scheduler)
Sorry for the multi-drawer report. On a Tiki25 I have a "tracker_item_modify" action (see last point, can be debatted). ## Wiki Page vs CLI When applying manually the action on a __wiki page__ it work just fine. When I run the command through the __scheduler__, while verbose and logs says it was done, in reality the action is not applied. When I use the __CLI__ I have this error: {CODE()} php console.php list:execute "List executes control page" "Resave evaluations" Undefined property: Search_ResultSet::$errorInQuery on line 313 of /home/happyhome/public_html/lib/wiki-plugins/wikiplugin_list.php Action Resave evaluations executed on page List executes control page. error: Error executing action Resave evaluations on item 1677099144: tracker_item_modify action missing value, calc, add or remove parameter. {CODE} After fixing the issue (again see below) the __CLI__ is still reporting an error but the action is completed correctly. {CODE()} php console.php list:execute "List executes control page" "Resave evaluations" Undefined property: Search_ResultSet::$errorInQuery on line 313 of /home/happyhome/public_html/lib/wiki-plugins/wikiplugin_list.php Action Resave evaluations executed on page List executes control page. <feedback>feedback: Action Resave evaluations executed successfully on 1 item(s). </feedback> {CODE} ## Scheduler inaccurate report The scheduler report (run now) and logs make the admin believe all went right while the CLI shows errors. If an action is not completed the logs should show the output (from the console). ## Empty action to re-save item with item-list The targeted item has been created from list execute with a duplicate action and has 2 item-list. The item-list field are not populated after the action, and they need to be "manually" edited/save to get the other items values. To make it automatic, I added a list execute with an empty tracker_item_modify action set only to force a "manual" save of the item. {CODE()}{step action="tracker_item_modify" field="dailyevaluationDate"}{CODE} This work manually but failed when using the CLI I changed for {CODE()} {step action="tracker_item_modify" field="dailyevaluationDate" calc="(concat (add dailyevaluationDate 1))"}{CODE} This work (it change the date and time, but it is not critical in this case - all stays within the same day) |
tracker item |
|
Console, SCSS compile; the console should warn it can't complete a theme creation
On a fresh Tiki25 I tried to create a new theme. I create a new directory for the theme (happyhome) with, inside, only a scss folder. Then I ran : php console.php scss:compile happyhome The Console completed without warning or error. the theme was not created as there is no CSS folder in the happyhome theme directory. The console should create it and do the job. If this is not possible the console should warn it can't comply (can't find a css folder for the theme xxxx, do you need to create one (new theme) ?" |
tracker item |
|
Console, translation:getstrings argument basedir not working outside a Tiki (documentation missing ?)
In the console.php translation:getstrings it is possible to use the "basedir" argument to set the directory from where you want to get the string (or so it seems). However you can only use it inside a Tiki root directory or at least a directory that contain a /lang/yourtargetlanguage directory. (ie: lang/en/) See: lib/language/GetStrings.php Line 171 ~pp~if (! file_exists($this->baseDir . '/lang/' . $lang)) {~/pp~ Else it throw an error "Invalid language code." There should be a better documentation for this or a mechanism to ask if the user want to create the "missing" directory in the basedir. (use case: getting strings of smarty template in themes/templates or inside a specific theme: themes/Bernard/templates) |
tracker item |
|
Unclear documentation of console.php
I had to break in in my test installation of Tiki 21.4 (set a temp admin pw I did not write down in my keepass). For this scenario, there is a documentation available at https://doc.tiki.org/Lost-admin-password First, this document lacks the information, that console.php of a Tiki 21.4 needs to be run on at least PHP 7.1. That is not the default with every ISP, and it isn't with mine (Ionos/1&1, second largest hoster in Germany). If invoked as recommend this will yield: {CODE(Colors="Tiki")} <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <b>MYHOMEDIR/agim/tiki-21.4/console.php</b> on line <b>9</b><br /> {CODE} Workaround is easy, in my case, the invokation of PHP needs to be "php7.1" instead of "php". But that's dependant on a users's ISP. But I think you should state the PHP level necessary. But invoked as PHP 7.1, console.php still won't reset the admin pw, and only yields: {CODE(Colors="Tiki")} Only available through command-line. {CODE} This WAS run on a command line... Inspection of console.php shows an, IMHO, unreliable CLI detection mechanism. Line 21 reads: {CODE(Colors="Tiki")} if (http_response_code() !== false) { die('Only available through command-line.'); } {CODE} So http_response_code() is assumed to be false, if run on a command line. A quick test script: {CODE(Colors="Tiki")} <?php var_dump(http_response_code()); ?> {CODE} yields this: {CODE(Colors="Tiki")} int(200) {CODE} This is in line with the PHP documentation, which says on https://www.php.net/manual/de/function.http-response-code.php "If response_code is provided, then the previous status code will be returned. If response_code is not provided, then the current status code will be returned. Both of these values will default to a 200 status code if used in a web server environment. false will be returned if response_code is not provided and it is not invoked in a web server environment (such as from a CLI application). true will be returned if response_code is provided and it is not invoked in a web server environment (but only when no previous response status has been set). " As I started both scripts definitely on a command line (Linux bash window running commandline SSH!) either PHP's detection is disturbed by something, or it only tests for the ''presence'' of a web server. This environment of course contains a web server (every Tiki installation will have that), but no distinction as to that HOW php got started (invocation on CLI or invocation by Apache) is done, so it defaults to 200. So another, more reliable detection mechanism is needed here. Thanks |
tracker item |
|
Console command console.php file:check throws a notice about storage location
Tested in Tiki20x and Tiki21x. Using php console.php files:check throws a notice on wiki attachment: CODE()} == Wiki Attachments == Configured to stores files in Database Files in DB: 0 Files on Disk: 0 No Issues found PHP Notice: Undefined index: f_use_db in /var/www/virtual/elyseavenue-paris15.fr/html/lib/core/Tiki/Files/CheckAttachmentGallery.php on line 105 PHP Notice: Undefined index: f_use_dir in /var/www/virtual/elyseavenue-paris15.fr/html/lib/core/Tiki/Files/CheckAttachmentGallery.php on line 116 {CODE} I tested with Tiki19 I think (may be earlier) and it may be caused by PHP version change. |
tracker item |
|
Database update errors on new trunk
Errors on database update after a brand new trunk install Revision: 63992 {CODE()} Macintosh-2:trunk Bernard$ php console.php d:u Warning: Illegal string offset 'galleryId' in /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/schema/20101126_fgal_add_gallerie_user_tiki.php on line 30 Call Stack: 0.0015 247624 1. {main}() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:0 0.3273 23818600 2. Symfony\Component\Console\Application->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:80 0.3385 24111848 3. Symfony\Component\Console\Application->doRun() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:125 0.3388 24113152 4. Symfony\Component\Console\Application->doRunCommand() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:224 0.3389 24113752 5. Symfony\Component\Console\Command\Command->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:888 0.3399 24126888 6. Tiki\Command\UpdateCommand->execute() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Command/Command.php:264 0.3426 24127800 7. Installer->update() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/Tiki/Command/UpdateCommand.php:38 4.1942 24906584 8. Installer->installPatch() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:129 4.1947 24912832 9. upgrade_20101126_fgal_add_gallerie_user_tiki() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:174 Warning: Illegal string offset 'galleryId' in /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/schema/20101210_fgal_add_wiki_attachments_tiki.php on line 30 Call Stack: 0.0015 247624 1. {main}() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:0 0.3273 23818600 2. Symfony\Component\Console\Application->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:80 0.3385 24111848 3. Symfony\Component\Console\Application->doRun() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:125 0.3388 24113152 4. Symfony\Component\Console\Application->doRunCommand() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:224 0.3389 24113752 5. Symfony\Component\Console\Command\Command->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:888 0.3399 24126888 6. Tiki\Command\UpdateCommand->execute() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Command/Command.php:264 0.3426 24127800 7. Installer->update() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/Tiki/Command/UpdateCommand.php:38 4.3763 24925600 8. Installer->installPatch() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:129 4.3768 24931912 9. upgrade_20101210_fgal_add_wiki_attachments_tiki() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:174 Warning: PDOStatement::execute(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lang' in 'where clause' in /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Pdo.php on line 77 Call Stack: 0.0015 247624 1. {main}() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:0 0.3273 23818600 2. Symfony\Component\Console\Application->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:80 0.3385 24111848 3. Symfony\Component\Console\Application->doRun() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:125 0.3388 24113152 4. Symfony\Component\Console\Application->doRunCommand() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:224 0.3389 24113752 5. Symfony\Component\Console\Command\Command->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:888 0.3399 24126888 6. Tiki\Command\UpdateCommand->execute() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Command/Command.php:264 0.3426 24127800 7. Installer->update() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/Tiki/Command/UpdateCommand.php:38 5.1030 25058928 8. Installer->installPatch() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:129 5.1038 25087912 9. pre_20110727_tracker_multilingual_convert_tiki() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:180 5.1051 25094912 10. TikiDb_Table->deleteMultiple() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/schema/20110727_tracker_multilingual_convert_tiki.php:46 5.1051 25095488 11. TikiDb->queryException() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Table.php:109 5.1051 25095664 12. TikiDb_Pdo->query() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb.php:72 5.1051 25095664 13. TikiDb_Pdo->_query() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Pdo.php:118 5.1051 25097632 14. PDOStatement->execute() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Pdo.php:77 [TikiDb_Exception] Unknown column 'lang' in 'where clause' database:update [--auto-register] {CODE} I re ran it and it changed for {CODE()}Macintosh-2:trunk Bernard$ php console.php d:u Warning: PDOStatement::execute(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lang' in 'where clause' in /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Pdo.php on line 77 Call Stack: 0.0029 247624 1. {main}() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:0 0.3364 23818896 2. Symfony\Component\Console\Application->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/console.php:80 0.3489 24112240 3. Symfony\Component\Console\Application->doRun() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:125 0.3492 24113544 4. Symfony\Component\Console\Application->doRunCommand() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:224 0.3492 24114144 5. Symfony\Component\Console\Command\Command->run() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Application.php:888 0.3504 24127280 6. Tiki\Command\UpdateCommand->execute() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/vendor_bundled/vendor/symfony/console/Command/Command.php:264 0.3532 24128192 7. Installer->update() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/Tiki/Command/UpdateCommand.php:38 1.1695 24643456 8. Installer->installPatch() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:129 1.1703 24672440 9. pre_20110727_tracker_multilingual_convert_tiki() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/installlib.php:180 1.1719 24679376 10. TikiDb_Table->deleteMultiple() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/installer/schema/20110727_tracker_multilingual_convert_tiki.php:46 1.1720 24679952 11. TikiDb->queryException() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Table.php:109 1.1720 24680128 12. TikiDb_Pdo->query() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb.php:72 1.1720 24680128 13. TikiDb_Pdo->_query() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Pdo.php:118 1.1721 24682096 14. PDOStatement->execute() /Users/Bernard/Documents/Shocksite/www/htdocs/trunk/lib/core/TikiDb/Pdo.php:77 [TikiDb_Exception] Unknown column 'lang' in 'where clause' database:update [--auto-register] {CODE} |
tracker item |
|
Database, Console; Database update doesn't complete on a Debian11 server (Virtualmin)
On a Tiki25 freshly updated after "ec7baa4a7a5852584de95ed133ba3b2a078b3c81": https://gitlab.com/tikiwiki/tiki/-/commit/ec7baa4a7a5852584de95ed133ba3b2a078b3c81 I cannot complete anymore the console command -+database:u+- This is a Debian11 server (updated) using last Virtualmin version using: PHP 7.4.33 Database MariaDB 10.5.15-MariaDB-0+deb11u1 Tiki Version 25.1 I tested on my OSX local where the command completes: PHP 7.4.26 Database MySQL 5.7.34 Tiki Version 25.1 |
tracker item |
|
ElasticSearch, Indexing; The indexing should first check the search engine is running and throw an error if not
On a Tiki24 using ElasticSearch(7.x), using the console I recreate the index. It fails after several minutes with the following error: {CODE()} php console.php i:r -p [2023-04-04 08:39] Started rebuilding index... Unified search -------------- Engine: Elastic 1 min/1 min [====================>-------] -- Processing activity documentsA error was encountered while running a command Argument 1 passed to Search_Type_Json::__construct() must be of the type array, string given, called in /Users/bernardsfez/Documents/Shocksite/www/htdocs/wiki-to-yes.org_tiki24/lib/core/Search/Elastic/TypeFactory.php on line 81 on line 13 of /Users/xxx/xxx/xxx/www/htdocs/xxx_tiki24/lib/core/Search/Type/Json.php {CODE} ''The error may be or may be not related to the fact that EalsticSearch is not running... that's not the point of the ticket''. When I login as admin I can see that ElasticSearch is ''visibly'' not running. ? (this error too could be improved, connection is not "just" refused, Elasticsearch is not running at all) {CODE()} Search index failure Unable to connect to localhost:9200 . Error #0: stream_socket_client(): unable to connect to localhost:9200 (Connection refused) {CODE} After starting Elasticsearch service on the server everything is back to normal. Prior to indexing (or any operation that involve the search engine) there should be a check it is running and if not an appropriate message should be displayed. (with or without fallback set). |
tracker item |