Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Error on categories that have virtual rules on frontend and admin after disabling module #471

Closed
aaronware opened this issue Jul 19, 2017 · 2 comments
Labels

Comments

@aaronware
Copy link

Apply a virtual rule for a category based on at least 1 attribute

Preconditions

Magento Version : 2.1.7
ElasticSuite Version : 2.3^
Environment : Developer

Steps to reproduce

  1. Select Category
  2. Apply Virtual Rule based on at least one or more attributes, including an ALL condition
  3. Disable module completely without removing virtual category on the category.

Expected result

  1. Module falls back to default functionality.

Actual result

Strange 500 error

#44 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#45 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#46 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#47 /var/www/html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#48 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#49 /var/www/html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#50 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#51 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#52 /var/www/html/index.php(38): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

@aaronware
Copy link
Author

Actually this was due to a trigger not being fired I think. Not going to close yet but I may shortly.

@romainruaud
Copy link
Collaborator

romainruaud commented Jul 19, 2017

Hello @aaronware

You did not pase the complete stacktrace (only after line 44)

However, this is clear for me that de-activating the module after having set Virtual Rule data to a category cannot suceed properly (Magento does not know how to load the rule if the module containing the backend model for this attribute).

Since Magento does not provide any hook / capabilities here to check if a given attribute model is linked to a particular module, this is a "wont fix" for me.

We provide an uninstall guide for such cases (since Magento does not even propose a hook called when uninstalling a module) : https://github.com/Smile-SA/elasticsuite/wiki/ModuleUninstall

I close the issue for now, but feel free to reopen it if needed.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants