1

I modified register page and added address fields. So, when user register address will be save.

But having this error when try to save customer.

Delete operation is forbidden for current area

When i removed this code - <input name="create_address" value="1" type="hidden">

then customer save but address not save.

But if added this code then above error is showing and redirect to register page.

Any idea guys?

Thanks in advance!

  • Are you sure that's the only thing you did? This error appears when you are trying to delete certain entities from the frontend. The models for which you cannot do a delete action from frontend are category, product, customer, review, order, invoice, credit memo, shipping, store view, store group, website. – Marius Feb 8 '18 at 13:01
  • 1
    Yes,I only modified(re-arrange fields) on the register page and override register page in my custom module. – Indranil Maity Feb 8 '18 at 13:19
  • I have no idea what could have happened, but you can start debugging in Magento\Framework\Model\AbstractModel::beforeDelete. This is the only place where the error message appears in the code. Check what is Magento trying to delete and take ti from there. Or add what you find as details in your question. – Marius Feb 8 '18 at 13:22
0

This error can be realted to PHP compatibility :

  • For Magento 2.3 : PHP 7.1

  • For Magento 2.2 : PHP 7.1 or PHP 7.0

  • For Magento 2.1 : PHP 7.1, PHP 7.0 or PHP 5.6

  • For Magento 2.0 : PHP 7.0, PHP 5.6 or PHP 5.5

Check your PHP version, and upgrade or downgrade PHP if needed.

You will never make Magento 2 works fine without the good version of PHP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.