$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';
parent::__construct($subject, $config);
$this->app = JFactory::getApplication();
}
public function onContentBeforeDisplay($context, &$article, &$params, $page=0){
if($this->app->isAdmin())
{
return '';
}
$ignore_pagination = $this->params->get( 'ignore_pagination');
$view = JRequest::getCmd('view');
}
// 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'];
}
}
$item->event = new \stdClass();
$results = Factory::getApplication()->triggerEvent('onContentAfterTitle', ['com_content.article', &$item, &$item->params, $offset]);
$item->event->afterDisplayTitle = trim(implode("\n", $results));
$results = Factory::getApplication()->triggerEvent('onContentBeforeDisplay', ['com_content.article', &$item, &$item->params, $offset]);
$item->event->beforeDisplayContent = trim(implode("\n", $results));
$results = Factory::getApplication()->triggerEvent('onContentAfterDisplay', ['com_content.article', &$item, &$item->params, $offset]);
$item->event->afterDisplayContent = trim(implode("\n", $results));
$cache->get($view, 'display');
} catch (CacheExceptionInterface $exception) {
$view->display();
}
} else {
$view->display();
}
return $this;
}
$model->hit();
}
}
}
parent::display($cachable, $safeurlparams);
return $this;
}
}
}
// Record the actual task being fired
$this->doTask = $doTask;
return $this->$doTask();
}
/**
* Method to get a model object, loading it if required.
*
$config['name'] = strtolower($this->input->get('controller'));
}
// Execute the task for this component
$controller = $this->getController($controller, ucfirst($this->app->getName()), $config);
$controller->execute($task);
$controller->redirect();
}
/**
* Get a controller from the component
return;
}
}
parent::dispatch();
}
}
if (!static::isEnabled($option)) {
throw new MissingComponentException(Text::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'), 404);
}
ob_start();
$app->bootComponent($option)->getDispatcher($app)->dispatch();
$contents = ob_get_clean();
// Revert the scope
$app->scope = $scope;
$document->setGenerator('Joomla! - Open Source Content Management - Version ' . JVERSION);
} else {
$document->setGenerator('Joomla! - Open Source Content Management');
}
$contents = ComponentHelper::renderComponent($component);
$document->setBuffer($contents, 'component');
// Trigger the onAfterDispatch event.
PluginHelper::importPlugin('system');
$this->triggerEvent('onAfterDispatch');
*/
$this->checkUserRequireReset('com_users', 'profile', 'edit', 'com_users/profile.save,com_users/profile.apply,com_users/user.logout');
}
// Dispatch the application
$this->dispatch();
// Mark afterDispatch in the profiler.
JDEBUG ? $this->profiler->mark('afterDispatch') : null;
}
$this->sanityCheckSystemVariables();
$this->setupLogging();
$this->createExtensionNamespaceMap();
// Perform application routines.
$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();
// 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: Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin() at /var/www/vhosts/synergy-associates.com/be/plugins/content/al_facebook_comments/al_facebook_comments.php:29 at plgContental_facebook_comments->onContentBeforeDisplay('com_content.article', object(stdClass), object(Registry), null) (/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('onContentBeforeDisplay', object(Event)) (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/EventAware.php:111) at Joomla\CMS\Application\WebApplication->triggerEvent('onContentBeforeDisplay', array('com_content.article', object(stdClass), object(Registry), null)) (/var/www/vhosts/synergy-associates.com/be/components/com_content/src/View/Article/HtmlView.php:233) at Joomla\Component\Content\Site\View\Article\HtmlView->display() (/var/www/vhosts/synergy-associates.com/be/libraries/src/MVC/Controller/BaseController.php:660) at Joomla\CMS\MVC\Controller\BaseController->display(true, array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT')) (/var/www/vhosts/synergy-associates.com/be/components/com_content/src/Controller/DisplayController.php:121) at Joomla\Component\Content\Site\Controller\DisplayController->display() (/var/www/vhosts/synergy-associates.com/be/libraries/src/MVC/Controller/BaseController.php:693) at Joomla\CMS\MVC\Controller\BaseController->execute('display') (/var/www/vhosts/synergy-associates.com/be/libraries/src/Dispatcher/ComponentDispatcher.php:143) at Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() (/var/www/vhosts/synergy-associates.com/be/components/com_content/src/Dispatcher/Dispatcher.php:56) at Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Component/ComponentHelper.php:361) at Joomla\CMS\Component\ComponentHelper::renderComponent('com_content') (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/SiteApplication.php:208) at Joomla\CMS\Application\SiteApplication->dispatch() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/SiteApplication.php:249) at Joomla\CMS\Application\SiteApplication->doExecute() (/var/www/vhosts/synergy-associates.com/be/libraries/src/Application/CMSApplication.php:293) 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) |