Exception TypeError

HTTP 500 Whoops, looks like something went wrong.

json_decode(): Argument #1 ($json) must be of type string, stdClass given

Exceptions 2

TypeError

  1.         <?php endif; ?>
  2.         <link href="<?php echo $theme_url '/css/font-awesome.min.css'?>" rel="stylesheet">
  3.         <link href="<?php echo $theme_url '/css/template.css'?>" rel="stylesheet">
  4.         <?php $preset = (isset(json_decode($params->get('preset', (object) ['preset' => 'preset1']))->preset) && json_decode($params->get('preset'))->preset) ? json_decode($params->get('preset'))->preset 'preset1'?>
  5.         <link href="<?php echo $theme_url '/css/presets/' $preset '.css'?>" rel="stylesheet">
  6.         
  7.     </head>
  8.     <body>
  9.         <div class="container">
json_decode(object(stdClass)) in /var/www/web1261/html/templates/finion/error.php (line 50)
  1.         <?php endif; ?>
  2.         <link href="<?php echo $theme_url '/css/font-awesome.min.css'?>" rel="stylesheet">
  3.         <link href="<?php echo $theme_url '/css/template.css'?>" rel="stylesheet">
  4.         <?php $preset = (isset(json_decode($params->get('preset', (object) ['preset' => 'preset1']))->preset) && json_decode($params->get('preset'))->preset) ? json_decode($params->get('preset'))->preset 'preset1'?>
  5.         <link href="<?php echo $theme_url '/css/presets/' $preset '.css'?>" rel="stylesheet">
  6.         
  7.     </head>
  8.     <body>
  9.         <div class="container">
require('/var/www/web1261/html/templates/finion/error.php') in /var/www/web1261/html/libraries/src/Document/HtmlDocument.php (line 741)
  1.             // Store the file path
  2.             $this->_file $directory '/' $filename;
  3.             // Get the file content
  4.             ob_start();
  5.             require $directory '/' $filename;
  6.             $contents ob_get_contents();
  7.             ob_end_clean();
  8.         }
  9.         return $contents;
HtmlDocument->_loadTemplate('/var/www/web1261/html/templates/finion', 'error.php') in /var/www/web1261/html/libraries/src/Document/HtmlDocument.php (line 796)
  1.         $this->baseurl  Uri::base(true);
  2.         $this->params   $params['params'] ?? new Registry();
  3.         $this->template $template;
  4.         // Load
  5.         $this->_template $this->_loadTemplate($baseDir$file);
  6.         return $this;
  7.     }
  8.     /**
HtmlDocument->_fetchTemplate(array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /var/www/web1261/html/libraries/src/Document/HtmlDocument.php (line 613)
  1.      *
  2.      * @since   1.7.0
  3.      */
  4.     public function parse($params = [])
  5.     {
  6.         return $this->_fetchTemplate($params)->_parseTemplate();
  7.     }
  8.     /**
  9.      * Outputs the template to the browser.
  10.      *
HtmlDocument->parse(array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /var/www/web1261/html/libraries/src/Document/HtmlDocument.php (line 631)
  1.     public function render($caching false$params = [])
  2.     {
  3.         $this->_caching $caching;
  4.         if (empty($this->_template)) {
  5.             $this->parse($params);
  6.         }
  7.         if (\array_key_exists('csp_nonce'$params) && $params['csp_nonce'] !== null) {
  8.             $this->cspNonce $params['csp_nonce'];
  9.         }
HtmlDocument->render(false, array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /var/www/web1261/html/libraries/src/Document/ErrorDocument.php (line 139)
  1.         $this->debug $params['debug'] ?? false;
  2.         $this->error $this->_error;
  3.         $params['file'] = 'error.php';
  4.         return parent::render($cache$params);
  5.     }
  6.     /**
  7.      * Render the backtrace
  8.      *
ErrorDocument->render(false, array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /var/www/web1261/html/libraries/src/Error/Renderer/HtmlRenderer.php (line 70)
  1.             ob_end_clean();
  2.         }
  3.         $this->getDocument()->setTitle(Text::_('Error') . ': ' $error->getCode());
  4.         return $this->getDocument()->render(
  5.             false,
  6.             [
  7.                 'template'         => $template->template,
  8.                 'directory'        => JPATH_THEMES,
  9.                 'debug'            => JDEBUG,
HtmlRenderer->render(object(Exception)) in /var/www/web1261/html/libraries/src/Exception/ExceptionHandler.php (line 121)
  1.             // Reset the document object in the factory, this gives us a clean slate and lets everything render properly
  2.             Factory::$document $renderer->getDocument();
  3.             Factory::getApplication()->loadDocument(Factory::$document);
  4.             $data $renderer->render($error);
  5.             // If nothing was rendered, just use the message from the Exception
  6.             if (empty($data)) {
  7.                 $data $error->getMessage();
  8.             }
ExceptionHandler::render(object(Exception)) in /var/www/web1261/html/libraries/src/Exception/ExceptionHandler.php (line 72)
  1.      * @since   3.10.0
  2.      */
  3.     public static function handleException(\Throwable $error)
  4.     {
  5.         static::logException($error);
  6.         static::render($error);
  7.     }
  8.     /**
  9.      * Render the error page based on an exception.
  10.      *
ExceptionHandler::handleException(object(Exception)) in /var/www/web1261/html/libraries/src/Application/CMSApplication.php (line 322)
  1.             );
  2.             // Trigger the onError event.
  3.             $this->triggerEvent('onError'$event);
  4.             ExceptionHandler::handleException($event->getError());
  5.         }
  6.         // Trigger the onBeforeRespond event.
  7.         $this->getDispatcher()->dispatch('onBeforeRespond');
CMSApplication->execute() in /var/www/web1261/html/includes/app.php (line 61)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/var/www/web1261/html/includes/app.php') in /var/www/web1261/html/index.php (line 32)
  1.  * define() is used rather than "const" to not error for PHP 5.2 and lower
  2.  */
  3. define('_JEXEC'1);
  4. // Run the application - All executable code should be triggered through this file
  5. require_once dirname(__FILE__) . '/includes/app.php';

