cancel
Showing results for 
Search instead for 
Did you mean: 

Delete operation is forbidden for current area

Highlighted

Delete operation is forbidden for current area

Estimados necesito su ayuda para este error

Quiero agregar los campos de direccion en mi formulario de nuevo cliente pero al querer guardar me aparese el error Delete operation is forbidden for current area, como puedo solucionarlo e probado agregando lineas en mi controlador

 

\Magento\Framework\Registry $registry,

$this->registry->register('isSecureArea', true,true);

 

pero aun asi no puedo saltar la validacion que me falta o estoy haciendo las cosas mal, no soy muy experto en magento por favor su ayuda

 

Utilizo magento 2.3.2 y php 7.2

 

Saludos

5 REPLIES 5
Highlighted

Re: Delete operation is forbidden for current area

@andres _aguiler Magento by default provide the address fields.

 

You can enable them using the below link.

https://magento.stackexchange.com/questions/105988/magento-2-how-to-show-address-field-in-registrati...

 

Thanks

Highlighted

Re: Delete operation is forbidden for current area

@rahul Gupta  Hello and thanks for your answer but I have done both cases but clicking on the button saves me the error. What interests me is to skip the validation correctly or fix this

Highlighted

Re: Delete operation is forbidden for current area

@andres _aguiler try to leave Street field blank and then create the customer and let me know if you are getting the same error.

 

Thanks

Highlighted

Re: Delete operation is forbidden for current area

@rahul Gupta  friend I keep the same error, I have left all the fields reacted to the address as not mandatory, the other is that the client is created but leave the error in the frontend

Highlighted

Re: Delete operation is forbidden for current area

I know this is old, but I wanted to share my case and solution:

  • We wanted to add address fields in the registration form
  • These fields would appear after clicking a checkbox
  • When the fields were complete, the registration would go fine
  • If we didn't click on the checkbox (so no address would be saved), we got the same error

I think the problem arrived because we were including the address fields inside the <form> registration. If these fields were not completed, then the form would throw that error.

 

We ended up creating some javascript to dynamically add/remove the address fields. Probably Magento shows the error because there is a field called:

<input type="hidden" name="create_address" value="1"/>

Which might indicate to Magento that the address field has to be created. But if the fields are empty... it throws the error.