Skip to content

Commit a0191c8

Browse files
committed
Merge branch 'release/41.1.1'
2 parents 59b985d + efc0d26 commit a0191c8

File tree

6 files changed

+32
-53
lines changed

6 files changed

+32
-53
lines changed

Classes/Domain/Repository/PagevisitRepository.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
namespace In2code\Lux\Domain\Repository;
55

66
use DateTime;
7-
use Doctrine\DBAL\Driver\Exception as ExceptionDbalDriver;
87
use Doctrine\DBAL\Exception as ExceptionDbal;
98
use Exception;
109
use In2code\Lux\Domain\Model\Categoryscoring;
@@ -47,7 +46,6 @@ class PagevisitRepository extends AbstractRepository
4746
* @return array
4847
* @throws ExceptionDbal
4948
* @throws Exception
50-
* @throws ExceptionDbalDriver
5149
*/
5250
public function findCombinedByPageIdentifier(FilterDto $filter, int $limit = 100): array
5351
{
@@ -56,7 +54,7 @@ public function findCombinedByPageIdentifier(FilterDto $filter, int $limit = 100
5654
. ' left join ' . Page::TABLE_NAME . ' p on p.uid = pv.page'
5755
. ' left join ' . Visitor::TABLE_NAME . ' v on v.uid = pv.visitor'
5856
. ' left join ' . Categoryscoring::TABLE_NAME . ' cs on v.uid = cs.visitor'
59-
. ' where 1 '
57+
. ' where pv.page > 0 '
6058
. $this->extendWhereClauseWithFilterSearchterms($filter, 'p')
6159
. $this->extendWhereClauseWithFilterTime($filter, true, 'pv')
6260
. $this->extendWhereClauseWithFilterSite($filter, 'pv')
@@ -328,7 +326,6 @@ public function findAmountPerPageAndVisitor(int $pageIdentifier, Visitor $visito
328326
* @param int $limit
329327
* @return array
330328
* @throws ExceptionDbal
331-
* @throws ExceptionDbalDriver
332329
*/
333330
public function getAmountOfReferrers(FilterDto $filter, int $limit = 100): array
334331
{
@@ -505,6 +502,7 @@ public function getReferrerCategoryAmounts(FilterDto $filter): array
505502
* @param FilterDto $filter
506503
* @return array
507504
* @throws Exception
505+
* @throws ExceptionDbal
508506
*/
509507
public function getDomainsWithAmountOfVisits(FilterDto $filter): array
510508
{
@@ -517,7 +515,7 @@ public function getDomainsWithAmountOfVisits(FilterDto $filter): array
517515
. $this->extendWhereClauseWithFilterScoring($filter, 'v')
518516
. $this->extendWhereClauseWithFilterCategoryScoring($filter, 'cs')
519517
. ' group by domain order by count desc';
520-
return (array)$connection->executeQuery($sql)->fetchAllAssociative();
518+
return $connection->executeQuery($sql)->fetchAllAssociative();
521519
}
522520

523521
/**
@@ -529,6 +527,7 @@ public function getDomainsWithAmountOfVisits(FilterDto $filter): array
529527
* @param FilterDto $filter
530528
* @return array
531529
* @throws Exception
530+
* @throws ExceptionDbal
532531
*/
533532
public function getAllDomains(FilterDto $filter): array
534533
{
@@ -547,6 +546,7 @@ public function getAllDomains(FilterDto $filter): array
547546
* @param FilterDto $filter
548547
* @return array
549548
* @throws Exception
549+
* @throws ExceptionDbal
550550
*/
551551
public function getAllLanguages(FilterDto $filter): array
552552
{
@@ -567,6 +567,7 @@ public function getAllLanguages(FilterDto $filter): array
567567
* @param FilterDto $filter
568568
* @return int
569569
* @throws Exception
570+
* @throws ExceptionDbal
570571
*/
571572
public function findAbandonsForPage(int $pageIdentifier, FilterDto $filter): int
572573
{

Classes/Domain/Tracker/PageTracker.php

Lines changed: 22 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare(strict_types=1);
44
namespace In2code\Lux\Domain\Tracker;
55

6-
use In2code\Lux\Domain\Model\Page;
76
use In2code\Lux\Domain\Model\Pagevisit;
87
use In2code\Lux\Domain\Model\Visitor;
98
use In2code\Lux\Domain\Repository\PageRepository;
@@ -13,9 +12,6 @@
1312
use In2code\Lux\Utility\ObjectUtility;
1413
use Psr\EventDispatcher\EventDispatcherInterface;
1514
use TYPO3\CMS\Core\Utility\GeneralUtility;
16-
use TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException;
17-
use TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException;
18-
use TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException;
1915

2016
class PageTracker
2117
{
@@ -33,61 +29,43 @@ public function __construct(
3329
$this->eventDispatcher = $eventDispatcher;
3430
}
3531

36-
/**
37-
* @param Visitor $visitor
38-
* @param array $arguments
39-
* @return Pagevisit|null
40-
* @throws IllegalObjectTypeException
41-
* @throws InvalidConfigurationTypeException
42-
* @throws UnknownObjectException
43-
*/
4432
public function track(Visitor $visitor, array $arguments): ?Pagevisit
4533
{
4634
$pageUid = (int)$arguments['pageUid'];
4735
$languageUid = (int)$arguments['languageUid'];
4836
$referrer = $arguments['referrer'];
37+
$pagevisit = null;
4938
if ($this->isTrackingActivated($visitor, $pageUid)) {
50-
$pagevisit = $this->getPageVisit($pageUid, $languageUid, $referrer, $visitor);
51-
$visitor->addPagevisit($pagevisit);
52-
$visitor->setVisits($visitor->getNumberOfUniquePagevisits());
53-
$this->visitorRepository->update($visitor);
54-
$this->visitorRepository->persistAll();
39+
$pagevisit = $this->getPagevisit($pageUid, $languageUid, $referrer, $visitor);
40+
if ($pagevisit !== null) {
41+
$visitor->addPagevisit($pagevisit);
42+
$visitor->setVisits($visitor->getNumberOfUniquePagevisits());
43+
$this->visitorRepository->update($visitor);
44+
$this->visitorRepository->persistAll();
45+
}
5546
$this->eventDispatcher->dispatch(new PageTrackerEvent($visitor, $pagevisit, $arguments));
56-
return $pagevisit;
5747
}
58-
return null;
48+
return $pagevisit;
5949
}
6050

61-
/**
62-
* @param int $pageUid
63-
* @param int $languageUid
64-
* @param string $referrer
65-
* @param Visitor $visitor
66-
* @return Pagevisit
67-
*/
68-
protected function getPageVisit(int $pageUid, int $languageUid, string $referrer, Visitor $visitor): Pagevisit
51+
protected function getPagevisit(int $pageUid, int $languageUid, string $referrer, Visitor $visitor): ?Pagevisit
6952
{
70-
/** @var Pagevisit $pageVisit */
71-
$pageVisit = GeneralUtility::makeInstance(Pagevisit::class);
7253
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
73-
/** @var Page $page */
7454
$page = $pageRepository->findByUid($pageUid);
75-
$pageVisit
76-
->setPage($page)
77-
->setSite($this->siteService->getSiteIdentifierFromPageIdentifier($pageUid))
78-
->setLanguage($languageUid)
79-
->setReferrer($referrer)
80-
->setDomainAutomatically()
81-
->setVisitor($visitor);
82-
return $pageVisit;
55+
$pagevisit = null;
56+
if ($page !== null) {
57+
$pagevisit = GeneralUtility::makeInstance(Pagevisit::class);
58+
$pagevisit
59+
->setPage($page)
60+
->setSite($this->siteService->getSiteIdentifierFromPageIdentifier($pageUid))
61+
->setLanguage($languageUid)
62+
->setReferrer($referrer)
63+
->setDomainAutomatically()
64+
->setVisitor($visitor);
65+
}
66+
return $pagevisit;
8367
}
8468

85-
/**
86-
* @param Visitor $visitor
87-
* @param int $pageUid
88-
* @return bool
89-
* @throws InvalidConfigurationTypeException
90-
*/
9169
protected function isTrackingActivated(Visitor $visitor, int $pageUid): bool
9270
{
9371
return $pageUid > 0 && $visitor->isNotBlacklisted() && $this->isTrackingActivatedInSettings();
@@ -97,7 +75,6 @@ protected function isTrackingActivated(Visitor $visitor, int $pageUid): bool
9775
* Check if tracking of pagevisits is turned on via TypoScript
9876
*
9977
* @return bool
100-
* @throws InvalidConfigurationTypeException
10178
*/
10279
protected function isTrackingActivatedInSettings(): bool
10380
{

Classes/ViewHelpers/Pagination/UriViewHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function getAction(): string
5252
{
5353
$controllerAction = $this->renderingContext->getControllerAction();
5454
$parts = explode('/', $controllerAction);
55-
return strtolower($parts[1] ?? '');
55+
return lcfirst($parts[1] ?? '');
5656
}
5757

5858
protected function getController(): string

Documentation/Technical/Campaigns/AbTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ So first of all choose a page that you want to test (this is A). Copy this page,
1414
change only a few things on this page (this is B).
1515

1616
**Tipp:** For a meaningful test result you should consider not to change too much elements between two pages.
17-
If you want to learn if a green or a blue button is clicked more often, don't change anything else then the color of
17+
If you want to learn if a green or a blue button is clicked more often, don't change anything else than the color of
1818
this specific button.
1919

2020
##### Configuration

Documentation/Technical/Changelog/Index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
| Version | Date | State | TYPO3 | Description |
1111
|------------|------------|----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
12+
| 41.1.1 | 2026-01-06 | Bugfix | `12.4 + 13.4` | Fix pagebrowser on some detail views in backend, don't create pagevisit entries for non-existing pages |
1213
| 41.1.0 | 2025-12-23 | Task | `12.4 + 13.4` | CSS update for a better campaign layout |
1314
| 41.0.0 | 2025-12-18 | Task | `12.4 + 13.4` | IP services were replaced (iplist.cc + ipapi.com with ipapi.is + ipapi.co) see for more details [IpAddresses.md](../../Privacy/IpAddresses.md) |
1415
| 40.0.1 | 2025-12-04 | Bugfix | `12.4 + 13.4` | Don't add events on a-tags with downloads if there is already an linklistener event given |

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'description' => 'Living User Experience - LUX - the Marketing Automation tool for TYPO3.
55
Turn your visitors to leads. Identification and profiling of your visitors within your TYPO3 website.',
66
'category' => 'plugin',
7-
'version' => '41.1.0',
7+
'version' => '41.1.1',
88
'author' => 'Alex Kellner',
99
'author_email' => '[email protected]',
1010
'author_company' => 'in2code.de',

0 commit comments

Comments
 (0)