-
Notifications
You must be signed in to change notification settings - Fork 50
Area code is not set #20
Comments
Trying today on Mageno 2.1.7 | PHP 7 Same issue. |
Same error here magento 2.1.8 |
1 similar comment
Same error here magento 2.1.8 |
yeah, 2.1.9, Same issue. |
Confirmed - issue is happening on 2.1.9 too. |
I fix this issure: |
This is fixed in my fork, amongst other issues https://github.com/peterjaap/magento2-regenurl |
@py4762013 & @peterjaap - Could you consider submitting a PR rather than forking an entirely new repo? It would help everyone contribute to a single source and keep things much easier to manage for the community :) TL;DR; - There is a simple fix all the way at the bottom that will alleviate this error. Tracking down the source of the issue - We are running into a problem on the getAreaCode() method inside
Magento will throw an exception if the area code isn't set:
Which makes the The values for
I personally think that the best solution would be to allow for a CLI option to set which TL;DR;For a quick fix, I replaced the conditional check for
With:
And the command proceeded to work without throwing an exception. With all that being said, my URL's still did not regenerate correctly :) |
@dambrogia I would consider it but this repo seems abandoned (10 outstanding pull requests and no sign from the repo owner for months). So it seems like a waste of time. Use my fork instead, that one works. |
I tried to run the regen, but it resulted the following error:
The text was updated successfully, but these errors were encountered: