View Issue Details

IDProjectCategoryView StatusLast Update
0007881OXID eShop (all versions)4.07. Source code, Testpublic2026-01-09 16:54
Reportermichael_keiluweit Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version7.4.0 
Summary0007881: ContentFactory bypasses module chain by using concrete Community namespace instead of Unified Namespace
DescriptionThe 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 Reproduce1. 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
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

There are no notes attached to this issue.