magento2-regenurl
magento2-regenurl copied to clipboard
Exception M 2.1.6: Area code is already set.
Regenerating Magento 2.1.6 Image cache by running command bin/magento catalog:images:resize
leads to the following exception with this module enabled:
[Magento\Framework\Exception\LocalizedException]
Area code is already set
catalog:images:resize
Simply deactivate bin/magento module:disable Iazel_RegenProductUrl
and the resize prozess proceeds.
Confirming
Some insight into the issue. https://github.com/magento/magento2/issues/5285 Looks like it's due to the setAreaCode being used within the constructor of the module
Yup, works without setAreaCode('adminhtml') and I don't see any point for it since it is always run from CLI
See PR #15 for fixed version
This is fixed in my fork, amongst other issues https://github.com/peterjaap/magento2-regenurl