Skip to content

Commit

Permalink
Merge branch 'release/32.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Jul 21, 2023
2 parents 97f4a08 + ee83a3a commit de47903
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Classes/Domain/Model/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class File extends AbstractEntity

protected ?Metadata $metadata = null;

public function getMetadata(): Metadata
public function getMetadata(): ?Metadata
{
return $this->metadata;
}
Expand Down
3 changes: 3 additions & 0 deletions Classes/Domain/Repository/UtmRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function findAllCampaigns(): array
$results = $queryBuilder
->select('utm_campaign')
->from(Utm::TABLE_NAME)
->where('utm_campaign != ""')
->groupBy('utm_campaign')
->executeQuery()
->fetchFirstColumn();
Expand All @@ -59,6 +60,7 @@ public function findAllSources(): array
$results = $queryBuilder
->select('utm_source')
->from(Utm::TABLE_NAME)
->where('utm_source != ""')
->groupBy('utm_source')
->executeQuery()
->fetchFirstColumn();
Expand All @@ -76,6 +78,7 @@ public function findAllMedia(): array
$results = $queryBuilder
->select('utm_medium')
->from(Utm::TABLE_NAME)
->where('utm_medium != ""')
->groupBy('utm_medium')
->executeQuery()
->fetchFirstColumn();
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Service/CategoryScoringService.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function calculateCategoryScoringForDownload(Visitor $visitor): void
{
$download = $visitor->getLastDownload();
if ($download !== null) {
if ($download->getFile() !== null) {
if ($download->getFile() !== null && $download->getFile()->getMetadata() !== null) {
foreach ($download->getFile()->getMetadata()->getLuxCategories() as $category) {
$visitor->increaseCategoryscoringByCategory(
ConfigurationUtility::getCategoryScoringAddDownload(),
Expand Down Expand Up @@ -167,7 +167,7 @@ protected function calculateCategoryScoringForEmail4link(Visitor $visitor): void
$href = $variables['arguments']['href'] ?? '';
$fileService = GeneralUtility::makeInstance(FileService::class);
$file = $fileService->getFileFromHref($href);
if ($file !== null) {
if ($file !== null && $file->getMetadata() !== null) {
foreach ($file->getMetadata()->getLuxCategories() as $category) {
$visitor->increaseCategoryscoringByCategory(
ConfigurationUtility::getCategoryScoringAddDownload(),
Expand Down
51 changes: 51 additions & 0 deletions Classes/TCA/PreventReferenceIndex.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

declare(strict_types=1);
namespace In2code\Lux\TCA;

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

/**
* Class PreventReferenceIndex
* to prevent reference index records for any LUX tables, to keep database as small as needed
*/
class PreventReferenceIndex
{
protected array $excludedTables = [
'tx_lux_domain_model_visitor',
'tx_lux_domain_model_fingerprint',
'tx_lux_domain_model_attribute',
'tx_lux_domain_model_pagevisit',
'tx_lux_domain_model_newsvisit',
'tx_lux_domain_model_download',
'tx_lux_domain_model_ipinformation',
'tx_lux_domain_model_search',
'tx_lux_domain_model_linklistener',
'tx_lux_domain_model_categoryscoring',
'tx_lux_domain_model_linkclick',
'tx_lux_redirect',
'tx_lux_domain_model_utm',
'tx_lux_domain_model_company',
'tx_lux_domain_model_log',
'tx_luxenterprise_domain_model_workflow',
'tx_luxenterprise_domain_model_trigger',
'tx_luxenterprise_domain_model_action',
'tx_luxenterprise_domain_model_actionqueue',
'tx_luxenterprise_domain_model_doubleoptin',
'tx_luxenterprise_domain_model_shortener',
'tx_luxenterprise_domain_model_shortenervisit',
'tx_luxenterprise_abpage',
'tx_luxenterprise_domain_model_abpagevisit',
'tx_luxenterprise_domain_model_utmgenerator_uri',
'tx_luxenterprise_domain_model_utmgenerator_campaign',
'tx_luxenterprise_domain_model_utmgenerator_source',
'tx_luxenterprise_domain_model_utmgenerator_medium',
];

public function __invoke(IsTableExcludedFromReferenceIndexEvent $event)
{
if (in_array($event->getTable(), $this->excludedTables)) {
$event->markAsExcluded();
}
}
}
6 changes: 6 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ services:
identifier: 'lux/modifyPageModule'
method: 'eventRegistration'

In2code\Lux\TCA\PreventReferenceIndex:
public: true
tags:
- name: event.listener
identifier: 'lux/preventReferenceIndex'

In2code\Lux\ViewHelpers\Lead\GetDateOfLatestPageVisitAndPageViewHelper:
public: true

Expand Down
1 change: 1 addition & 0 deletions Documentation/Technical/Changelog/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

| Version | Date | State | TYPO3 | Description |
|------------|------------|----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 32.2.0 | 2023-07-21 | Task | `11.5 + 12.4` | Prevent refindex records of LUX or LUXenterprise records, Fix empty options in UTM filter, Don't show empty pagevisits in page funnel diagram, Allow null value of metadata objects |
| 32.1.1 | 2023-07-14 | Task | `11.5 + 12.4` | Change label of privacy notice in email4link to take care of latest GDPR recommendations |
| 32.1.0 | 2023-07-07 | Task | `11.5 + 12.4` | Use a better close button and responsive view for lightboxes now in frontend, add defer attribute to formmapping.js and fieldmapping.js |
| 32.0.0 | 2023-06-27 | Feature | `11.5 + 12.4` | Add WiredMinds integration with new company views, information view and convert command, fix image grabber from google, update doughnut colors, anonymize also IPv6 IPs if wanted |
Expand Down
22 changes: 12 additions & 10 deletions Resources/Private/Partials/Box/Lead/PageFunnel.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ <h3 class="panel-title">
<div style="height: 450px; overflow: auto; ">
<nav class="timeline timeline--vertical">
<f:for each="{visitor.pagevisits}" as="pagevisit" iteration="iteration">
<div class="timeline__item" title="" data-identifier-pagevisit="{pagevisit.uid}">
<div style="margin-top: 5px;">
<span title="PID{pagevisit.page.uid}: {pagevisit.pageTitleWithLanguage}"><f:format.crop maxCharacters="30" append="..." respectWordBoundaries="0">{pagevisit.pageTitleWithLanguage}</f:format.crop></span>
<span class="badge pull-right" title="{f:format.date(date:pagevisit.crdate,format:'{f:translate(key:\'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:date\')}')}">{lux:format.readableDate(date:pagevisit.crdate)}</span>
</div>
</div>

<f:if condition="{iteration.isLast} && {pagevisit.referrer}">
<div class="timeline__item">
<f:if condition="{pagevisit.page}">
<div class="timeline__item" title="" data-identifier-pagevisit="{pagevisit.uid}">
<div style="margin-top: 5px;">
<a href="{pagevisit.referrer}" target="_blank" title="{pagevisit.referrer}">{pagevisit.readableReferrer}</a>
<span title="PID{pagevisit.page.uid}: {pagevisit.pageTitleWithLanguage}"><f:format.crop maxCharacters="30" append="..." respectWordBoundaries="0">{pagevisit.pageTitleWithLanguage}</f:format.crop></span>
<span class="badge pull-right" title="{f:format.date(date:pagevisit.crdate,format:'{f:translate(key:\'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:date\')}')}">{lux:format.readableDate(date:pagevisit.crdate)}</span>
</div>
</div>

<f:if condition="{iteration.isLast} && {pagevisit.referrer}">
<div class="timeline__item">
<div style="margin-top: 5px;">
<a href="{pagevisit.referrer}" target="_blank" title="{pagevisit.referrer}">{pagevisit.readableReferrer}</a>
<span class="badge pull-right" title="{f:format.date(date:pagevisit.crdate,format:'{f:translate(key:\'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:date\')}')}">{lux:format.readableDate(date:pagevisit.crdate)}</span>
</div>
</div>
</f:if>
</f:if>
</f:for>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'description' => 'Living User Experience - LUX - the Marketing Automation tool for TYPO3.
Turn your visitors to leads. Identification and profiling of your visitors within your TYPO3 website.',
'category' => 'plugin',
'version' => '32.1.1',
'version' => '32.2.0',
'author' => 'Alex Kellner',
'author_email' => 'alexander.kellner@in2code.de',
'author_company' => 'in2code.de',
Expand Down

0 comments on commit de47903

Please sign in to comment.