Exception

PAGE IS UNPUBLISHED, PLEASE PUBLISH TO PREVIEW

  1.         $this->item $this->get('Item');
  2.         // If a page is unpublished/trashed and a user tries to preview it. 
  3.         if (is_string($this->item))
  4.         {
  5.             throw new Exception($this->item404);
  6.         }
  7.         $this->item ApplicationHelper::preparePageData($this->item);
  8.         $this->canEdit $user->authorise('core.edit''com_sppagebuilder') ||
  1.         }
  2.         // Capture and echo output
  3.         ob_start();
  4.         ob_implicit_flush(false);
  5.         $view->$method();
  6.         $data ob_get_clean();
  7.         echo $data;
  8.         /*
  9.          * For a view we have a special case.  We need to cache not only the output from the view, but the state
ViewController->get(object(SppagebuilderViewPage), 'display') in /var/www/web1261/html/libraries/src/MVC/Controller/BaseController.php (line 640)
  1.             }
  2.             try {
  3.                 /** @var \Joomla\CMS\Cache\Controller\ViewController $cache */
  4.                 $cache Factory::getCache($option'view');
  5.                 $cache->get($view'display');
  6.             } catch (CacheExceptionInterface $exception) {
  7.                 $view->display();
  8.             }
  9.         } else {
  10.             $view->display();
BaseController->display(true, array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'return' => 'BASE64', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT')) in /var/www/web1261/html/components/com_sppagebuilder/controller.php (line 81)
  1.         {
  2.             $model $this->getModel($vName);
  3.             $model->hit();
  4.         }
  5.         parent::display($cachable$safeURLParams);
  6.     }
  7.     /**
  8.      * Export template layout.
  9.      *
SppagebuilderController->display() in /var/www/web1261/html/libraries/src/MVC/Controller/BaseController.php (line 678)
  1.         }
  2.         // Record the actual task being fired
  3.         $this->doTask $doTask;
  4.         return $this->$doTask();
  5.     }
  6.     /**
  7.      * Method to get a model object, loading it if required.
  8.      *
  1. BuilderAutoload::loadClasses();
  2. BuilderAutoload::loadHelperClasses();
  3. BuilderAutoload::loadGlobalAssets();
  4. $controller BaseController::getInstance('Sppagebuilder');
  5. $controller->execute(Factory::getApplication()->input->get('task'));
  6. $controller->redirect();
require_once('/var/www/web1261/html/components/com_sppagebuilder/sppagebuilder.php') in /var/www/web1261/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php (line 71)
  1.         // Load common and local language files.
  2.         $lang->load($this->app->scopeJPATH_BASE) || $lang->load($this->app->scopeJPATH_COMPONENT);
  3.         // Execute the component
  4.         $loader = static function ($path) {
  5.             require_once $path;
  6.         };
  7.         $loader($path);
  8.     }
  9. }
LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/var/www/web1261/html/components/com_sppagebuilder/sppagebuilder.php') in /var/www/web1261/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php (line 73)
  1.         // Execute the component
  2.         $loader = static function ($path) {
  3.             require_once $path;
  4.         };
  5.         $loader($path);
  6.     }
  7. }
LegacyComponentDispatcher->dispatch() in /var/www/web1261/html/libraries/src/Component/ComponentHelper.php (line 361)
  1.         if (!static::isEnabled($option)) {
  2.             throw new MissingComponentException(Text::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'), 404);
  3.         }
  4.         ob_start();
  5.         $app->bootComponent($option)->getDispatcher($app)->dispatch();
  6.         $contents ob_get_clean();
  7.         // Revert the scope
  8.         $app->scope $scope;
ComponentHelper::renderComponent('com_sppagebuilder') in /var/www/web1261/html/libraries/src/Application/SiteApplication.php (line 208)
  1.             $document->setGenerator('Joomla! - Open Source Content Management - Version ' JVERSION);
  2.         } else {
  3.             $document->setGenerator('Joomla! - Open Source Content Management');
  4.         }
  5.         $contents ComponentHelper::renderComponent($component);
  6.         $document->setBuffer($contents'component');
  7.         // Trigger the onAfterDispatch event.
  8.         PluginHelper::importPlugin('system');
  9.         $this->triggerEvent('onAfterDispatch');
  1.              */
  2.             $this->checkUserRequireReset('com_users''profile''edit''com_users/profile.save,com_users/profile.apply,com_users/user.logout');
  3.         }
  4.         // Dispatch the application
  5.         $this->dispatch();
  6.         // Mark afterDispatch in the profiler.
  7.         JDEBUG $this->profiler->mark('afterDispatch') : null;
  8.     }
  1.             $this->sanityCheckSystemVariables();
  2.             $this->setupLogging();
  3.             $this->createExtensionNamespaceMap();
  4.             // Perform application routines.
  5.             $this->doExecute();
  6.             // If we have an application document object, render it.
  7.             if ($this->document instanceof \Joomla\CMS\Document\Document) {
  8.                 // Render the application output.
  9.                 $this->render();
CMSApplication->execute() in /var/www/web1261/html/includes/app.php (line 61)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/var/www/web1261/html/includes/app.php') in /var/www/web1261/html/index.php (line 32)
  1.  * define() is used rather than "const" to not error for PHP 5.2 and lower
  2.  */
  3. define('_JEXEC'1);
  4. // Run the application - All executable code should be triggered through this file
  5. require_once dirname(__FILE__) . '/includes/app.php';

Stack Traces 2

[2/2] TypeError
TypeError:
json_decode(): Argument #1 ($json) must be of type string, stdClass given

  at /var/www/web1261/html/templates/finion/error.php:50
  at json_decode(object(stdClass))
     (/var/www/web1261/html/templates/finion/error.php:50)
  at require('/var/www/web1261/html/templates/finion/error.php')
     (/var/www/web1261/html/libraries/src/Document/HtmlDocument.php:741)
  at Joomla\CMS\Document\HtmlDocument->_loadTemplate('/var/www/web1261/html/templates/finion', 'error.php')
     (/var/www/web1261/html/libraries/src/Document/HtmlDocument.php:796)
  at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
     (/var/www/web1261/html/libraries/src/Document/HtmlDocument.php:613)
  at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
     (/var/www/web1261/html/libraries/src/Document/HtmlDocument.php:631)
  at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
     (/var/www/web1261/html/libraries/src/Document/ErrorDocument.php:139)
  at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'finion', 'directory' => '/var/www/web1261/html/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
     (/var/www/web1261/html/libraries/src/Error/Renderer/HtmlRenderer.php:70)
  at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Exception))
     (/var/www/web1261/html/libraries/src/Exception/ExceptionHandler.php:121)
  at Joomla\CMS\Exception\ExceptionHandler::render(object(Exception))
     (/var/www/web1261/html/libraries/src/Exception/ExceptionHandler.php:72)
  at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Exception))
     (/var/www/web1261/html/libraries/src/Application/CMSApplication.php:322)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/var/www/web1261/html/includes/app.php:61)
  at require_once('/var/www/web1261/html/includes/app.php')
     (/var/www/web1261/html/index.php:32)                
