mysqli_sql_exception {#1143 #sqlstate: "42000" }
$this->connection = $connection; $this->query = $query; $query = $this->prepareParameterKeyMapping($query); $this->statement = $connection->prepare($query); if (!$this->statement) { throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno); } } $this->connection = $connection; $this->query = $query; $query = $this->prepareParameterKeyMapping($query); $this->statement = $connection->prepare($query); if (!$this->statement) { throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno); } }
}
protected function prepareStatement(string $query): StatementInterface
{
return new FMysqliStatement($this->connection, $query);
}
/*
* J4 numFields dosen't exit
$query->setLimit($limit, $offset); $sql = $this->replacePrefix((string) $query); $this->statement = $this->prepareStatement($sql); $this->sql = $query; $this->limit = (int) max(0, $limit); $this->offset = (int) max(0, $offset); ->where($db->quoteName('language_id').'='.$languages[$language]->lang_id)
->where($db->quoteName('published').'= 1')
->where($db->quoteName('reference_id').'IN ('.$ids.')')
->where($db->quoteName('reference_table').'= '.$db->quote($reference_table));
$db->setQuery($query);
$translations = $db->loadObjectList('', 'stdClass', false);
if (count($translations)>0){
$fieldmap = null;
foreach( array_keys( $rows) as $key ) {
$idlist[] = $content->$idkey;
}
}
if (strlen( $idstring)==0) continue;
Falang::translateListWithIDs( $rows, $idstring, $reftable, $language , $tableArray, $querySQL, $idkey);
}
}
}
/**
$current = $this->result[$this->key];
//get translated content for non default language
if ($this->current_language_tag != $this->default_language_tag){
//rows supposed to be an array
$rows = array(0 => $current);
\Falang::translateList($rows, $this->current_language_tag, $this->reftable);
}
$this->key = $this->key + 1;
return $current;
}
->order($this->db->quoteName('m.lft')); $items = []; $iterator = $this->db->setQuery($query)->getIterator(); foreach ($iterator as $item) { $items[$item->id] = new MenuItem((array) $item); } return $items; }; $referenceArgs = &$args; } // Just execute the callback if caching is disabled. if (empty($this->options['caching'])) { return \call_user_func_array($callback, $referenceArgs); } if (!$id) { // Generate an ID $id = $this->_makeId($callback, $args); try { /** @var CallbackController $cache */ $cache = $this->getCacheControllerFactory()->createCacheController('callback', ['defaultgroup' => 'com_menus']); $this->items = $cache->get($loader, [], md5(\get_class($this)), false); } catch (CacheExceptionInterface) { try { $this->items = $loader(); } catch (ExecutionFailureException $databaseException) { $this->app->enqueueMessage(Text::sprintf('JERROR_LOADING_MENUS', $databaseException->getMessage()), 'warning'); * @since 1.5 */ public function getMenu() { if (!$this->itemsLoaded) { $this->load(); foreach ($this->items as $item) { if ($item->home) { $this->default[trim($item->language)] = $item->id; } */ public function getItem($id) { $result = null; if (isset($this->getMenu()[$id])) { $result = &$this->getMenu()[$id]; } return $result; } // Get the id of the active menu item $menu = $this->getMenu(); $item = $menu->getActive(); if (!$item) { $item = $menu->getItem($this->input->getInt('Itemid', null)); } $id = 0; if (\is_object($item)) { public function render(\Throwable $error): string { $app = Factory::getApplication(); // Get the current template from the application $template = $app->getTemplate(true); // Push the error object into the document $this->getDocument()->setError($error); // Add registry file for the template asset '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(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php'; $this->connection = $connection; $this->query = $query; $query = $this->prepareParameterKeyMapping($query); $this->statement = $connection->prepare($query); if (!$this->statement) { throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno); } } $this->connection = $connection; $this->query = $query; $query = $this->prepareParameterKeyMapping($query); $this->statement = $connection->prepare($query); if (!$this->statement) { throw new PrepareStatementFailureException($this->connection->error, $this->connection->errno); } }
}
protected function prepareStatement(string $query): StatementInterface
{
return new FMysqliStatement($this->connection, $query);
}
/*
* J4 numFields dosen't exit
$query->setLimit($limit, $offset); $sql = $this->replacePrefix((string) $query); $this->statement = $this->prepareStatement($sql); $this->sql = $query; $this->limit = (int) max(0, $limit); $this->offset = (int) max(0, $offset); ->where($db->quoteName('language_id').'='.$languages[$language]->lang_id)
->where($db->quoteName('published').'= 1')
->where($db->quoteName('reference_id').'IN ('.$ids.')')
->where($db->quoteName('reference_table').'= '.$db->quote($reference_table));
$db->setQuery($query);
$translations = $db->loadObjectList('', 'stdClass', false);
if (count($translations)>0){
$fieldmap = null;
foreach( array_keys( $rows) as $key ) {
$idlist[] = $content->$idkey;
}
}
if (strlen( $idstring)==0) continue;
Falang::translateListWithIDs( $rows, $idstring, $reftable, $language , $tableArray, $querySQL, $idkey);
}
}
}
/**
$current = $this->result[$this->key];
//get translated content for non default language
if ($this->current_language_tag != $this->default_language_tag){
//rows supposed to be an array
$rows = array(0 => $current);
\Falang::translateList($rows, $this->current_language_tag, $this->reftable);
}
$this->key = $this->key + 1;
return $current;
}
->order($this->db->quoteName('m.lft')); $items = []; $iterator = $this->db->setQuery($query)->getIterator(); foreach ($iterator as $item) { $items[$item->id] = new MenuItem((array) $item); } return $items; }; $referenceArgs = &$args; } // Just execute the callback if caching is disabled. if (empty($this->options['caching'])) { return \call_user_func_array($callback, $referenceArgs); } if (!$id) { // Generate an ID $id = $this->_makeId($callback, $args); try { /** @var CallbackController $cache */ $cache = $this->getCacheControllerFactory()->createCacheController('callback', ['defaultgroup' => 'com_menus']); $this->items = $cache->get($loader, [], md5(\get_class($this)), false); } catch (CacheExceptionInterface) { try { $this->items = $loader(); } catch (ExecutionFailureException $databaseException) { $this->app->enqueueMessage(Text::sprintf('JERROR_LOADING_MENUS', $databaseException->getMessage()), 'warning'); * @since 1.5 */ public function getMenu() { if (!$this->itemsLoaded) { $this->load(); foreach ($this->items as $item) { if ($item->home) { $this->default[trim($item->language)] = $item->id; } }
Factory::getApplication()->getMenu()->__construct();
//translate path when subitem not translate
$app = Factory::getApplication();
$menu = $app->getMenu()->getMenu();
foreach($menu as &$item) {
$item->route = '';
if ($item->level > 1) {
if (array_key_exists($item->parent_id, $menu)) {
if (!\array_key_exists('parse' . $stage, $this->rules)) { throw new \InvalidArgumentException(\sprintf('The %s stage is not registered. (%s)', $stage, __METHOD__)); } foreach ($this->rules['parse' . $stage] as $rule) { $rule($this, $uri); } } /** * Process the build uri query data based on custom defined rules { // Reset the tainted flag $this->tainted = false; // Do the preprocess stage of the URL parse process $this->processParseRules($uri, self::PROCESS_BEFORE); // Do the main stage of the URL parse process $this->processParseRules($uri); // Do the postprocess stage of the URL parse process // 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(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
[2/2]
mysqli_sql_exception
|
|---|
mysqli_sql_exception:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `published`= 1 AND `reference_id`IN (156) AND `reference_table`= 'menu'' at line 3
at /home/wedero/2026.webdesignromania.eu/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138
at mysqli->prepare()
(/home/wedero/2026.webdesignromania.eu/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138)
at Joomla\Database\Mysqli\MysqliStatement->__construct()
(/home/wedero/2026.webdesignromania.eu/plugins/system/falangdriver/drivers/mysqlix.php:65)
at JOverrideDatabase->prepareStatement()
(/home/wedero/2026.webdesignromania.eu/libraries/vendor/joomla/database/src/DatabaseDriver.php:1780)
at Joomla\Database\DatabaseDriver->setQuery()
(/home/wedero/2026.webdesignromania.eu/components/com_falang/helpers/falang.class.php:237)
at Falang::translateListWithIDs()
(/home/wedero/2026.webdesignromania.eu/components/com_falang/helpers/falang.class.php:113)
at Falang::translateList()
(/home/wedero/2026.webdesignromania.eu/plugins/system/falangdriver/drivers/FDatabaseIterator.php:174)
at Falang\Database\FDatabaseIterator->current()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/SiteMenu.php:168)
at Joomla\CMS\Menu\SiteMenu->Joomla\CMS\Menu\{closure}()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Cache/Controller/CallbackController.php:51)
at Joomla\CMS\Cache\Controller\CallbackController->get()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/SiteMenu.php:179)
at Joomla\CMS\Menu\SiteMenu->load()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/AbstractMenu.php:333)
at Joomla\CMS\Menu\AbstractMenu->getMenu()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/AbstractMenu.php:164)
at Joomla\CMS\Menu\AbstractMenu->getItem()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Application/SiteApplication.php:429)
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/wedero/2026.webdesignromania.eu/includes/app.php:58)
at require_once('/home/wedero/2026.webdesignromania.eu/includes/app.php')
(/home/wedero/2026.webdesignromania.eu/index.php:51)
|
|
[1/2]
mysqli_sql_exception
|
|---|
mysqli_sql_exception:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `published`= 1 AND `reference_id`IN (156) AND `reference_table`= 'menu'' at line 3
at /home/wedero/2026.webdesignromania.eu/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138
at mysqli->prepare()
(/home/wedero/2026.webdesignromania.eu/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138)
at Joomla\Database\Mysqli\MysqliStatement->__construct()
(/home/wedero/2026.webdesignromania.eu/plugins/system/falangdriver/drivers/mysqlix.php:65)
at JOverrideDatabase->prepareStatement()
(/home/wedero/2026.webdesignromania.eu/libraries/vendor/joomla/database/src/DatabaseDriver.php:1780)
at Joomla\Database\DatabaseDriver->setQuery()
(/home/wedero/2026.webdesignromania.eu/components/com_falang/helpers/falang.class.php:237)
at Falang::translateListWithIDs()
(/home/wedero/2026.webdesignromania.eu/components/com_falang/helpers/falang.class.php:113)
at Falang::translateList()
(/home/wedero/2026.webdesignromania.eu/plugins/system/falangdriver/drivers/FDatabaseIterator.php:174)
at Falang\Database\FDatabaseIterator->current()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/SiteMenu.php:168)
at Joomla\CMS\Menu\SiteMenu->Joomla\CMS\Menu\{closure}()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Cache/Controller/CallbackController.php:51)
at Joomla\CMS\Cache\Controller\CallbackController->get()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/SiteMenu.php:179)
at Joomla\CMS\Menu\SiteMenu->load()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Menu/AbstractMenu.php:333)
at Joomla\CMS\Menu\AbstractMenu->getMenu()
(/home/wedero/2026.webdesignromania.eu/plugins/system/falangdriver/falangdriver.php:450)
at plgSystemFalangdriver->parseRule()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Router/Router.php:423)
at Joomla\CMS\Router\Router->processParseRules()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Router/Router.php:155)
at Joomla\CMS\Router\Router->parse()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Application/SiteApplication.php:767)
at Joomla\CMS\Application\SiteApplication->route()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Application/SiteApplication.php:243)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/home/wedero/2026.webdesignromania.eu/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/wedero/2026.webdesignromania.eu/includes/app.php:58)
at require_once('/home/wedero/2026.webdesignromania.eu/includes/app.php')
(/home/wedero/2026.webdesignromania.eu/index.php:51)
|