X hide

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

From Plumrocket Documentation

You are viewing:  Private-sale-icon-32.png  Private Sales & Flash Sales v4.x

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 'Magento\Catalog\Controller\Adminhtml\Category\Image\Upload' 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 \Magento\Catalog\Controller\Adminhtml\Category\Image\Upload

to:

if (class_exists('\Magento\Catalog\Controller\Adminhtml\Category\Image\Upload')) {
class InterimClass extends \Magento\Catalog\Controller\Adminhtml\Category\Image\Upload
{
public function execute() {}
}
} else {
class InterimClass extends \Magento\Backend\App\Action
{
public function execute() {}
}
}
/**
* Class Upload
*/
class Upload extends InterimClass


Save your changes and start compilation process from the beginning.

Private Sales Extension for Magento 2 Private Sales Extension for Magento 2

Buy Magento 2 Private Sales Extension on Plumrocket Store
Click below to check key features of this extension, view live demo and screenshots:
Navigation