Project

General

Profile

Actions

Feature #88985

closed

Add more descriptive message than "There are no records on this page" on a page with more record types

Added by Pascal Querner over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2019-08-20
Due date:
% Done:

100%

Estimated time:
PHP Version:
7.3
Tags:
Complexity:
Sprint Focus:

Description

Having a page with multiple records of different types (say ext:news, together with tt_content) and you delete all items of any record type, the information message you get from \TYPO3\CMS\Recordlist\Controller\RecordListController::main is "There are no records on this page"

            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                $lang->getLL('noRecordsOnThisPage'),
                '',
                FlashMessage::INFO
            );
            /** @var \TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService */
            $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
            /** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue $defaultFlashMessageQueue */
            $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
            $defaultFlashMessageQueue->enqueue($flashMessage);

Since this page may have more records of other types that message is not really true. (It does not have records of type %s any more)

In \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::generateList the htmlCode gets generated and checked of course only for this table you currently selected is having any records. The result is null, and therefore the information text is displayed.

Steps to reproduce:

1) Create page and create multiple records of different record types (example ext:news and normal content elements living in tt_content)
2) In Web->List view select you want to see only records of type X
3) Delete all records (via clipboard manager or deleted one by one)
4) You will see the information message "There are no records on this page"

Debugging:

Use GeneralUtility::_GP('table') to get the wanted table name, normalize it (somehow) and printf it to the information message.
Or \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::generateList knows the wanted tablename(s), too.

            // Checking if the table should be rendered:
            // Checks that we see only permitted/requested tables:
            if ($this->table && $tableName !== $this->table
                || $this->tableList && !GeneralUtility::inList($this->tableList, $tableName)
                || !$backendUser->check('tables_select', $tableName)
            ) {
                $hideTable = true;
            }
Actions #1

Updated by Gerrit Code Review over 4 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/61902

Actions #2

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61902

Actions #3

Updated by Gerrit Code Review over 4 years ago

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

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61902

Actions #5

Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61902

Actions #6

Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61902

Actions #7

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61926

Actions #8

Updated by Pascal Querner over 4 years ago

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

Updated by Gerrit Code Review over 4 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61926

Actions #10

Updated by Pascal Querner over 4 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF