View Issue Details

IDProjectCategoryView StatusLast Update
0006668OXID eShop (all versions)2.3. Extensions (modules, themes)public2017-11-14 16:02
Reporteraurimas 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.0.0-rc.1 
Target VersionFixed in Version6.0.0 
Summary0006668: in source/admin/oxajax.php ControllerClassNameResolver is not used for resolving container. Can't create custom drag&drop in mod
DescriptionOxid's own drag and drop ajax request containers are resolved by ShopControllerMapProvider in oxNew.
If we want to create our own Ajax controller (as you call container) for work with our own drag and drop we can't, because we cannot pass namespace in parameter and moreover you append _ajax to the 'container' parameter.
A solution would be to use ShopControllerMapProvider and get the class from metadata controllers as in your other frontcontrollers.


Steps To ReproduceCreate new Drag&Drop container without filling \OxidEsales\EshopCommunity\Core\Routing\ShopControllerMapProvider
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionOther
Database VersionNot defined

Relationships

has duplicate 0006711 resolvedrobert blank admin/oxajax.php needs to handle module namespaced ajax container classes 

Activities

smxsm

2017-11-05 18:15

reporter   ~0012257

Unfortunately, I can confirm this, too bad it's alreay open since July since it prevents us from fully porting our modules to v6 ... :( Will this be fixed in the release version?

Here are my findings, as reported on the mailing list:

I get a CLASSNOTFOUND error if I try to open a custom AJAX Popup in the v6 Backend:

[03 Nov 15:54:52.660799 2017] [exception] [type OxidEsales\Eshop\Core\Exception\SystemComponentException] [code 0] [file /var/www/html/oxid6_demo/vendor/oxid-esales/oxideshop-ce/source/Core/UtilsObject.php] [line 238] [message EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND shoptifind_landingpages_ajax]

I am pretty sure I have setup everything correctly in my metadata.php, cause the other 99,9% of the module are working... ;)

$sMetadataVersion = '2.0';

    'controllers' => array(
        'shoptifind_landingpages' => Shoptimax\Shoptifind\Application\Controller\Admin\ShoptifindLandingpages::class,
        'shoptifind_landingpages_ajax'=> Shoptimax\Shoptifind\Application\Controller\Admin\ShoptifindLandingpagesAjax::class,

I've got a namespaced class:

namespace Shoptimax\Shoptifind\Application\Controller\Admin;
/**
 * Ajax component
 */
class ShoptifindLandingpagesAjax extends \OxidEsales\Eshop\Application\Controller\Admin\ListComponentAjax
{

and for all other classes in front- and backend the autoloading etc. is working fine...

"autoload": {
        "psr-4": {
            "Shoptimax\\Shoptifind\\": "../../../source/modules/shoptimax/shoptifind"
        }
    }

So, to me it seems that the "controllers" aliases aren't really available at this stage when trying to load the popup via the "shoptifind_landingpages_ajax" alias...

robert blank

2017-11-14 10:56

reporter   ~0012265

This bug was resolved with this commit:
https://github.com/OXID-eSales/oxideshop_ce/commit/63788d285e5dc411c91f9fe05d2177368049da42