Project

General

Profile

Actions

Task #64091

closed

Linkvalidator: only select rows that have content in at least one of the relevant fields

Added by Andreas Kienast over 9 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2015-01-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Optimize the SQL query in LinkAnalyzer to only fetch records whose fields are not empty.


Related issues 1 (0 open1 closed)

Blocked by TYPO3 Core - Feature #62164: Revamp ext:linkvalidatorClosedWouter Wolters2014-10-11

Actions
Actions #1

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Linkvalidator
Actions #2

Updated by Andreas Kienast about 4 years ago

  • Status changed from New to Closed
Actions #3

Updated by Tymoteusz Motylewski almost 4 years ago

What should be taken into account here is that
$this->analyzeRecord($results, $table, $fields, $row);
calls a hook:

return $this->getSignalSlotDispatcher()->dispatch(
self::class,
'beforeAnalyzeRecord',
[$results, $record, $table, $fields, $this]
);

where record has only configured fields.
for tt_content it's
0 = "bodytext"
1 = "header_link"
2 = "records"
3 = "pi_flexform"

The problem is that it doesn't allow extensions to limit record they want to analyze. adding ctype and so would help, but we don't want ctype to be analyzed by linvalidator, we just need it as a context.

SO I would suggest to:
- select * instead of
$selectFields = array_merge(['uid', 'pid', $GLOBALS['TCA'][$table]['ctrl']['label']], $fields);

as analyzeRecord already gets a $fields param which specify which fields should be analyzed.
This way hooks in extensions can get enough context not to process too much - see https://forge.typo3.org/issues/90592

Actions

Also available in: Atom PDF