[1/2] Exception
Exception:
PAGE IS UNPUBLISHED, PLEASE PUBLISH TO PREVIEW

  at /var/www/web1261/html/components/com_sppagebuilder/views/page/view.html.php:35
  at SppagebuilderViewPage->display()
     (/var/www/web1261/html/libraries/src/Cache/Controller/ViewController.php:95)
  at Joomla\CMS\Cache\Controller\ViewController->get(object(SppagebuilderViewPage), 'display')
     (/var/www/web1261/html/libraries/src/MVC/Controller/BaseController.php:640)
  at Joomla\CMS\MVC\Controller\BaseController->display(true, array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'return' => 'BASE64', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT'))
     (/var/www/web1261/html/components/com_sppagebuilder/controller.php:81)
  at SppagebuilderController->display()
     (/var/www/web1261/html/libraries/src/MVC/Controller/BaseController.php:678)
  at Joomla\CMS\MVC\Controller\BaseController->execute('')
     (/var/www/web1261/html/components/com_sppagebuilder/sppagebuilder.php:24)
  at require_once('/var/www/web1261/html/components/com_sppagebuilder/sppagebuilder.php')
     (/var/www/web1261/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71)
  at Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/var/www/web1261/html/components/com_sppagebuilder/sppagebuilder.php')
     (/var/www/web1261/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73)
  at Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
     (/var/www/web1261/html/libraries/src/Component/ComponentHelper.php:361)
  at Joomla\CMS\Component\ComponentHelper::renderComponent('com_sppagebuilder')
     (/var/www/web1261/html/libraries/src/Application/SiteApplication.php:208)
  at Joomla\CMS\Application\SiteApplication->dispatch()
     (/var/www/web1261/html/libraries/src/Application/SiteApplication.php:249)
  at Joomla\CMS\Application\SiteApplication->doExecute()
     (/var/www/web1261/html/libraries/src/Application/CMSApplication.php:293)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/var/www/web1261/html/includes/app.php:61)
  at require_once('/var/www/web1261/html/includes/app.php')
     (/var/www/web1261/html/index.php:32)