View Issue Details

IDProjectCategoryView StatusLast Update
0007044module Visual CMSmodule Visual CMS - subpublic2019-11-08 10:35
Reporterckurz 
PrioritynormalSeverityfeatureReproducibilityalways
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0007044: PreviewController breaks extension chain
Description   The extension:
    ddoe/VCMS\OxidEsales\VisualCmsModule\Application\Controller\PreviewController

    class PreviewController extends ContentController

    breaks the extension chain in oxid.

    ContentController in this case is \OxidEsales\VisualCmsModule\Application\Controller\ContentController which is itself an oxid extension

    class ContentController extends ContentController_parent

    It is possible that it works in some cases but it's nevertheless incorrect.

    Correct should be:

########<Please see the edit below>########
class PreviewController extends \OxidEsales\Eshop\Application\Controller\ContentController

which makes the both VCMS extensions active.
########</Please see the edit below>########

Edit by QA:
The VCMS\PreviewController inherits from the VCMS\ContentController. So this is completely isolated in the module functionality itself and mostly a decision of the code design.
But best practise would be to inherit from a "parent" and not directly from a controller, therefore you can create a module of a module. So I declare this entry as a feature request, to make the module code more "smooth".

That means:

  class PreviewController extends ContentController

  should be replaced by

  class PreviewController extends PreviewController_parent

and the metadata.php should contain such an entry in the extends array:

  \OxidEsales\VisualCmsModule\Application\Controller\ContentController::class => \OxidEsales\VisualCmsModule\Application\Controller\PreviewController::class,

[end of edit]

TagsNo tags attached.

Activities

QA

2019-11-05 10:55

administrator   ~0013033

-MK