Actions
Bug #69875
closedcustom named enablecolumns for starttime and enttime don't work
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-09-16
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
In TypoScriptFrontendController:
The function getFirstTimeValueForRecord() builds a query like this:
SELECT MIN (' . $timeField . ') AS ' . $field ...
- $field is either 'starttime' or 'endtime'
- $timeField are the names of the model's enablecolumns
Later we try to get the $result by checking $row[$timeField]
So if there are custom names for the enablecolumns, for example 'visible_from' and 'visible_to', the $row[$timeField] is empty all the time.
Because of the 'AS' statement we could only access the array $row by the key 'starttime' or 'endtime', but with $row[$timeField] we try to access $row by the key 'visible_from' or 'visible_to'.
This issue could be fixed by changing $row[$timeField] to $row[$field].
Actions