$enable_pinterest = $this->params->get( 'enable_pinterest');
$enable_linkedin = $this->params->get( 'enable_linkedin');
$enable_gplus = $this->params->get( 'enable_gplus');
$enable_twitter = $this->params->get( 'enable_twitter');
$enable_comments = $this->params->get( 'enable_comments');
$view = JRequest::getCmd('view');
if (($enable_like==1)||($enable_comments==1)||($enable_linkedin==1)||($enable_gplus==1)||($enable_twitter==1)) {
$config = JFactory::getConfig();
$site_name = $config->get('config.sitename');
$description = $this->params->get('description');
$enable_admin = $this->params->get('enable_admin');
$this->InjectCode($article, $view);
}
}
public function onBeforeCompileHead(){
$this->InjectHeadCode();
}
private function InjectHeadCode(){
$document = JFactory::getDocument();
$enable_like = $this->params->get( 'enable_like');
}
// Convert to indexed array for unpacking.
$arguments = \array_values($arguments);
$result = $this->{$methodName}(...$arguments);
// Ignore null results
if ($result === null) {
return;
}
if ($event->isStopped())
{
return $event;
}
$listener($event);
}
}
return $event;
}
$event = new $className($eventName, $args);
} else {
throw new \InvalidArgumentException('The arguments must either be an event or an array');
}
$result = $dispatcher->dispatch($eventName, $event);
// @todo - There are still test cases where the result isn't defined, temporarily leave the isset check in place
return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result'];
}
}
$asset->onAttachCallback($this->_doc);
}
}
// Trigger the onBeforeCompileHead event
$app->triggerEvent('onBeforeCompileHead');
// Add Script Options as inline asset
$scriptOptions = $this->_doc->getScriptOptions();
if ($scriptOptions) {
$cbuffer[$hash] = $tmpdata;
$cache->store($cbuffer, 'cbuffer_' . $type);
} else {
$this->setBuffer($renderer->render($name, $attribs, null), $type, $name, $title);
}
return parent::$_buffer[$type][$name][$title];
}
$replace = [];
$with = [];
foreach ($this->_template_tags as $jdoc => $args) {
$replace[] = $jdoc;
$with[] = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
}
return str_replace($replace, $with, $this->_template);
}
}
if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null) {
$this->cspNonce = $params['csp_nonce'];
}
$data = $this->_renderTemplate();
parent::render($caching, $params);
return $data;
}
$this->debug = $params['debug'] ?? false;
$this->error = $this->_error;
$params['file'] = 'error.php';
return parent::render($cache, $params);
}
/**
* Render the backtrace
*
'template' => $template->template,
'directory' => JPATH_THEMES,
'debug' => JDEBUG,
'csp_nonce' => $app->get('csp_nonce'),
'templateInherits' => $template->parent,
'params' => $template->params,
]
);
}
}
// Reset the document object in the factory, this gives us a clean slate and lets everything render properly
Factory::$document = $renderer->getDocument();
Factory::getApplication()->loadDocument(Factory::$document);
$data = $renderer->render($error);
// If nothing was rendered, just use the message from the Exception
if (empty($data)) {
$data = $error->getMessage();
}
* @since 3.10.0
*/
public static function handleException(\Throwable $error)
{
static::logException($error);
static::render($error);
}
/**
* Render the error page based on an exception.
*
);
// Trigger the onError event.
$this->triggerEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Trigger the onBeforeRespond event.
$this->getDispatcher()->dispatch('onBeforeRespond');
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
$enable_pinterest = $this->params->get( 'enable_pinterest');
$enable_linkedin = $this->params->get( 'enable_linkedin');
$enable_gplus = $this->params->get( 'enable_gplus');
$enable_twitter = $this->params->get( 'enable_twitter');
$enable_comments = $this->params->get( 'enable_comments');
$view = JRequest::getCmd('view');
if (($enable_like==1)||($enable_comments==1)||($enable_linkedin==1)||($enable_gplus==1)||($enable_twitter==1)) {
$config = JFactory::getConfig();
$site_name = $config->get('config.sitename');
$description = $this->params->get('description');
$enable_admin = $this->params->get('enable_admin');
$this->InjectCode($article, $view);
}
}
public function onBeforeCompileHead(){
$this->InjectHeadCode();
}
private function InjectHeadCode(){
$document = JFactory::getDocument();
$enable_like = $this->params->get( 'enable_like');
}
// Convert to indexed array for unpacking.
$arguments = \array_values($arguments);
$result = $this->{$methodName}(...$arguments);
// Ignore null results
if ($result === null) {
return;
}
if ($event->isStopped())
{
return $event;
}
$listener($event);
}
}
return $event;
}
$event = new $className($eventName, $args);
} else {
throw new \InvalidArgumentException('The arguments must either be an event or an array');
}
$result = $dispatcher->dispatch($eventName, $event);
// @todo - There are still test cases where the result isn't defined, temporarily leave the isset check in place
return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result'];
}
}
$asset->onAttachCallback($this->_doc);
}
}
// Trigger the onBeforeCompileHead event
$app->triggerEvent('onBeforeCompileHead');
// Add Script Options as inline asset
$scriptOptions = $this->_doc->getScriptOptions();
if ($scriptOptions) {
$cbuffer[$hash] = $tmpdata;
$cache->store($cbuffer, 'cbuffer_' . $type);
} else {
$this->setBuffer($renderer->render($name, $attribs, null), $type, $name, $title);
}
return parent::$_buffer[$type][$name][$title];
}
$replace = [];
$with = [];
foreach ($this->_template_tags as $jdoc => $args) {
$replace[] = $jdoc;
$with[] = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
}
return str_replace($replace, $with, $this->_template);
}
}
if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null) {
$this->cspNonce = $params['csp_nonce'];
}
$data = $this->_renderTemplate();
parent::render($caching, $params);
return $data;
}
if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !Factory::getUser()->get('id')) {
$caching = true;
}
// Render the document.
$data = $this->document->render($caching, $this->docOptions);
// Set the application output data.
$this->setBody($data);
// Trigger the onAfterRender event.
$this->set('themeInherits', $template->parent);
break;
}
parent::render();
}
/**
* Route the application.
*
$this->doExecute();
// If we have an application document object, render it.
if ($this->document instanceof \Joomla\CMS\Document\Document) {
// Render the application output.
$this->render();
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler') {
$this->compress();
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
[2/2]
ClassNotFoundError
|
---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError: Attempted to load class "JRequest" from the global namespace. Did you forget a "use" statement? at /var/www/vhosts/synergy-associates.com/be/plugins/content/al_facebook_comments/al_facebook_comments.php:65 at plgContental_facebook_comments->InjectHeadCode() (/var/www/vhosts/synergy-associates.com/be/plugins/content/al_facebook_comments/al_facebook_comments.php:54) at plgContental_facebook_comments->onBeforeCompileHead() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Plugin/CMSPlugin.php:289) at Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}(object(Event)) (/var/www/vhosts/synergy-associates.com/be/libraries/vendor/joomla/event/src/Dispatcher.php:486) at Joomla\Event\Dispatcher->dispatch('onBeforeCompileHead', object(Event)) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/EventAware.php:111) at Joomla\CMS\Application\WebApplication->triggerEvent('onBeforeCompileHead') (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/Renderer/Html/MetasRenderer.php:61) at Joomla\CMS\Document\Renderer\Html\MetasRenderer->render(null, array(), null) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/HtmlDocument.php:565) at Joomla\CMS\Document\HtmlDocument->getBuffer('metas', null, array()) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/HtmlDocument.php:833) at Joomla\CMS\Document\HtmlDocument->_renderTemplate() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/HtmlDocument.php:637) at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'cassiopeia', 'directory' => '/var/www/vhosts/synergy-associates.com/be/templates', 'debug' => '0', 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/ErrorDocument.php:139) at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'cassiopeia', 'directory' => '/var/www/vhosts/synergy-associates.com/be/templates', 'debug' => '0', 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Error/Renderer/HtmlRenderer.php:78) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Error)) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Exception/ExceptionHandler.php:126) at Joomla\CMS\Exception\ExceptionHandler::render(object(Error)) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Exception/ExceptionHandler.php:72) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error)) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/CMSApplication.php:322) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/vhosts/synergy-associates.com/be/includes/app.php:61) at require_once('/var/www/vhosts/synergy-associates.com/be/includes/app.php') (/var/www/vhosts/synergy-associates.com/be/index.php:32) |
[1/2]
Error
|
---|
Error: Class 'JRequest' not found at /var/www/vhosts/synergy-associates.com/be/plugins/content/al_facebook_comments/al_facebook_comments.php:65 at plgContental_facebook_comments->InjectHeadCode() (/var/www/vhosts/synergy-associates.com/be/plugins/content/al_facebook_comments/al_facebook_comments.php:54) at plgContental_facebook_comments->onBeforeCompileHead() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Plugin/CMSPlugin.php:289) at Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}(object(Event)) (/var/www/vhosts/synergy-associates.com/be/libraries/vendor/joomla/event/src/Dispatcher.php:486) at Joomla\Event\Dispatcher->dispatch('onBeforeCompileHead', object(Event)) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/EventAware.php:111) at Joomla\CMS\Application\WebApplication->triggerEvent('onBeforeCompileHead') (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/Renderer/Html/MetasRenderer.php:61) at Joomla\CMS\Document\Renderer\Html\MetasRenderer->render(null, array(), null) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/HtmlDocument.php:565) at Joomla\CMS\Document\HtmlDocument->getBuffer('metas', null, array()) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/HtmlDocument.php:833) at Joomla\CMS\Document\HtmlDocument->_renderTemplate() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Document/HtmlDocument.php:637) at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'cassiopeia', 'file' => 'index.php', 'params' => object(Registry), 'csp_nonce' => null, 'templateInherits' => null, 'directory' => '/var/www/vhosts/synergy-associates.com/be/templates')) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/CMSApplication.php:1025) at Joomla\CMS\Application\CMSApplication->render() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/SiteApplication.php:724) at Joomla\CMS\Application\SiteApplication->render() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/CMSApplication.php:298) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/vhosts/synergy-associates.com/be/includes/app.php:61) at require_once('/var/www/vhosts/synergy-associates.com/be/includes/app.php') (/var/www/vhosts/synergy-associates.com/be/index.php:32) |