Skip to content

Restricted pages not visible in backend module anymore #62

@georgringer

Description

@georgringer

If a page of a form is getting restricted with e.g. hidden or start/endtime, the page title won't be shown anymore in the backend module. Our customers uses a lot of forms, especially for stuff like quizzes and those pages are e.g. time restricted.

As a quick fix I did this

diff --git a/Classes/Domain/Model/FormLogEntry.php b/Classes/Domain/Model/FormLogEntry.php
--- a/Classes/Domain/Model/FormLogEntry.php	(date 1622447981000)
+++ b/Classes/Domain/Model/FormLogEntry.php	(date 1622447981000)
@@ -15,16 +15,16 @@
 class FormLogEntry extends AbstractEntity
 {
     /**
-     * @var \Pagemachine\Formlog\Domain\Model\FormLogEntry\Page
+     * @var int
      */
     protected $page;
 
     /**
-     * @return \Pagemachine\Formlog\Domain\Model\FormLogEntry\Page
+     * @return array
      */
     public function getPage()
     {
-        return $this->page;
+        return \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $this->page, 'title,uid', '', false);
     }
 
     /**

but I propose to remove the extbase models in total and use raw queries directly which would also improve performance I guess

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions