Feature #88985

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

Added by Pascal Querner 3 months ago. Updated about 1 month ago.

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

100%

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;
            }

Associated revisions

Revision d1793e59 (diff)
Added by Pascal Querner about 1 month ago

[TASK] Give better info about no records

This patch adds a better info text when no records of a specific type
don't exist, instead of giving the generic answer "no records exists on
this page" (which may not be true).

Resolves: #88985
Releases: master, 9.5
Change-Id: I780e845a0c224815e710cf8246e407198a1e6cb0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61902
Tested-by: TYPO3com <>
Tested-by: Sascha Rademacher <>
Tested-by: Jörg Bösche <>
Tested-by: Susanne Moog <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Susanne Moog <>

Revision 48c603a7 (diff)
Added by Pascal Querner about 1 month ago

[TASK] Give better info about no records

This patch adds a better info text when no records of a specific type
don't exist, instead of giving the generic answer "no records exists on
this page" (which may not be true).

Resolves: #88985
Releases: master, 9.5
Change-Id: I780e845a0c224815e710cf8246e407198a1e6cb0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61926
Tested-by: TYPO3com <>
Tested-by: Jörg Bösche <>
Tested-by: Jan Stockfisch <>
Tested-by: Sascha Rademacher <>
Tested-by: Tobi Kretschmann <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Jan Stockfisch <>
Reviewed-by: Tobi Kretschmann <>

History

#1 Updated by Gerrit Code Review about 1 month 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

#2 Updated by Gerrit Code Review about 1 month 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

#3 Updated by Gerrit Code Review about 1 month 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

#4 Updated by Gerrit Code Review about 1 month 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

#5 Updated by Gerrit Code Review about 1 month 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

#6 Updated by Gerrit Code Review about 1 month 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

#7 Updated by Gerrit Code Review about 1 month 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

#8 Updated by Pascal Querner about 1 month ago

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

#9 Updated by Gerrit Code Review about 1 month 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

#10 Updated by Pascal Querner about 1 month ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF