Bug #64654

If a sys_template record has only "basedOn" that were already included, an SQL error is shown

Added by Nils Blattner about 4 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2015-01-30
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Hi there

Recursive inclusion of templates generates an SQL error, if the (already) included template is the only listed in "basedOn":

  • "base template" includes
    • "content rendering" includes
      • "base template"

Because "content rendering" only has one "basedOn" which is already included before, the SQL generated contains "uid IN ()" and results in an error.
Of course recursion is not desirable, but more complex scenarios can be imagined easily, that also produce this error. If only templates are "basedOn", that are already included previously, the SQL is faulty.

Attached patch would take care of that.

PS: T3 6.2.9

Kind regards
Nils

TemplateService.php.diff View (1.8 KB) Nils Blattner, 2015-01-30 17:16

Associated revisions

Revision 8da061f2 (diff)
Added by Andreas Fernandez over 3 years ago

[BUGFIX] Fix SQL error on recursive TypoScript template inclusion

If TypoScript templates are included recusively (a > b > a), the
$basedOnIds array is empty and creates an invalid SQL query.

Resolves: #64654
Releases: master, 6.2
Change-Id: Ia3001e1e620d6bb4d2d1f3ad016816bc5636dff1
Reviewed-on: http://review.typo3.org/40147
Reviewed-by: Pierrick Caillon <>
Tested-by: Pierrick Caillon <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Benjamin Mack <>
Tested-by: Benjamin Mack <>

Revision 77ac8f2f (diff)
Added by Andreas Fernandez over 3 years ago

[BUGFIX] Fix SQL error on recursive TypoScript template inclusion

If TypoScript templates are included recusively (a > b > a), the
$basedOnIds array is empty and creates an invalid SQL query.

Resolves: #64654
Releases: master, 6.2
Change-Id: Ia3001e1e620d6bb4d2d1f3ad016816bc5636dff1
Reviewed-on: http://review.typo3.org/40378
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40147

#2 Updated by Andreas Fernandez over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#3 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40378

#4 Updated by Andreas Fernandez over 3 years ago

  • Status changed from Under Review to Resolved

#5 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF