Serialization is not allowed

From Joomla! Documentation

This page contains changes which are not marked for translation.

When Smart Search is used and the Gather Statistics is enabled an error may appear with the text "Serialization of X is not allowed." where X can be different like Closure or PDO or something else.

Errors reported[edit]

The error has been reported in issue https://github.com/joomla/joomla-cms/issues/38370

Versions affected[edit]

General Information

This pertains only to Joomla! version(s): 4.2.0

What is the cause[edit]

The cause lies in the serialization of the data where the data contains classes that cannot be serialized.

How to fix[edit]

The workaround for now is to turn off Gather Statistics in Smart Search