View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007881 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2026-01-09 16:53 | 2026-01-09 16:54 |
| Reporter | michael_keiluweit | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 7.4.0 | ||||
| Summary | 0007881: ContentFactory bypasses module chain by using concrete Community namespace instead of Unified Namespace | ||||
| Description | The ContentFactory class in OxidEsales\EshopCommunity\Internal\Transition\Adapter\TemplateLogic uses the concrete Community Edition class directly instead of the Unified Namespace. This causes the module chain to be completely bypassed when using {% include_content %} in Twig templates. Modules that extend OxidEsales\Eshop\Application\Model\Content are not loaded when content is rendered via the Twig function. **Affected file:** vendor/oxid-esales/oxideshop-ce/source/Internal/Transition/Adapter/TemplateLogic/ContentFactory.php **Current (incorrect) code:**
use OxidEsales\EshopCommunity\Application\Model\Content;
class ContentFactory
{
public function getContent(string $key, string $value): ?Content
{
$content = oxNew(Content::class);
// ...
}
}
**Expected (correct) code:**
use OxidEsales\Eshop\Application\Model\Content;
class ContentFactory
{
public function getContent(string $key, string $value): ?Content
{
$content = oxNew(Content::class);
// ...
}
}
| ||||
| Steps To Reproduce | 1. Create a module that extends OxidEsales\Eshop\Application\Model\Content 2. Add debug output to the extended class:
// metadata.php
'extend' => [
\OxidEsales\Eshop\Application\Model\Content::class => MyModule\Model\Content::class,
]
// MyModule/Model/Content.php
class Content extends Content_parent
{
public function loadByIdent($sLoadId, $onlyActive = false)
{
echo "Module loaded!";
return parent::loadByIdent($sLoadId, $onlyActive);
}
}
3. Create a Twig template with:
{% include_content "oxforgotpwd" ignore missing %}
4. Call the template in the frontend **Expected result:** "Module loaded!" is displayed - module chain is used **Actual result:** No output - module chain is bypassed, original Content class is used directly | ||||
| Tags | No tags attached. | ||||
| Theme | Not defined | ||||
| Browser | Not defined | ||||
| PHP Version | Not defined | ||||
| Database Version | Not defined | ||||