Bug #70129
closedDB Check-> Full Search-> Advanced Query go empty rows
0%
Description
Hi,
when i use the system tool "db check"-> "full search"-> "advanced query" -> "csv report" i got the result "no rows selected"
when i call the db check the first time , i got a proper result. but when i just reload it, or add some additional field to "selected fields" i got this "no rows selected error.
and i got some php warnings on the top:
PHP Warning
PHP Warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/typo3_src-6.2.15/typo3/sysext/core/Classes/Database/QueryGenerator.php line 912
PHP Warning
PHP Warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/typo3_src-6.2.15/typo3/sysext/core/Classes/Database/QueryGenerator.php line 928
i got this error not on every table, on the table backend user it works fine, but for example the mails table (powermail) or any other extension table got the empy rows result on the second call (reload)
my first bug report & i hope i did and explained it correct
thanks
Harald
Files
Updated by Riccardo De Contardi almost 9 years ago
- Category set to Backend User Interface
I get no php warning, but the same things happens on 6.2.16 and 8.0 (latest dev); also it does not depend on having selected "CVS Export";
What happens is that every time you update the query, some "weird" and unwanted where statement gets appended, and it does not happen every time, but only with some tables
I tried the following step:
1) DB Check > advanced query > select table: page
2) the default query is: select fields: uid,title that becomes:
SELECT uid,title,pid,deleted FROM pages WHERE ( pages.doktype LIKE '%%') AND pages.deleted=0 LIMIT 100
and that's ok.
3) now try to add at least one field e.g. "navigation title": when you click some "reload" button, the part "Make Query:" changes from "Type":"equals":"page" to "Type":"equals":"special" and the query becomes:
SELECT uid,title,nav_title,pid,deleted FROM pages WHERE ( pages.doktype = '--div--') AND pages.deleted=0 LIMIT 100
when you try to modify by hand "Type":"equals":"special" into "Type":"equals":"page", that does not work and the reloads always reload "Type":"equals":"special". Selecting "Type":"equals":"standard" works.
Something similar happens with tt_content table, but not for example with be_users.
When you try to run the query with a plugin (I tried with the news plugin), the behavior is a bit more weird:
The initial (working) query is:
SELECT uid,title,pid,deleted FROM tx_news_domain_model_news WHERE ( tx_news_domain_model_news.sys_language_uid LIKE '%%') AND tx_news_domain_model_news.deleted=0 LIMIT 100
After selecting an additional field (e.g. teaser) and clicking on a reload button:
SELECT uid,title,teaser,pid,deleted FROM tx_news_domain_model_news WHERE ( tx_news_domain_model_news.sys_language_uid = '-1') AND tx_news_domain_model_news.deleted=0 LIMIT 100
so, again, it changes the WHERE sys_language_uid part. Funny thing is that in both cases the interface "Make Query:" shows: "language":"equals":"[all]" .
Updated by Wouter Wolters over 8 years ago
- Assignee deleted (
TYPO3 Release Team)
Updated by Riccardo De Contardi over 7 years ago
I think that it still affects TYPO3 8.7-dev (latest master) (tried only with the "page" table)
Updated by Riccardo De Contardi over 6 years ago
still affects TYPO3 9.4-dev (latest master) (tried only with the "page" table)
Updated by Riccardo De Contardi over 4 years ago
- File cattura1.png cattura1.png added
- File cattura2.png cattura2.png added
- File cattura3.png cattura3.png added
I guess it has been solved in the meanwhile: I repeated my test on comment 2 on 9.5.15 and these are the results:
Test 1: pages table¶
1) DB Check > advanced query > select table: page
2) the default query is: "select fields:" "uid,title" and automatically adds "Type" "equals" "Standard"
the final query shown is:
SELECT `uid`, `title`, `pid`, `deleted` FROM `pages` WHERE (pages.doktype LIKE '%%') AND (`pages`.`deleted` = 0) LIMIT 100
3) now try to add at least one field e.g. "navigation title": when you click some "reload" button, the part "Make Query:" still has "Type":"equals":"Standard" but now it is part of the query
Thus the query becomes:
SELECT `uid`, `title`, `nav_title`, `pid`, `deleted` FROM `pages` WHERE (pages.doktype = '1') AND (`pages`.`deleted` = 0) LIMIT 100
Test 2: be_users table
1) DB Check > advanced query > select table: Backend user
2) the default query is: "select fields:" "uid,title" and automatically adds "Username" "contains" ""
The query shown is:
SELECT `uid`, `username`, `pid`, `deleted` FROM `be_users` WHERE (be_users.username LIKE '%%') AND (`be_users`.`deleted` = 0) LIMIT 100
3) now try to add at least one field e.g. "email": when you click some "reload" button, the part "Make Query:" still has "Username":"contains":"" and the final query becomes (I omit the screenshot):
SELECT `uid`, `username`, `email`, `pid`, `deleted` FROM `be_users` WHERE (be_users.username LIKE '%%') AND (`be_users`.`deleted` = 0) LIMIT 100
Test 3: tx_news_domain_model_news table¶
1) DB Check > advanced query > select table: News
2) the default query is: "select fields:" "uid,title" and automatically adds "Language" "contains" "" and the query becomes (I omit the screenshot):
SELECT `uid`, `title`, `pid`, `deleted` FROM `tx_news_domain_model_news` WHERE (tx_news_domain_model_news.sys_language_uid LIKE '%%') AND (`tx_news_domain_model_news`.`deleted` = 0) LIMIT 100
3) now try to add at least one field e.g. "teaser": when you click some "reload" button, the part "Make Query:" still has "Language":"contains":"" and the final query becomes (I omit the screenshot):
SELECT `uid`, `title`, `teaser`, `pid`, `deleted` FROM `tx_news_domain_model_news` WHERE (tx_news_domain_model_news.sys_language_uid LIKE '%%') AND (`tx_news_domain_model_news`.`deleted` = 0) LIMIT 100
Is this the expected behavior? Is a different test necessary?
Updated by Tymoteusz Motylewski over 3 years ago
- Status changed from New to Resolved
seems to be resolved as Richardo mentioned. If not, please open a new issue with steps how to reproduce it.