//语言筛选
$headerText = $params->get('header_text');
$footerText = $params->get('footer_text');
$languageslist=array();
if(ModuleHelper::getModulein('eclanguages')){
$languageslist = EclanguagesHelper::getList($params);
if(count($languageslist)){
$menu = $app->getMenu();
$active = $menu->getActive();
$lang_code = Factory::getLanguage()->getTag();
unset($displayData);
} else {
extract($displayData);
}
include $path;
};
$loader($path, $this->getLayoutData());
}
}
}
include $path;
};
$loader($path, $this->getLayoutData());
}
}
$dispatcher = $app->bootModule($module->module, $app->getName())->getDispatcher($module, $app);
// Check if we have a dispatcher
if ($dispatcher) {
ob_start();
$dispatcher->dispatch();
$module->content = ob_get_clean();
}
// Add the flag that the module content has been rendered
$module->contentRendered = true;
// Get module parameters
$params = new Registry($module->params);
// Render the module content
static::renderRawModule($module, $params, $attribs);
// Return early if only the content is required
if (!empty($attribs['contentOnly'])) {
return $module->content;
}
$module->contentRendered = true;
return $module->content;
}
return ModuleHelper::renderModule($module, $attribs);
}
}
$user = Factory::getUser();
$frontediting = ($app->isClient('site') && $app->get('frontediting', 1) && !$user->guest);
$menusEditing = ($app->get('frontediting', 1) == 2) && $user->authorise('core.edit', 'com_menus');
foreach (ModuleHelper::getModules($position) as $mod) {
$moduleHtml = $renderer->render($mod, $params, $content);
if ($frontediting && trim($moduleHtml) != '' && $user->authorise('module.edit.frontend', 'com_modules.module.' . $mod->id)) {
$displayData = array('moduleHtml' => &$moduleHtml, 'module' => $mod, 'position' => $position, 'menusediting' => $menusEditing);
LayoutHelper::render('joomla.edit.frontediting_modules', $displayData);
}
$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';
$this->processParseRules($uri, self::PROCESS_AFTER);
// Check if all parts of the URL have been parsed.
// Otherwise we have an invalid URL
if (\strlen($uri->getPath()) > 0) {
throw new RouteNotFoundException(Text::_('JERROR_PAGE_NOT_FOUND'));
}
if ($setVars) {
$this->setVars($uri->getQuery(true));
// Get the full request URI.
$uri = clone Uri::getInstance();
// It is not possible to inject the SiteRouter as it requires a SiteApplication
// and we would end in an infinite loop
$result = $this->getContainer()->get(SiteRouter::class)->parse($uri, true);
$active = $this->getMenu()->getActive();
if (
$active !== null
// Mark afterInitialise in the profiler.
JDEBUG ? $this->profiler->mark('afterInitialise') : null;
// Route the application
$this->route();
// Mark afterRoute in the profiler.
JDEBUG ? $this->profiler->mark('afterRoute') : null;
if (!$this->isHandlingMultiFactorAuthentication()) {
$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]
UndefinedMethodError
|
---|
Symfony\Component\ErrorHandler\Error\UndefinedMethodError: Attempted to call an undefined method named "getModulein" of class "Joomla\CMS\Helper\ModuleHelper". Did you mean to call e.g. "getModule", "getModuleList" or "getModules"? at /data/user/htdocs/modules/mod_echeader/mod_echeader.php:159 at include() (/data/user/htdocs/libraries/src/Dispatcher/ModuleDispatcher.php:48) at Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher\{closure}(array('102'), null) (/data/user/htdocs/libraries/src/Dispatcher/ModuleDispatcher.php:51) at Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() (/data/user/htdocs/libraries/src/Helper/ModuleHelper.php:272) at Joomla\CMS\Helper\ModuleHelper::renderRawModule(object(stdClass), object(Registry), array('name' => 'header', 'style' => 'none')) (/data/user/htdocs/libraries/src/Helper/ModuleHelper.php:157) at Joomla\CMS\Helper\ModuleHelper::renderModule(object(stdClass), array('name' => 'header', 'style' => 'none')) (/data/user/htdocs/libraries/src/Document/Renderer/Html/ModuleRenderer.php:95) at Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render(object(stdClass), array('name' => 'header', 'style' => 'none'), null) (/data/user/htdocs/libraries/src/Document/Renderer/Html/ModulesRenderer.php:46) at Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render('header', array('name' => 'header', 'style' => 'none'), null) (/data/user/htdocs/libraries/src/Document/HtmlDocument.php:561) at Joomla\CMS\Document\HtmlDocument->getBuffer('modules', 'header', array('name' => 'header', 'style' => 'none')) (/data/user/htdocs/libraries/src/Document/HtmlDocument.php:843) at Joomla\CMS\Document\HtmlDocument->_renderTemplate() (/data/user/htdocs/libraries/src/Document/HtmlDocument.php:629) at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'default', 'directory' => '/data/user/htdocs/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/data/user/htdocs/libraries/src/Document/ErrorDocument.php:135) at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'default', 'directory' => '/data/user/htdocs/templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/data/user/htdocs/libraries/src/Error/Renderer/HtmlRenderer.php:74) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(RouteNotFoundException)) (/data/user/htdocs/libraries/src/Exception/ExceptionHandler.php:117) at Joomla\CMS\Exception\ExceptionHandler::render(object(RouteNotFoundException)) (/data/user/htdocs/libraries/src/Exception/ExceptionHandler.php:68) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(RouteNotFoundException)) (/data/user/htdocs/libraries/src/Application/CMSApplication.php:319) at Joomla\CMS\Application\CMSApplication->execute() (/data/user/htdocs/includes/app.php:61) at require_once('/data/user/htdocs/includes/app.php') (/data/user/htdocs/index.php:32) |
[1/2]
RouteNotFoundException
|
---|
Joomla\CMS\Router\Exception\RouteNotFoundException: 页面未找到 at /data/user/htdocs/libraries/src/Router/Router.php:149 at Joomla\CMS\Router\Router->parse(object(Uri), true) (/data/user/htdocs/libraries/src/Application/SiteApplication.php:732) at Joomla\CMS\Application\SiteApplication->route() (/data/user/htdocs/libraries/src/Application/SiteApplication.php:220) at Joomla\CMS\Application\SiteApplication->doExecute() (/data/user/htdocs/libraries/src/Application/CMSApplication.php:290) at Joomla\CMS\Application\CMSApplication->execute() (/data/user/htdocs/includes/app.php:61) at require_once('/data/user/htdocs/includes/app.php') (/data/user/htdocs/index.php:32) |