Bug #87406

Be_Log mapping produces wrong cache entry

Added by Harald Holzmann 5 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-01-11
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello,

in my extension I query the system log to get the recent modified pages. I do this with:

    protected function getLog($limit)
    {
        $objectManager =
            \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
        $logEntryRepository = $objectManager->get("TYPO3\\CMS\\Belog\\Domain\\Repository\\LogEntryRepository");
        $query = $logEntryRepository->createQuery();
        $query->statement('SELECT MAX(tstamp), event_pid
                            FROM sys_log 
                            WHERE (tablename = \'pages\') OR (tablename = \'tt_content\') 
                            GROUP BY event_pid
                            ORDER BY MAX(tstamp) 
                            DESC LIMIT ' . intval($limit));
        return $query->execute(true);
    }

When the cache table "cf_extbase_datamapfactory_datamap" is empty I execute this query then a Log-Entry is generated for:
  • identifier: TYPO3%CMS%Belog%Domain%Model%LogEntry
  • content: ..... TYPO3\CMS\Belog\Domain\Model\LogEntry" tablename: tx_belog_domain_model_logentry ......

But the table is sys_log it is mapped via typoscript to "sys_log".

I think the log entry shouldn't be created or should insert the correct table mapping.

Kind regards,
Harald

Also available in: Atom PDF