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

i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed

i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed 6 years, 7 months ago #34293

Hello;
after update site to joomla 3.8.0 i have an error
JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed
If difficulties persist, please contact the System Administrator of this site and report the error below.: Serialization of 'SimpleXMLElement' is not allowed

Please try one of the following pages:

PHP Version 5.6.30
Joomla! Version Joomla! 3.8.0 Stable
Web Server Apache/2

please help me
thanks

Re: i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed 6 years, 7 months ago #34299

Dear ahmad19

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);

or

or

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

thanks

Re: i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed 6 years, 7 months ago #34311

<?php
/**
* @package SJ Contact Ajax
* @version 1.0.1
* @license www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @copyright (c) 2013 YouTech Company. All Rights Reserved.
* @author YouTech Company www.smartaddons.com
*
*/
defined('_JEXEC') or die;
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}

require_once dirname(__FILE__) . '/core/helper.php';
$file = 'www.google.com/recaptcha/api.js?onload=JoomlaInitReCaptcha2&render=explicit&hl=' . JFactory::getLanguage()->getTag();
JHtml::_('script', $file);
JHtml::_('script', 'plg_captcha_recaptcha/recaptcha.min.js', false, true);

if (!class_exists('plgSystemPlg_Sj_Contact_Ajax')) {
echo JText::_('WARNING_NOT_INSTALL_PLUGIN');
return;
}

$layout = $params->get('layout', 'default');
$list = ContactAjax::getList($params);
$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);

$captcha_type = $params->get('captcha_type');
$captcha_dis = $params->get('captcha_dis');
$captcha_disable = $params->get('captcha_disable');

if ($captcha_dis == 1) {
if ($captcha_type == 0) {
$captcha_plg = JPluginHelper::importPlugin('captcha');
if ($captcha_plg == null) {
echo JText::_('WARNING_NOT_INSTALL_PLUGIN_RECAPTCHA');
return;
}
}
}

$user = JFactory::getUser();
$currentSession = JFactory::getSession();
if ($list != false) {
$is_ajax = !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
if ($is_ajax) {
$ctajax_modid = JRequest::getVar('ctajax_modid', null);
if ($ctajax_modid == $module->id) {
if (isset($_POST['task'])) {
if ($_POST['task'] == 'checkcaptcha') {
$ss_c = $currentSession->get('codeCaptcha' . $module->id);
$result = new stdClass();
if ($_POST['captcha'] != $ss_c) {
$result->valid = false;
} else {
$result->valid = true;
}
echo json_encode($result);
die();
}
if ($_POST['task'] == 'sendmail') {
$mail_to = $list->email_to;
if ($captcha_dis == 1) {
if ($captcha_disable == 1 && $user->id != 0) {
} else {
if ($captcha_type == 0) {
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
if(isset($_POST['recaptcha_challenge'])){
JRequest::setVar('recaptcha_challenge_field', $_POST['recaptcha_challenge']);
}
if(isset($_POST['recaptcha_response'])){
JRequest::setVar('recaptcha_response_field', $_POST['recaptcha_response']);
$res = $dispatcher->trigger('onCheckAnswer', $_POST['recaptcha_response']);
}
if(isset($_POST['captchaResponse'])){
JRequest::setVar('g-recaptcha-response', $_POST['captchaResponse']);
$res = $dispatcher->trigger('onCheckAnswer', $_POST['captchaResponse']);
}

$result = new stdClass();
if (!$res[0]) {
$result->error_captcha = 0;
echo json_encode($result);
}
}
ContactAjax::_processSendMail($mail_to);
}
}else{
ContactAjax::_processSendMail($mail_to);
}
}
}
}
} else {
require JModuleHelper::getLayoutPath($module->module, $layout);
require JModuleHelper::getLayoutPath($module->module, $layout . '_js');
}
} else {
echo JText::_('WARNING_MASSAGE');
}

i edit this file but error is still
can you edit file ?

Re: i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed 6 years, 7 months ago #34319

Please use the code below in this file:

<?php
/**
* @package SJ Contact Ajax
* @version 1.0.1
* @license www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @copyright (c) 2013 YouTech Company. All Rights Reserved.
* @author YouTech Company www.smartaddons.com
*
*/
defined('_JEXEC') or die;
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}

require_once dirname(__FILE__) . '/core/helper.php';
$file = 'www.google.com/recaptcha/api.js?onload=JoomlaInitReCaptcha2&render=explicit&hl=' . JFactory::getLanguage()->getTag();
JHtml::_('script', $file);
JHtml::_('script', 'plg_captcha_recaptcha/recaptcha.min.js', false, true);

if (!class_exists('plgSystemPlg_Sj_Contact_Ajax')) {
echo JText::_('WARNING_NOT_INSTALL_PLUGIN');
return;
}

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

$captcha_type = $params->get('captcha_type');
$captcha_dis = $params->get('captcha_dis');
$captcha_disable = $params->get('captcha_disable');

if ($captcha_dis == 1) {
if ($captcha_type == 0) {
$captcha_plg = JPluginHelper::importPlugin('captcha');
if ($captcha_plg == null) {
echo JText::_('WARNING_NOT_INSTALL_PLUGIN_RECAPTCHA');
return;
}
}
}

$user = JFactory::getUser();
$currentSession = JFactory::getSession();
if ($list != false) {
$is_ajax = !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
if ($is_ajax) {
$ctajax_modid = JRequest::getVar('ctajax_modid', null);
if ($ctajax_modid == $module->id) {
if (isset($_POST['task'])) {
if ($_POST['task'] == 'checkcaptcha') {
$ss_c = $currentSession->get('codeCaptcha' . $module->id);
$result = new stdClass();
if ($_POST['captcha'] != $ss_c) {
$result->valid = false;
} else {
$result->valid = true;
}
echo json_encode($result);
die();
}
if ($_POST['task'] == 'sendmail') {
$mail_to = $list->email_to;
if ($captcha_dis == 1) {
if ($captcha_disable == 1 && $user->id != 0) {
} else {
if ($captcha_type == 0) {
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
if(isset($_POST['recaptcha_challenge'])){
JRequest::setVar('recaptcha_challenge_field', $_POST['recaptcha_challenge']);
}
if(isset($_POST['recaptcha_response'])){
JRequest::setVar('recaptcha_response_field', $_POST['recaptcha_response']);
$res = $dispatcher->trigger('onCheckAnswer', $_POST['recaptcha_response']);
}
if(isset($_POST['captchaResponse'])){
JRequest::setVar('g-recaptcha-response', $_POST['captchaResponse']);
$res = $dispatcher->trigger('onCheckAnswer', $_POST['captchaResponse']);
}

$result = new stdClass();
if (!$res[0]) {
$result->error_captcha = 0;
echo json_encode($result);
}
}
ContactAjax::_processSendMail($mail_to);
}
}else{
ContactAjax::_processSendMail($mail_to);
}
}
}
}
} else {
require JModuleHelper::getLayoutPath($module->module, $layout);
require JModuleHelper::getLayoutPath($module->module, $layout . '_js');
}
} else {
echo JText::_('WARNING_MASSAGE');
}

thanks

Re: i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed 6 years, 7 months ago #34326

thankyou
site is worked but not load style
i attache an screen of site
please help me

Re: i have an error JERROR_SORRY Serialization of 'SimpleXMLElement' is not allowed 6 years, 7 months ago #34330

Dear ahmad19

I checked your site are getting the style of our template. about main menu -> because your menu too long so it will down the line. please configure the menu item again.

thanks
  • Page:
  • 1
  • 2
Time to create page: 0.28 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