Hi,
HikaShop doesn't store the cart in the user session. It never did and it still doesn't in the latest version.
How did you find that this error would be caused by this ?
From the debug data you provided it's hard to say anything. It could come from any extension on your website.
The fact that no one else had the issue after 2 weeks HikaShop 6.3.0 has been released would indicate that the problem is not in the core of HikaShop.
The fact that not publishing the cart module on the pages make the pages work seems to point at something linked to HikaShop but it's hard to say more.
We'll need more debug to understand the problem.
Edit the file libraries/src/Session/Storage/JoomlaStorage.php via FTP.
There, replace the code
public function close(): void
{
// Before storing data to the session, we serialize and encode the Registry
$_SESSION['joomla'] = base64_encode(serialize($this->data));
parent::close();
}by:
public function close(): void
{
try {
$_SESSION['joomla'] = base64_encode(serialize($this->data));
} catch (\Throwable $e) {
$dataArray = (array) $this->data->toObject();
$results = [];
$this->findUnserializable($dataArray, '', $results);
file_put_contents(
JPATH_ROOT . '/tmp/session_debug.log',
date('Y-m-d H:i:s') . ' - ' . $e->getMessage() . "\n" .
implode("\n", $results) . "\n\n",
FILE_APPEND
);
$_SESSION['joomla'] = '';
}
parent::close();
}
private function findUnserializable($data, $path, &$results)
{
if ($data instanceof \SimpleXMLElement) {
$results[] = $path . ' => SimpleXMLElement: ' . $data->asXML();
return;
}
if (is_object($data)) {
try { serialize($data); return; } catch (\Throwable $e) {}
foreach (get_object_vars($data) as $k => $v) {
$this->findUnserializable($v, $path . '->' . $k, $results);
}
} elseif (is_array($data)) {
foreach ($data as $k => $v) {
$this->findUnserializable($v, $path . '[' . $k . ']', $results);
}
}
}Then, display a page with the issue and check the file tmp/session_debug.log
It should provide helpful information on what's going on.
Please share the content of that file. You can then revert the change in libraries/src/Session/Storage/JoomlaStorage.php