Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Classes/EventListener/ExcludeFromReferenceIndex.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

/*
* Copyright (C) 2025 Daniel Siepmann <daniel.siepmann@codappix.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

namespace DanielSiepmann\Tracking\EventListener;

use TYPO3\CMS\Core\DataHandling\Event\IsTableExcludedFromReferenceIndexEvent;

final class ExcludeFromReferenceIndex
{
public function __invoke(
IsTableExcludedFromReferenceIndexEvent $event
): void {
if (str_starts_with($event->getTable(), 'tx_tracking_')) {
$event->markAsExcluded();
}
}
}
5 changes: 5 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ services:
arguments:
$rules: []

DanielSiepmann\Tracking\EventListener\ExcludeFromReferenceIndex:
tags:
- name: 'event.listener'
event: 'TYPO3\CMS\Core\DataHandling\Event\IsTableExcludedFromReferenceIndexEvent'

DanielSiepmann\Tracking\Command\UpdateDataCommand:
tags:
- name: 'console.command'
Expand Down
35 changes: 35 additions & 0 deletions Documentation/Changelog/3.1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
3.1.1
=====

Breaking
--------

Nothing

Features
--------

Nothing

Fixes
-----

* Exclude tables from reference index.

The tables can grow very fast depending on the number of visiting.
Also some installations keep the records for a long time.
That would make it nearly impossible to properly update the reference index.
Therefore the extension now excludes their tables by default.

One can prevent this, by removing the event listener e.g. via custom `Services.*`
files.

Tasks
-----

Nothing

Deprecation
-----------

Nothing