diff --git a/Classes/Command/LuxCacheWarmupCommand.php b/Classes/Command/LuxCacheWarmupCommand.php index cf50fe5a..80cc2b83 100644 --- a/Classes/Command/LuxCacheWarmupCommand.php +++ b/Classes/Command/LuxCacheWarmupCommand.php @@ -12,13 +12,13 @@ use In2code\Lux\Exception\ContextException; use In2code\Lux\Utility\CacheLayerUtility; use In2code\Lux\Utility\ConfigurationUtility; +use In2code\Lux\Utility\EnvironmentUtility; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException; use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException; -use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Fluid\View\StandaloneView; @@ -51,7 +51,7 @@ public function configure() */ public function execute(InputInterface $input, OutputInterface $output): int { - if (Environment::isCli() === false) { + if (EnvironmentUtility::isCli() === false) { throw new ContextException('This command can only be executed from CLI', 1645378130); } diff --git a/Classes/Controller/FrontendController.php b/Classes/Controller/FrontendController.php index c9905341..63840c29 100644 --- a/Classes/Controller/FrontendController.php +++ b/Classes/Controller/FrontendController.php @@ -14,13 +14,13 @@ use In2code\Lux\Domain\Tracker\AttributeTracker; use In2code\Lux\Domain\Tracker\CompanyTracker; use In2code\Lux\Domain\Tracker\DownloadTracker; +use In2code\Lux\Domain\Tracker\EventTracker; use In2code\Lux\Domain\Tracker\FrontenduserAuthenticationTracker; use In2code\Lux\Domain\Tracker\LinkClickTracker; use In2code\Lux\Domain\Tracker\LuxletterlinkAttributeTracker; use In2code\Lux\Domain\Tracker\NewsTracker; use In2code\Lux\Domain\Tracker\PageTracker; use In2code\Lux\Domain\Tracker\SearchTracker; -use In2code\Lux\Domain\Tracker\EventTracker; use In2code\Lux\Events\AfterTrackingEvent; use In2code\Lux\Exception\ActionNotAllowedException; use In2code\Lux\Exception\ConfigurationException; diff --git a/Classes/Domain/LogEventListeners/Log.php b/Classes/Domain/LogEventListeners/Log.php index 8fbcdbc4..2faa0434 100644 --- a/Classes/Domain/LogEventListeners/Log.php +++ b/Classes/Domain/LogEventListeners/Log.php @@ -5,6 +5,7 @@ use In2code\Lux\Domain\Service\LogService; use In2code\Lux\Events\Log\DownloadEvent; +use In2code\Lux\Events\Log\EventTrackerEvent; use In2code\Lux\Events\Log\LinkClickEvent; use In2code\Lux\Events\Log\LogEmail4linkSendEmailEvent; use In2code\Lux\Events\Log\LogEmail4linkSendEmailFailedEvent; @@ -16,7 +17,6 @@ use In2code\Lux\Events\Log\LogVisitorIdentifiedByLuxletterlinkEvent; use In2code\Lux\Events\Log\SearchEvent; use In2code\Lux\Events\Log\UtmEvent; -use In2code\Lux\Events\Log\EventTrackerEvent; use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException; use TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException; diff --git a/Classes/Utility/BackendUtility.php b/Classes/Utility/BackendUtility.php index 8cdcf339..5232b433 100644 --- a/Classes/Utility/BackendUtility.php +++ b/Classes/Utility/BackendUtility.php @@ -6,7 +6,6 @@ use In2code\Lux\Domain\Model\Transfer\FilterDto; use Throwable; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; -use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Property\PropertyMapper; @@ -45,7 +44,7 @@ public static function isAdministrator(): bool */ public static function hasAdministrationPermission(): bool { - return Environment::isCli() || self::isAdministrator(); + return EnvironmentUtility::isCli() || self::isAdministrator(); } /** diff --git a/Classes/Utility/EnvironmentUtility.php b/Classes/Utility/EnvironmentUtility.php index 558cf1ca..87a5e2d6 100644 --- a/Classes/Utility/EnvironmentUtility.php +++ b/Classes/Utility/EnvironmentUtility.php @@ -3,6 +3,7 @@ declare(strict_types=1); namespace In2code\Lux\Utility; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Http\ApplicationType; class EnvironmentUtility @@ -13,6 +14,10 @@ class EnvironmentUtility */ public static function isFrontend(): bool { + if (isset($GLOBALS['TYPO3_REQUEST']) === false) { + // E.g. when called from CLI + return false; + } return ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend(); } @@ -22,6 +27,15 @@ public static function isFrontend(): bool */ public static function isBackend(): bool { + if (isset($GLOBALS['TYPO3_REQUEST']) === false) { + // E.g. when called from CLI + return false; + } return ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend(); } + + public static function isCli(): bool + { + return Environment::isCli(); + } } diff --git a/Documentation/Technical/Changelog/Index.md b/Documentation/Technical/Changelog/Index.md index 46ec45b1..a557649b 100644 --- a/Documentation/Technical/Changelog/Index.md +++ b/Documentation/Technical/Changelog/Index.md @@ -31,6 +31,7 @@ Double check if you have cleared all caches after installing a new LUX version t | Version | Date | State | TYPO3 | Description | |------------|------------|----------|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 36.1.1 | 2024-08-01 | Bugfix | `11.5 + 12.4` | Use site.identifier instead of websiteTitle in all filters, fix possible exception on CLI commands, increase field size of attribute.value, fix small typo in docs | | 36.1.0 | 2024-07-31 | Task | `11.5 + 12.4` | Add a bunch of onetime mail domains to configuration, rename virtual page request to event tracking requests | | 36.0.0 | 2024-07-28 | Feature | `11.5 + 12.4` | Add push service for virtual page visits or search usage (via JavaScript) | | 35.11.0 | 2024-07-25 | Feature | `11.5 + 12.4` | Add {file} variable in Email4LinkMail.html email template for a better extendability | diff --git a/Documentation/Technical/Identification/Index.md b/Documentation/Technical/Identification/Index.md index b4c9f028..04e7bf90 100644 --- a/Documentation/Technical/Identification/Index.md +++ b/Documentation/Technical/Identification/Index.md @@ -164,7 +164,7 @@ lib.lux.settings { 0 = email 1 = *[email] 2 = *[e-mail] - 2 = *[e_mail] + 3 = *[e_mail] } firstname { 0 = firstname diff --git a/Resources/Private/Partials/Filter/Analysis/Content.html b/Resources/Private/Partials/Filter/Analysis/Content.html index 6f40961d..76bf4470 100644 --- a/Resources/Private/Partials/Filter/Analysis/Content.html +++ b/Resources/Private/Partials/Filter/Analysis/Content.html @@ -29,7 +29,7 @@