// We are work only in HTML, not JSON, RSS etc.
if (!($doc instanceof \Joomla\CMS\Document\HtmlDocument))
{
return;
}
$wt_custom_menu_item_banner = $app->getMenu()->getActive()->getParams()->get('wt_custom_menu_item_banner');
if (!$wt_custom_menu_item_banner)
{
return;
}
/**
foreach ($this->listeners[$event->getName()] as $listener) {
if ($event->isStopped()) {
return $event;
}
$listener($event);
}
}
return $event;
}
}
// Trigger the onBeforeCompileHead event
$app->getDispatcher()->dispatch(
'onBeforeCompileHead',
new BeforeCompileHeadEvent('onBeforeCompileHead', ['subject' => $app, 'document' => $this->_doc])
);
// Add Script Options as inline asset
$scriptOptions = $this->_doc->getScriptOptions();
$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,
]
);
}
}
'subject' => $app,
'document' => $renderer->getDocument(),
])
);
$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->dispatchEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Trigger the onBeforeRespond event.
$this->dispatchEvent(
'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';
$returning = new \stdClass();
$returning->locklooped = false;
$looptime = $locktime * 10;
$path = $this->_getFilePath($id, $group);
$_fileopen = @fopen($path, 'c+b');
if (!$_fileopen) {
$returning->locked = false;
return $returning;
$returning = new \stdClass();
$returning->locklooped = false;
$looptime = $locktime * 10;
$path = $this->_getFilePath($id, $group);
$_fileopen = @fopen($path, 'c+b');
if (!$_fileopen) {
$returning->locked = false;
return $returning;
* NOTE drivers with lock need also unlock or unlocking will fail because of false $id
*/
$handler = $this->_getStorage();
if ($this->_options['locking'] == true) {
$locked = $handler->lock($id, $group, $locktime);
if ($locked !== false) {
return $locked;
}
}
$data = $this->cache->get($id);
$locktest = (object) ['locked' => null, 'locklooped' => null];
if ($data === false) {
$locktest = $this->cache->lock($id);
// If locklooped is true try to get the cached data again; it could exist now.
if ($locktest->locked === true && $locktest->locklooped === true) {
$data = $this->cache->get($id);
}
public function getMediaVersion(): string
{
// Load the media version and cache it for future use
if (self::$mediaVersion === null) {
self::$mediaVersion = $this->getMediaVersionCache()
->get([$this, 'generateMediaVersion'], [], md5('_media_version' . $this->getLongVersion()));
}
return self::$mediaVersion;
}
'charset' => 'utf-8',
'lineend' => 'unix',
'tab' => "\t",
'language' => $lang->getTag(),
'direction' => $lang->isRtl() ? 'rtl' : 'ltr',
'mediaversion' => $version->getMediaVersion(),
];
return self::getContainer()->get(FactoryInterface::class)->createDocument($type, $attributes);
}
),
E_USER_DEPRECATED
);
if (!self::$document) {
self::$document = self::createDocument();
}
return self::$document;
}
{
// Only trigger in frontend
if (Factory::getApplication()->isClient('site'))
{
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa*/
$wa = Factory::getDocument()->getWebAssetManager();
$wa->getRegistry()->addRegistryFile('media/plg_system_wtlightbox2js/joomla.asset.json');
return true;
}
}
}
foreach ($this->listeners[$event->getName()] as $listener) {
if ($event->isStopped()) {
return $event;
}
$listener($event);
}
}
return $event;
}
$dispatcher = $this->getDispatcher();
} catch (\UnexpectedValueException $exception) {
return null;
}
return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this));
}
/**
* Method to run the application routines.
*
// Trigger the onAfterInitialise event.
PluginHelper::importPlugin('system', null, true, $this->getDispatcher());
$this->dispatchEvent(
'onAfterInitialise',
new AfterInitialiseEvent('onAfterInitialise', ['subject' => $this])
);
}
/**
* Checks if HTTPS is forced in the client configuration.
$options['language'] = 'en-GB';
}
}
// Finish initialisation
parent::initialiseApp($options);
}
/**
* Load the library language files for the application
*
* @since 3.2
*/
protected function doExecute()
{
// Initialise the application
$this->initialiseApp();
// Mark afterInitialise in the profiler.
JDEBUG ? $this->profiler->mark('afterInitialise') : null;
// Route the application
$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]
Error
|
---|
Error: Call to a member function getParams() on null at /var/www/siteuser/www/sinay-s.ru/plugins/system/wt_custom_menu_item_banner/src/Extension/Wt_custom_menu_item_banner.php:89 at Joomla\Plugin\System\Wt_custom_menu_item_banner\Extension\Wt_custom_menu_item_banner->onBeforeCompileHead() (/var/www/siteuser/www/sinay-s.ru/libraries/vendor/joomla/event/src/Dispatcher.php:454) at Joomla\Event\Dispatcher->dispatch() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Document/Renderer/Html/MetasRenderer.php:64) at Joomla\CMS\Document\Renderer\Html\MetasRenderer->render() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Document/HtmlDocument.php:575) at Joomla\CMS\Document\HtmlDocument->getBuffer() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Document/HtmlDocument.php:894) at Joomla\CMS\Document\HtmlDocument->_renderTemplate() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Document/HtmlDocument.php:647) at Joomla\CMS\Document\HtmlDocument->render() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Document/ErrorDocument.php:143) at Joomla\CMS\Document\ErrorDocument->render() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Error/Renderer/HtmlRenderer.php:78) at Joomla\CMS\Error\Renderer\HtmlRenderer->render() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Exception/ExceptionHandler.php:136) at Joomla\CMS\Exception\ExceptionHandler::render() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Exception/ExceptionHandler.php:73) at Joomla\CMS\Exception\ExceptionHandler::handleException() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Application/CMSApplication.php:336) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/siteuser/www/sinay-s.ru/includes/app.php:58) at require_once('/var/www/siteuser/www/sinay-s.ru/includes/app.php') (/var/www/siteuser/www/sinay-s.ru/index.php:32) |
[1/2]
ValueError
|
---|
ValueError: Path cannot be empty at /var/www/siteuser/www/sinay-s.ru/libraries/src/Cache/Storage/FileStorage.php:327 at fopen() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Cache/Storage/FileStorage.php:327) at Joomla\CMS\Cache\Storage\FileStorage->lock() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Cache/Cache.php:384) at Joomla\CMS\Cache\Cache->lock() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Cache/Controller/CallbackController.php:64) at Joomla\CMS\Cache\Controller\CallbackController->get() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Version.php:260) at Joomla\CMS\Version->getMediaVersion() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Factory.php:786) at Joomla\CMS\Factory::createDocument() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Factory.php:338) at Joomla\CMS\Factory::getDocument() (/var/www/siteuser/www/sinay-s.ru/plugins/system/wtlightbox2js/src/Extension/Wtlightbox2js.php:65) at Joomla\Plugin\System\Wtlightbox2js\Extension\Wtlightbox2js->addFabricjsPreset() (/var/www/siteuser/www/sinay-s.ru/libraries/vendor/joomla/event/src/Dispatcher.php:454) at Joomla\Event\Dispatcher->dispatch() (/var/www/siteuser/www/sinay-s.ru/libraries/vendor/joomla/application/src/AbstractApplication.php:99) at Joomla\Application\AbstractApplication->dispatchEvent() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Application/CMSApplication.php:768) at Joomla\CMS\Application\CMSApplication->initialiseApp() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Application/SiteApplication.php:643) at Joomla\CMS\Application\SiteApplication->initialiseApp() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Application/SiteApplication.php:238) at Joomla\CMS\Application\SiteApplication->doExecute() (/var/www/siteuser/www/sinay-s.ru/libraries/src/Application/CMSApplication.php:306) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/siteuser/www/sinay-s.ru/includes/app.php:58) at require_once('/var/www/siteuser/www/sinay-s.ru/includes/app.php') (/var/www/siteuser/www/sinay-s.ru/index.php:32) |