No Code Attached Yet bug
avatar ceford
ceford
22 May 2024

Steps to reproduce the issue

Run this command from the cli directory

php joomla.php finder:index

Expected result

Works

Actual result

Fails:

Finder Indexer

Starting Indexer
Setting up Smart Search plugins
Setup 35 items in 0.015 seconds.

In HTMLHelper.php line 888:
Call to a member function getTimezone() on null

finder:index [--minproctime MINPROCTIME] [--pause PAUSE] [--divisor DIVISOR] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--live-site [LIVE-SITE]] [--] []

System information (as much as possible)

Apache 2.4, MySQL 8.0.33, PHP 8.3.1, Mac Ventura 13.6

Additional comments

avatar ceford ceford - open - 22 May 2024
avatar ceford ceford - change - 22 May 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 22 May 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 May 2024
avatar pabloarias
pabloarias - comment - 23 May 2024

Same here. I have a little bit more info using this command:

php -d memory_limit=512M joomla.php finder:index -vvv

Output:

In HTMLHelper.php line 888:

[Error]
Call to a member function getTimezone() on null

Exception trace:
at /var/www/html/libraries/src/HTML/HTMLHelper.php:888
Joomla\CMS\HTML\HTMLHelper::date() at /var/www/html/libraries/src/HTML/HTMLHelper.php:307
Joomla\CMS\HTML\HTMLHelper::call() at /var/www/html/libraries/src/HTML/HTMLHelper.php:195
Joomla\CMS\HTML\HTMLHelper::_() at /var/www/html/plugins/fields/calendar/tmpl/calendar.php:28
include() at /var/www/html/administrator/components/com_fields/src/Plugin/FieldsPlugin.php:224
Joomla\Component\Fields\Administrator\Plugin\FieldsPlugin->onCustomFieldsPrepareField() at /var/www/html/administrator/components/com_fields/src/Plugin/FieldsPlugin.php:93
Joomla\Component\Fields\Administrator\Plugin\FieldsPlugin->prepareField() at /var/www/html/libraries/vendor/joomla/event/src/Dispatcher.php:454
Joomla\Event\Dispatcher->dispatch() at /var/www/html/administrator/components/com_fields/src/Helper/FieldsHelper.php:223
Joomla\Component\Fields\Administrator\Helper\FieldsHelper::getFields() at /var/www/html/administrator/components/com_finder/src/Indexer/Helper.php:417
Joomla\Component\Finder\Administrator\Indexer\Helper::addCustomFields() at /var/www/html/plugins/finder/content/src/Extension/Content.php:366
Joomla\Plugin\Finder\Content\Extension\Content->index() at /var/www/html/administrator/components/com_finder/src/Indexer/Adapter.php:261
Joomla\Component\Finder\Administrator\Indexer\Adapter->onBuildIndex() at /var/www/html/libraries/vendor/joomla/event/src/Dispatcher.php:454
Joomla\Event\Dispatcher->dispatch() at /var/www/html/libraries/src/Application/EventAware.php:111
Joomla\CMS\Application\ConsoleApplication->triggerEvent() at /var/www/html/libraries/src/Console/FinderIndexCommand.php:400
Joomla\CMS\Console\FinderIndexCommand->index() at /var/www/html/libraries/src/Console/FinderIndexCommand.php:212
Joomla\CMS\Console\FinderIndexCommand->doExecute() at /var/www/html/libraries/vendor/joomla/console/src/Command/AbstractCommand.php:234
Joomla\Console\Command\AbstractCommand->execute() at /var/www/html/libraries/vendor/joomla/console/src/Application.php:1083
Joomla\Console\Application->runCommand() at /var/www/html/libraries/vendor/joomla/console/src/Application.php:374
Joomla\Console\Application->doExecute() at /var/www/html/libraries/src/Application/ConsoleApplication.php:205
Joomla\CMS\Application\ConsoleApplication->doExecute() at /var/www/html/libraries/vendor/joomla/console/src/Application.php:413
Joomla\Console\Application->execute() at /var/www/html/libraries/src/Application/ConsoleApplication.php:259
Joomla\CMS\Application\ConsoleApplication->execute() at /var/www/html/cli/joomla.php:77

System information: Using ddev with PHP 8.2.18.

avatar Quy Quy - change - 23 May 2024
Labels Added: bug
avatar Quy Quy - labeled - 23 May 2024
avatar Quy Quy - labeled - 23 May 2024
avatar Quy Quy - labeled - 23 May 2024
avatar HLeithner
HLeithner - comment - 24 May 2024

This is not new right?

avatar pabloarias
pabloarias - comment - 24 May 2024

I'm not sure.

avatar Hackwar Hackwar - change - 24 May 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-05-24 06:55:27
Closed_By Hackwar
avatar Hackwar Hackwar - close - 24 May 2024
avatar Hackwar
Hackwar - comment - 24 May 2024

I created a PR. Please test it: #43521 Closing this issue.

avatar Hackwar
Hackwar - comment - 24 May 2024

Regardless of the PR, I think I would advise against indexing calendar fields in smart search. Smart Search will not be able to convert into the right timezone.

Add a Comment

Login with GitHub to post a comment