View Issue Details

IDProjectCategoryView StatusLast Update
0007122OXID eShop (all versions)2.3. Extensions (modules, themes)public2024-07-17 15:06
Reporterleofonic Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Product Version6.2.0 
Summary0007122: Module translations are not available in onactivate method
DescriptionI use module translations in onactivate method to create some language specific database entries. This doesn't work anymore because translations are no longer available during activation.
Steps To Reproduce1. Open the file source/modules/oe/gdproptin/Core/GdprOptinModule.php
2. Add this line in the onActivate method:
    var_dump(\OxidEsales\EshopCommunity\Core\Registry::getLang()->translateString('OEGDPROPTIN_STORE_DELIVERY_ADDRESS', 0, false));
3. Activate the GDPR Opt-in module and inspect the output.

In Oxid 6.1.5 Output is the translated string.
In Oxid 6.2.0 Output is 'OEGDPROPTIN_STORE_DELIVERY_ADDRESS'
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

SvenBrunk

2024-06-12 15:52

administrator   ~0017028

@leofonic: Would you please elaborate a bit on your use case? Although we can think of multiple ways to solve this, it heavily depends on what exactly you are trying.

SvenBrunk

2024-07-17 15:06

administrator   ~0017263

Due to missing response, I will close this ticket. Please re-open in case you have new feedback.