Project

General

Profile

Actions

Bug #70129

closed

DB Check-> Full Search-> Advanced Query go empty rows

Added by Harald Hochwald about 9 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2015-09-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

dbcheck-second-call.png (662 KB) dbcheck-second-call.png Harald Hochwald, 2015-09-26 21:39
dbcheck-first-call.png (714 KB) dbcheck-first-call.png Harald Hochwald, 2015-09-26 21:39
cattura1.png (60.2 KB) cattura1.png Riccardo De Contardi, 2020-04-24 17:20
cattura2.png (86.1 KB) cattura2.png Riccardo De Contardi, 2020-04-24 17:26
cattura3.png (57 KB) cattura3.png Riccardo De Contardi, 2020-04-24 17:30
Actions #1

Updated by Harald Hochwald about 9 years ago

  • Assignee set to TYPO3 Release Team
Actions #2

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]" .

Actions #3

Updated by Wouter Wolters over 8 years ago

  • Assignee deleted (TYPO3 Release Team)
Actions #4

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)

Actions #5

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

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?

Actions #7

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.

Actions #8

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF