Project

General

Profile

Actions

Bug #87406

closed

Be_Log mapping produces wrong cache entry

Added by Harald Holzmann over 5 years ago. Updated about 4 years ago.

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

0%

Estimated time:
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

Actions #1

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Closed

In 10 the mapping is not done in TypoScript anymore and this shouldn't happen. Additionally I would suggest using a direct call without of using the extbase repository because it is much faster and the LogEntryRepository is flagged as internal.

Actions

Also available in: Atom PDF