Due to (I guess) change in the calculation field, the if condition or the way the index is rebuilt a previous condition to perform a calculation stopped to work and interfere with the rebuild index operation.
(if timeworkDateIn (round (div (sub timeworkDateOut timeworkDateIn) 3600)1))
The "if" here was checking if there is a value in the field "timeworkDateIn" to avoid a different error (Divide by zero on "0") that was displayed to the visitor of the site. After I upgrade this Tiki20 to Tiki21 I got an error on rebuild index:
[root@server html]# php console.php i:r --log [04-03-2020 09:48] Started rebuilding index... logging to file: /tmp/Search_Indexer_mysql_tsaharoniki_tiki21_console.log Unified search engine: MySQL, version 10.1.44-MariaDB error: The search index could not be rebuilt. Variable not found "timeworkDateIn". .../... 2020-03-04T09:48:36+02:00 INFO (6): addDocument trackeritem 53 {"memoryUsage":"22.3 MiB"} (where it stopped)
I found a workaround see below, but we should have a way to keep it as is or to better verbose so the admin knows what to do.
Use instead isEmpty to test if a field as a value.
(if (IsEmpty timeworkDateIn) NA (round (div (sub timeworkDateOut timeworkDateIn) 3600)1))
I can rebuild the index, but the error is back and displayed.
Divide by zero on "0"
Note: (if (IsEmpty timeworkDateIn) NA exist) return the expected result so the condition is working.
It is unclear why I got the Divide by zero warning.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |