-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\FluidTYPO3\Fluidpages\Provider\PageProvider::loadRecordTreeFromDatabase does not check if returned record from recordService is null #392
Comments
This isn't exactly related to the patch you did, but if you're experiencing this problem that would indicate you're trying to view or edit a page that does not exist anywhere in the page tree. Additionally it indicates that the page actually wasn't deleted with TYPO3 because it would have restricted deletion if there were active sub-pages (and if recursive deletion was allowed in user settings, it would've deleted the child pages first afaik). There might be something more to explain why you're actually experiencing this issue. Technically, it shouldn't be possible to experience this if you manage the pages in normal ways through TYPO3. That said, the code does return null from this method and this has to be handled. Just be aware that something else is probably broken on your setup ;) |
@NamelessCoder Certainly possible, it's a large installation with some upgrades already, and the problem occurs when running the reference index check/update … (actually prevents it from running …) |
@wazum I get an error at the same line when opening pages in the frontend (TYPO3 8.7.22, flux 9.1.0 + fluidpages 4.3.0). The page definitely exists in the page tree. The error occurrs if i open a page in the frontend whose parent page is marked as hidden. |
@GertHammes I updated the pull request |
Fixed via 74f5fdf. |
For me the change in 74f5fdf does not fix the issue, but just result in a different error:
If the parent page is hidden, and the current page tries to get the PageLayout from higher up in the rootline, the Layout cannot be found because in RecordService::getSingle() the enableFields (hidden, startTime, endTime) are taken into account and the rootline is broken. Always using BackendUtility::getRecord() fixed that. |
@franzkugelmann This is not the same issue. Two other issues are potentially related: 2a269ce (merged) and #411 (not merged, may be hidden by the other issue, only applies on certain setups). |
If
$record = $this->recordService->getSingle($this->getTableName($record), '*', $record[$parentFieldName]);
returns null (e.g. one of the parent records is set to deleted), this leads to an exception.
The text was updated successfully, but these errors were encountered: