Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Serialization of 'SimpleXMLElement' is not allowed
(1 viewing) (1) Guest

TOPIC: Serialization of 'SimpleXMLElement' is not allowed

Re: Serialization of 'SimpleXMLElement' is not allowed 6 years, 6 months ago #34320

Dear abo,

To fix this issue, please go to modules\mod_sj_contact_ajax\mod_sj_contact_ajax.php find code:

$layout = $params->get('layout', 'default');
$cacheid = md5(serialize(array($layout, $module->id)));
$cacheparams = new stdClass;
$cacheparams->cachemode = 'id';
$cacheparams->class = 'ContactAjax';
$cacheparams->method = 'getList';
$cacheparams->methodparams = $params;
$cacheparams->modeparams = $cacheid;
$list = JModuleHelper::moduleCache($module, $params, $cacheparams);

=> edit to:

$layout = $params->get('layout', 'default');
$list = ContactAjax::getList($params);

Thanks & regards!
The following user(s) said Thank You: palos

Re: Serialization of 'SimpleXMLElement' is not allowed 6 years, 4 months ago #34995

Hi.
I think a better way of fixing this issue is to modify /modules/mod_sj_contact_ajax/core/helper.php by adding unset($list->profile) just before return $list; statement in getList() method.

if (class_exists('ContactControllerContact') && $contact_id != '') {
$ctrl = new ContactControllerContact();
$model = $ctrl->getModel('contact');
$list = $model->getItem($contact_id);
unset($list->profile); <-----------------ADD THIS LINE
return $list;

} else {
return false;
}
$list->profile contains some SimpleXML objects that are not used in this module later but can not be serialized during cache operations.
The following user(s) said Thank You: anhqn, lediko

Re: Serialization of 'SimpleXMLElement' is not allowed 6 years, 4 months ago #35006

Dear newwebpr

Thanks for your solution.

thanks

Re: Serialization of 'SimpleXMLElement' is not allowed 6 years, 4 months ago #35049

that works good

Re: Serialization of 'SimpleXMLElement' is not allowed 6 years, 1 month ago #35689

for joomla 3.8.x
refer to:
/home/user/public_html/libraries/libraries/src/Cache/Controller/CallbackController.php
in line 188
replace
$this->cache->store(serialize($data), $id);
width
// $this->cache->store(serialize($data), $id);
or remove this line
The following user(s) said Thank You: anhqn

Re: Serialization of 'SimpleXMLElement' is not allowed 6 years, 1 month ago #35730

Dear Sir

We updated this issue in the latest version of the module

thanks
Time to create page: 0.27 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes