No Code Attached Yet
avatar Gratia-Mira
Gratia-Mira
20 Mar 2024

Steps to reproduce the issue

Create a cron taks:
php -d memory_limit=512M httpdocs/cli/joomla.php finder:index

Expected result

Task is successfully completed

Actual result

Error message:

Symfony\Component\ErrorHandler\Error\UndefinedFunctionError {#164
  #message: "Attempted to call function "simplexml_load_file" from namespace "Joomla\CMS\Language"."
  #code: 0
  #file: ".httpdocs/libraries/src/Language/LanguageHelper.php"
  #line: 614
  trace: {
    .httpdocs/libraries/src/Language/LanguageHelper.php:614 {
      Joomla\CMS\Language\LanguageHelper::parseXMLLanguageFile($path)
      › // Try to load the file
      › $xml = simplexml_load_file($path);
      › 
    }
    .httpdocs/libraries/src/Language/LanguageHelper.php:516 { …}
    .httpdocs/libraries/src/Language/Language.php:203 { …}
    .httpdocs/libraries/src/Language/LanguageFactory.php:35 { …}
    .httpdocs/libraries/src/Language/CachingLanguageFactory.php:45 { …}
    .httpdocs/libraries/src/Service/Provider/Application.php:130 { …}
    .httpdocs/libraries/vendor/joomla/di/src/ContainerResource.php:176 { …}
    .httpdocs/libraries/vendor/joomla/di/src/Container.php:96 { …}
    .httpdocs/cli/joomla.php:75 { …}
  }
}

System information (as much as possible)

Joomla 4 and 5
Linux
Plesk

Additional comments

SimpleXML is enabled
https://joomla.stackexchange.com/questions/33733/cannot-set-up-cron-task-for-smart-search-in-joomla-4

avatar Gratia-Mira Gratia-Mira - open - 20 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Mar 2024
avatar Gratia-Mira Gratia-Mira - change - 20 Mar 2024
The description was changed
avatar Gratia-Mira Gratia-Mira - edited - 20 Mar 2024
avatar brianteeman
brianteeman - comment - 20 Mar 2024

The answers give in stackexchange seem correct. Ig you enter php -v at the command line what is the output

avatar Gratia-Mira
Gratia-Mira - comment - 20 Mar 2024

The answers give in stackexchange seem correct. Ig you enter php -v at the command line what is the output

The task "php -v memory_limit=512M httpdocs/cli/joomla.php finder:index" was successfully completed in 0 seconds. View details
PHP 8.2.0 (cli) (built: Dec 10 2022 10:52:42) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.0, Copyright (c) Zend Technologies

avatar Gratia-Mira
Gratia-Mira - comment - 21 Mar 2024

It is actually a precautionary measure taken by the provider.

Is there a way to call this task (url/administrator/index.php?option=com_finder&view=indexer&tmpl=component) via the Scheduled Tasks plugin?
A simple request (with token) doesn't seem to work either?

In other words, it would help me if you could tell me the function that triggers indexing.

avatar alikon alikon - close - 21 Mar 2024
avatar alikon
alikon - comment - 21 Mar 2024

It is actually a precautionary measure taken by the provider.

ask them to allow you to execute that cron task

not a core issue imho

avatar alikon alikon - change - 21 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-21 18:43:26
Closed_By alikon

Add a Comment

Login with GitHub to post a comment