Bug #66561
closedMySQL Error in Page Preview / Page View
0%
Description
When rendering the page via backend preview or frontend, the following error appears:
SELECT * FROM pages WHERE pid IN () AND pages.deleted=0 AND pages.hidden=0 AND pages.starttime<=1429800120 AND (pages.endtime=0 OR pages.endtime>1429800120) AND NOT pages.t3ver_state>0 AND pages.doktype<200 AND (pages.fe_group='' OR pages.fe_group IS NULL OR pages.fe_group='0' OR FIND_IN_SET('0',pages.fe_group) OR FIND_IN_SET('-1',pages.fe_group)) AND pages.nav_hide=0 AND pages.doktype NOT IN (6) ORDER BY sorting
I've tested the MySQL query directly on the database and i identified the problem:
SELECT * FROM pages WHERE pid IN ()
should be
SELECT * FROM pages WHERE pid IN ('')
The error appears on the top of the page, the rest of the page is rendered as expected - see this screenshot:
https://www.dropbox.com/s/xwqr9dccb077gsj/Screenshot%202015-04-23%2016.52.53.png?dl=0
Files
Updated by Markus Klein over 9 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
7.1 (Cleanup))
Can you check with current master of CMS 7 whether the same problem still exists?
(we will release 7.2 soonish, so it would be good to know if this is a real issue)
btw the SQL stmt should include page uids in then IN clause and not an empty string, so this points towards missing data.
Updated by Markus Klein over 9 years ago
Updated by Elmar Putz over 9 years ago
Hi,
thank you - unfortunately i don't have composer available on the test system and i cannot install it due to managed server environment restrictions.
Which steps are required to get the current branch up and running on an existing 7.1 installation without composer available?
Thank you
Elmar
Updated by Markus Klein over 9 years ago
Basically checkout current master on any machine. run "composer install -o" in the source once and upload the source
Updated by Elmar Putz over 9 years ago
Upgraded to 7.2 dev (current master) - error still exists:
array(4 items) caller => "TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery" (60 chars) ERROR => "You have an error in your SQL syntax; check the manual that corresponds to y our MySQL server version for the right syntax to use near ') AND pages.delet ed=0 AND pages.hidden=0 AND pages.starttime<=1429867680 AND (pa' at line 1" (226 chars) lastBuiltQuery => "SELECT * FROM pages WHERE pid IN () AND pages.deleted=0 AND pages.hidden=0 A ND pages.starttime<=1429867680 AND (pages.endtime=0 OR pages.endtime>1429867 680) AND NOT pages.t3ver_state>0 AND pages.doktype<200 AND (pages.fe_group= '' OR pages.fe_group IS NULL OR pages.fe_group='0' OR FIND_IN_SET('0',pages. fe_group) OR FIND_IN_SET('-1',pages.fe_group)) AND pages.nav_hide=0 AND pag es.doktype NOT IN (6) ORDER BY sorting" (418 chars) debug_backtrace => "TYPO3\CMS\Core\Core\Bootstrap->run#33 // TYPO3\CMS\Frontend\RequestHandler-> handleRequest#195 // TYPO3\CMS\Frontend\Page\PageGenerator::renderContent#21 0 // TYPO3\CMS\Frontend\Page\PageGenerator::renderContentWithHeader#256 // T YPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGet#782 // TYPO3\ CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle#781 // TYPO3 \CMS\Frontend\ContentObject\ContentObjectRenderer->render#834 // TYPO3\CMS\F rontend\ContentObject\HierarchicalMenuContentObject->render#903 // TYPO3\CMS \Frontend\ContentObject\Menu\AbstractMenuContentObject->makeMenu#51 // TYPO3 \CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->prepareMenuItems #426 // TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->pre pareMenuItemsForBrowseMenu#590 // TYPO3\CMS\Frontend\Page\PageRepository->ge tMenu#1086 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_SELECTquery#5 53 // TYPO3\CMS\Core\Database\DatabaseConnection->debug#309" (971 chars)
Updated by Elmar Putz over 9 years ago
Additional Info: the error occurs only on pages located in the second level of the page tree, not on the 1st or 3rd
See file attached - the error only appears on the marked level of pages, not one level above or below. If a page on the same level is a shortcut, there is no error as well...
Updated by Elmar Putz over 9 years ago
Another Update:
the 1st level of the page tree menu is a sys folder ("FH OOE allgemein") - if i change it to be a normal page, everything works fine...
see file attached again...
This behaviour appeared first on TYPO3 7.1 and didn't occur on 6.2 LTS
Updated by Markus Klein over 9 years ago
- Status changed from Needs Feedback to New
Can you please post the menu TS you use, so I can reproduce this?
Updated by Elmar Putz over 9 years ago
We are using the standard menu from bootstrap_package at the moment and did not make any modifications to it.
Updated by Markus Klein over 9 years ago
Can you please draw me a clear page structure, where I can see:
- What is the root page
- Where is the TS template
- At which point is the menu drawn from
- Which page do I need to access to get the error
Thanks
Updated by Elmar Putz over 9 years ago
Ok, i'll do my best:
PAGE TREE ROOT
-- Website Root : Menu is drawn from here - TS template
---- SysFolder
-------- Page 1 : NO ERROR
------------ Page 1.1 : ERROR!!!!
-------------- Page 1.1.1 : NO ERROR
---------Page 2 : NO ERROR
I hope, this will help to reproduce the bug.
Thanks in advance
Elmar
Updated by Markus Klein over 9 years ago
- Status changed from New to Needs Feedback
Thanks, I tried that now, but still failing to reproduce this on current master.
I copied the menu and submenu TS (lib.navigation.main, lib.navigation.subnavigation) from the bootstrap_package.
Maybe you have to update to 7.2 first (released next week) and see if it is fixed there.
Updated by Elmar Putz over 9 years ago
Just updated to 7.2 - error is still there
Updated by Markus Klein over 9 years ago
I'm now using a brand new installation with the default introduction package, but I'm still failing to reproduce this on 7.2.0!
Obviously I'm missing something crucial in the configuration/setup.
Updated by Alexander Opitz over 9 years ago
Hi,
is your issue solved with latest (7.4) release or do you have new instructions to reproduce this issue?
Updated by Elmar Putz over 9 years ago
Hi,
thank you for reminding me - the problem seems to be solved with the latest verson of 7.4
Elmar
Updated by Markus Klein over 9 years ago
- Status changed from Needs Feedback to Closed
Updated by Florian Dehn over 8 years ago
This still seems to be an issue in TYPO3 7.6.4
I'm trying to implement an HEMNU from pages underneath a sysfolder.
When I set "sysfolder" to "page", everything's fine.
The above mentioned setup is quite similar to mine, as well as the SQL error returned.
array(4 items) caller => "TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery" (60 chars) ERROR => "You have an error in your SQL syntax; check the manual that corresponds to y our MySQL server version for the right syntax to use near ') AND pages.delet ed=0 AND pages.t3ver_state<=0 AND pages.hidden=0 AND pages.star' at line 1" (226 chars) lastBuiltQuery => "SELECT * FROM pages WHERE pid IN () AND pages.deleted=0 AND pages.t3ver_stat e<=0 AND pages.hidden=0 AND pages.starttime<=1456777860 AND (pages.endtime=0 OR pages.endtime>1456777860) AND pages.doktype<200 AND (pages.fe_group='' O R pages.fe_group IS NULL OR pages.fe_group='0' OR FIND_IN_SET('0',pages.fe_g roup) OR FIND_IN_SET('-1',pages.fe_group)) AND pages.nav_hide=0 AND pages.d oktype NOT IN (6) ORDER BY sorting" (414 chars) debug_backtrace => "call_user_func#34 // {closure}# // TYPO3\CMS\Frontend\Http\Application->run# 33 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#78 // TYPO3\CMS\Frontend\ Http\RequestHandler->handleRequest#302 // TYPO3\CMS\Frontend\Page\PageGenera tor::renderContent#216 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRend erer->cObjGet#210 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer- >cObjGetSingle#805 // TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer ->render#859 // TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject- >render#943 // TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject-> renderFluidView#102 // TYPO3\CMS\Fluid\View\AbstractTemplateView->render#300 // FluidCache_Standalone_template_file_projects_b2b0fa123781f9ec1ed8d91d03f 8ed98ceae017a->render#193 // TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHel per->initializeArgumentsAndRender#117 // TYPO3\CMS\Fluid\Core\ViewHelper\Abs tractViewHelper->callRenderMethod#249 // call_user_func_array#268 // TYPO3\C MS\Fluid\ViewHelpers\CObjectViewHelper->render# // TYPO3\CMS\Frontend\Conten tObject\ContentObjectRenderer->cObjGetSingle#119 // TYPO3\CMS\Frontend\Conte ntObject\ContentObjectRenderer->render#859 // TYPO3\CMS\Frontend\ContentObje ct\ContentObjectArrayContentObject->render#943 // TYPO3\CMS\Frontend\Content Object\ContentObjectRenderer->cObjGet#41 // TYPO3\CMS\Frontend\ContentObject \ContentObjectRenderer->cObjGetSingle#805 // TYPO3\CMS\Frontend\ContentObjec t\ContentObjectRenderer->render#859 // TYPO3\CMS\Frontend\ContentObject\Hier archicalMenuContentObject->render#943 // TYPO3\CMS\Frontend\ContentObject\Me nu\AbstractMenuContentObject->start#48 // TYPO3\CMS\Frontend\ContentObject\C ontentObjectRenderer->stdWrap#359 // TYPO3\CMS\Frontend\ContentObject\Conten tObjectRenderer->stdWrap_cObject#2463 // TYPO3\CMS\Frontend\ContentObject\Co ntentObjectRenderer->cObjGetSingle#2650 // TYPO3\CMS\Frontend\ContentObject\ ContentObjectRenderer->render#859 // TYPO3\CMS\Frontend\ContentObject\Hierar chicalMenuContentObject-..." (2530 chars)
Updated by Wouter Wolters over 8 years ago
Hi, this should be solved with https://forge.typo3.org/issues/73493 which is recently merged into the core.
Can you try this on your installation?
Updated by Florian Dehn over 8 years ago
Yep, that works for me. Thanks a lot for coming back to me!