Magento 2 Private Sale and Flash Sales Extension v4.x Troubleshooting

Troubleshooting

Issue: If you experience an issue with “di compile” while installing Magento 2 Private Sales and Flash Sales Extension v4.x, this may be due to the following error:

Fatal error: Class 'MagentoCatalogControllerAdminhtmlCategoryImageUpload' not found in app/code/Plumrocket/PrivateSale/Controller/Adminhtml/Category/Image/Upload.php

Solution:

In order to fix this issue go to file:

/app/code/Plumrocket/PrivateSale/Controller/Adminhtml/Category/Image/Upload.php

and change the following code:

/**
 * Class Upload
 */
class Upload extends MagentoCatalogControllerAdminhtmlCategoryImageUpload

to:

if (class_exists('MagentoCatalogControllerAdminhtmlCategoryImageUpload')) {
    class InterimClass extends MagentoCatalogControllerAdminhtmlCategoryImageUpload {
        public function execute() {}
    }
} else {
    class InterimClass extends MagentoBackendAppAction{
        public function execute() {}
    }
}
/**
 * Class Upload
 */
class Upload extends InterimClass

Save your changes and start compilation process from the beginning.

Was this article helpful?