removed country_id#14713
Conversation
|
By doing that, you'll be crashing the delete countries and delete zones from both controllers, since the |
|
These two function are only used here: |
|
As for the zones, not sure if this has been modified because it was unnecessary, since the |
|
See also this issue: #14715 |
|
Won't work without removing the |
|
It will also affect all the countries from the controller when the language ID will only be parametered to delete and, surely, it's not what we want to happen. |
|
Issue: #14715 will be fixed with this edit, however this function (https://github.com/opencart/opencart/blob/master/upload/admin/controller/localisation/country.php#L499) will crash. I think it needs more work for (https://github.com/opencart/opencart/blob/master/upload/admin/controller/localisation/country.php#L499) because I cannot understand why we should skip the hard-coded "en-gb" for removing a country, while its other translations would be deleted without a warning. What I mean is that we are deleting a country and we are already checking whether its set to anything or not. So, if it passes the checks we can remove it including all languages related to that country. So why keep the 'en-gb'? |
|
Because en-gb is the default language of the platform and deleting that language would require manual re-insert for people who may want to reuse that language if not ending up doing a fresh install all over again. As for setting up a headsup for other languages, that could be ideal though. |
|
Ok I just checked https://github.com/opencart/opencart/blob/master/upload/admin/controller/localisation/country.php#L499. It has more issues at the moment than we anticipated. some functions needs to get renamed eg: Furthermore, I believe that when deleting a country, all its related languages must be also removed. If people plan to re-use the deleted country they must manually re-insert its information. Opencart is not responsible for keeping track of deleted information by user. Also another reason for this, is that when the language of admin section is other than 'en-gb', then the country will not be deleted completely and when the user tries to edit it, no information would be set in the form fields because the |
|
I just fixes some of these bugs with the new edits: The skipping of 'en-gb' unchanged. |
removed country_id from the function as it was unnecessary.