Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Allow running the command once again #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewhowdencom
Copy link

Recently, Magneto was modified such that it throws an exception if the
area is modified during application runtime, if it has been set
previously. This extension sets it prior to regenerating the URLs.

Additional work attempted to repair this change by checking if the area
code was set. However, this has not functioned as expected (at least in
the most recent version of Magento), as Magento throws an exception on
querying an area code that has not already been set.

This commit modifies the setter such that it attempts to set the
application state during runtime, and on failure, preserves it as is.
This allows upstream to make the decision as to what state should be
set, but provides a sane fallback in the case it does not.

@andrewhowdencom
Copy link
Author

Still testing this on fork

@andrewhowdencom
Copy link
Author

lol there's a derp

Recently, Magneto was modified such that it throws an exception if the
area is modified during application runtime, if it has been set
previously. This extension sets it prior to regenerating the URLs.

Additional work attempted to repair this change by checking if the area
code was set. However, this has not functioned as expected (at least in
the most recent version of Magento), as Magento throws an exception on
querying an area code that has not already been set.

This commit modifies the setter such that it attempts to set the
application state during runtime, and on failure, preserves it as is.
This allows upstream to make the decision as to what state should be
set, but provides a sane fallback in the case it does not.
@andrewhowdencom
Copy link
Author

I am at least 75% sure this works. I will check it again tomorrow

@andrewhowdencom
Copy link
Author

Yah seems fine

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

Successfully merging this pull request may close these issues.

1 participant