8 – How to Fix Ajax Errors in Drupal?

I have a site with Drupal 8.6.8 and the Merchant and Group modules.

It has been a few months since I have ajax error and can not be corrected. I hope to find help here.

With Drupal Commerce I have a blank page when ordering and this error in the logs:

Enter php
Date Mercredi, February 13, 2019 - 18:16
Utilizer administrator
Place https://dev.domaine.com/fr/checkout/49/order_information?_wrapper_format=drupal_ajax&ajax_form=1
Référent https://dev.domaine.com/fr/admin/reports/dblog/event/14991
Message TypeError: Argument 2 passed to Drupal  commerce_shipping  PackerManager :: packToShipments () must implement the Drupal  profile  Entity  ProfileInterface interface. Commerce_shipping / src / ShipmentOrderProcessor.php on line 55 in Drupal  Commerce_shipping  PackerManager-> packToShipments () (line 70 of /var/www/dev-domaine-com/web/modules/contrib/commerce_shipping/src/PackerManager.php) # 0 /var/www/dev-domaine-com/web/modules/contrib/commerce_shipping/src/ShipmentOrderProcessor.php (55): Drupal  commerce_shipping  PackerManager-> packToShipments (Object (Drupal  commerce_order  Order), NULL, Array) # 1 /var/www/dev-domaine-com/web/modules/contrib/commerce/modules/order/src/OrderRefresh.php (155): Drupal  commerce_shipping  ShipmentOrderProcessor-> process (Object (Drupal  commerce_order  Entity  Order)) # 2 /var/www/dev-domaine-com/web/modules/contrib/commerce/modules/order/src/OrderStorage.php (119): Drupal  commerce_order  OrderRefresh-> Refresh (Object (Drupal  commerce_order  Entity  Order)) # 3 /var/www/dev-domaine-com/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(100): Drupal  commerce_order  OrderStorage-> doOrderPreSave (Object (Drupal  commerce_order  Entity  Order)) # 4 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/EntityStorageBase.php (472): Drupal  commerce_order  OrderStorage-> invokeHook (# Presave #, Object (Drupal  commerce_order  Entity  Order)) # 5 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / EntityStorageBase. php (630): Drupal  Core  Entity  EntityStorageBase-> doPreSave (Object (Drupal  commerce_order  Entity  Order)) # 6 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Entity / EntityStorageBase.php (426): Drupal  Core  Entity  ContentEntityStorageBase-> doPreSave (Object (Drupal  commerce_order  Entity  Order)) # 7 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Entity / Sql / SqlContentEntityStorage.php (774): Drupal  Core  Entity  EntityStorageBase-> save (Object (Drupal  commerce_order  Entity  Order)) # 8 / v ar / www / dev-domaine-com / web / core / lib / Drupal / Core / Entity / Entity.php (390): Drupal  Core  Entity  Sql  SqlContentEntityStorage-> save (Object (Drupal  commerce_order  Entity  Order)) # 9 / var / www / dev-domaine-com / web / modules / contrib / commerce / modules / order / src / OrderStorage.php (152): Drupal  Core  Entity  Entity-> save () # 10 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Entity / EntityStorageBase.php (286): Drupal  commerce_order  OrderStorage-> postLoad (Array) # 11 / var / www / dev -domain-com / web / core / lib / Drupal / Core / Entity / EntityStorageBase.php (249): Drupal  Core  Entity  EntityStorageBase-> loadMultiple (Array) # 12 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / ParamConverter / EntityConverter.php (103): Drupal  Core  Entity  EntityStorageBase-> load (& # 39; 49 & # 39;) # 13 / var / www / dev-domain-com / web / core /modules/content_moderation/src/ParamConverter/EntityRevisionConverter.php(27 ): Drupal  Core  ParamConverter  EntityConverter-> convert (& # 39; 49 & # 39 ;, Array , & # 39; commerce_order & # 39 ;, array) # 14 / var / www / dev-domaine-en / web / core / lib / Drupal / Core / ParamC onverter / ParamConverterManager.php (100): Drupal  content_moderation  ParamConverter  EntityRevisionConverter-> convert (# 39; array, # commerce_order #, array) # 15 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Routing /Enhancer/ParamConversionEnhancer.php (45): Drupal  Core  ParamConverter  ParamConverterManager-> convert (Array) # 16 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Routing / Router. php (260): Drupal  Core  Routing  Enhancer  ParamConversionEnhancer-> Enhanced (Array, Object (Symfony  Component  HttpFoundation  Request)) # 17 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Routing / Router.php (131): Drupal  Core  Routing  Router-> applyRouteEnhancers (Array, Object (Symfony  Component  HttpFoundation  Request)) # 18 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Routing / AccessAwareRouter.php (90): Drupal  Core  Routing  Router-> matchRequest (object (Symfony  Component  HttpFoundation  Request)) # 19 / var / www / dev-domaine-com / vendor / symfony / http-kernel / EventListener / RouterListener.php (115): Drupal  Core  Routing  A ccessAwareRouter-> matchRequest (Object (Symfony  Component  HttpFoundation  Request)) # 20 [internal function]: Symfony  Component  HttpKernel  EventListener  RouterListener-> onKernelRequest (Object (Symfony  Component  HttpKernel  Event  GetResponseEvent), & nb;; kernel.request & nbsp ;, Object (Drupal  Component  EventDispatcher  ContainerAwareEventDispay) / / dev-domaine-com / web / core / lib / Drupal / Component / EventDispatcher / ContainerAwareEventDispatcher.php (111): call_user_func (Array, Object (Symfony  Component  HttpKernel  Event  GetResponseEvent), & # 39; kernel.request & #; 39 ;, (Drupal  Component  EventDispatcher  ContainerAwareEventDispatcher)) # 22 /var/www/dev-domaine-com/vendor/symfony/http-kernel/HttpKernel.php (127): Drupal  Component  EventDispatcher  ContainerAwareEventDispatcher-> kernel.request #, Object (Symfony  Component  HttpKernel  Event  GetResponseEvent) # 23 /var/www/dev-domaine-com/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony  Component  HttpKernel  HttpKernel-> handleRaw (object (Symfony  Component  HttpFoundation  Request), 1) # 24 / va r / www / dev-domaine-com / web / core / lib / Drupal / Core / StackMiddleware / Sessi on.php (57): Symfony  Component  HttpKernel  HttpKernel-> Handle (Object (Symfony  Component  HttpFoundation  Request ), 1, true) # 25 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / StackMiddleware / KernelPreHandle.php (47): Drupal  Core  StackMiddleware  Session-> Handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 26 / var / www / devdomaina- com / web / core / modules / page_cache / src / StackMiddleware / PageCache.php (99): Drupal  Core  StackMiddleware  KernelPreHandle-> handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 27 /var/www/dev-domaine-com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php (78): Drupal  page_cache  StackMiddleware  PageCache-> pass (object (Symfony  Component  HttpFoundation  Request), 1, true) # 28 / var / www / dev-domaine-com / web / core / modules / ban /src/BanMiddleware.php(50): D rupal  page_cache  StackMiddleware  PageCache-> handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 29 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / StackMiddleware / ReverseProxyM iddleware.php (47): Drupal  ban  BanMiddleware-> handle (object (Symfony  Component  HttpFoundation  Request), 1, true) # 30 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / StackMiddleware / NegotiationMiddleware.php (52): Drupal  Core  StackMiddleware  ReverseProxyMiddleware-> handle (object (Symfony  Component  HttpFoundation  Request), 1, true) # 31 / var / www / dev- domaine-de / vendor / stack / builder / src / Stack / StackedHttpKernel.php (23): Drupal  Core  StackMiddleware  NegotiationMiddleware-> handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 32 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / DrupalKernel.php (693): Stack  StackedHttpKernel-> handle (object (Symfony  Co mponent  HttpFoundation  Request), 1, true) # 33 / var / www / dev-domaine-com / web / index.php (19): Drupal  Core  DrupalKernel-> Handle (Object (Symfony  Component  HttpFoundation  Request)) # 34 {main}.
Meaning Erreur
Nom d & hôte xxx.xxx.xxx.xxx
operations

In the group module, I applied the following patch:

https://www.drupal.org/project/group/issues/2813405

If I add a node to a group nothing happens and I have this error in the logs:

Enter php
Date Mercredi, February 13, 2019 - 18:06
Utilizer administrator
Place https://dev.domaine.com/fr/checkout/49/order_information?_wrapper_format=drupal_ajax&_wrapper_format=drupal_ajax&ajax_form=1
Référent https://dev.domaine.com/fr/checkout/49/order_information
Message Error: call to a member function isNew () null in Drupal  Core  Field  Plugin  Field  FieldType  EntityReferenceItem-> setValue () (line 197 of / var / www / dev-domaine-com / web / core) /lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php) # 0 / var / www / dev-domaine-com / web / modules / contrib / entity_reference_revisions / src / Plugin / Field / Field Type / EntityReferenceRevisionsItem. php (162): Drupal  Core  Field  Plugin  Field  FieldType  EntityReferenceItem-> setValue (Array, false) # 1 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / TypedData /TypedDataManager.php(200): Drupal  entity_reference_revisions  Plugin  Field  FieldType  EntityReferenceRevisionsItem-> setValue (Array, false) # 2 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Field / FieldTypePluginManager.php (82): Drupal  Core  TypedData  TypedDataManager-> getPropertyInstance (Object (Drupal  entity_reference_revisions  EntityReferenceRevisionsFieldItemList), 0, Array) # 3 / var / www / dev-domaine-com / lib / Drupal / Core / Field / FieldItemList.php (4 1): Drupal  Core  Field  FieldTypePluginManager-> createFieldItem (Object (Drupal  entity_reference_revisions  EntityReferenceRevisionsFieldItemList), 0, Array) # 4 / var / www / dev-domaine-com / core / lib / Drupal / Core / TypedData / Plugin / DataType / ItemList.php (66): Drupal  Core  Field  FieldItemList-> createItem (0, Array) # 5 / var / www / dev-domaine-DE / web / core / lib / Drupal / Core /Field/FieldItemList.php(107): Drupal  Core  TypedData  Plugin  DataType  ItemList-> setValue (Array, false) # 6 / var / www / dev-domaine-en / web / core / lib / Drupal / Core / TypedData / TypedDataManager.php (200): Drupal  Core  Field  FieldItemList-> setValue (Array, false) # 7 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Field /FieldTypePluginManager.php(74): Drupal  Core  TypedData  TypedDataManager > getPropertyInstance (Object (Drupal  Core  Entity  Plugin  DataType  EntityAdapter), & # 39; shipping_profil ... & # 39 ;, Array) # 8 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / Entity / ContentEntityBase.php (603): Drupal  Core  Field  FieldTypePluginManager-> createFieldItemList (Object (D rupal  commerce_shipping  Entity  Shipment), & # 39; shipping_profil ... & # 39; , Array) # 9 / var / www / dev-domaine-com / web / cor e / lib / Drupal / Core / Entity / ContentEntityBase.php (567): Drupal  Core  Entity  ContentEntityBase-> getTranslatedField (& # 39; shipping_profil ... & # 39 ;, x # default & # 39; ;) # 10 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / EntityBase .php (638): Drupal  Core  Entity  ContentEntityBase-> get (& # 39; shipping_profile .. . & # 39;) # 11 / var / www / dev-domaine-DE / web / core / lib / Drupal / Core / EntityBase.php (661): Drupal  Core  Entity  ContentEntityBase-> getFields () # 12 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/Entity/EntityFormDisplay.php(223): Drupal  Core  Entity  ContentEntityBase-> getIterator () # 13 / var / www / dev -domain-com / web / modules / contrib / commerce_shipping / src / Plugin / Commerce / CheckoutPane / ShippingInformation.php (300): Drupal  Core  Entity  Entity  EntityFormDisplay-> extractFormValues ​​(Object (Drupal  commerce_shipping  Entity  Shipment), Array, Object (Drupal  Core  Form  FormState)) # 14 / var / www / dev-domain E-Co m / Web / Modules / Contrib / Commerce / Modules / Checkout / src / Plugin / Commerce / CheckoutFlowWithPanesBase.php (590): Drupal  Commerce_shipping  Plugin  Commerce  CheckoutPane  ShippingInformation-> validatePaneForm (Array, Object (Drupal  Core  Form  FormState), Array) # 15 [internal function]: Drupal  commerce_checkout  Plugin  Commerce  CheckoutFlow  CheckoutFlowWithPanesBase-> validateForm (Array, Object (Drupal  Core  Form  FormState)) # 16 / var / www / dev-domaine-DE / web / core / lib / Drupal / Core / Form / FormValidator.php (82): call_user_func_array (Array, Array) # 17 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/Form/FormValidator.php(275): Drupal  Core  Form  FormValidator-> executeValidateHandlers (Array, Object (Drupal  Core  Form  FormState)) # 18 / var / www / dev-domaine-DE / web / core / lib / Drupal / Core / FormValidator. php (118): Drupal  Core  Form  FormValidator-> doValidateForm (Array, Object (Drupal  Core  Form  FormState), & # 39; commerce_checko ... & # 39;) # 19 / var / www / dev -domaine-com / web /core/lib/Drupal/Core/Form/FormBuilder.php(575): Drupal  Core  Form  FormValidator-> validateForm (& # 39; commerce_checko ... & # 39 ;, array, Object (Drupal  Core  Form  FormState)) # 20 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/Form/FormBuilder.php(318): Drupal  Core  Form  FormBuilder -> processForm (& # 39; commerce_checko ... & # 39 ;, Array, Object (Drupal  Core  Form  FormState)) # 21 / var / www / dev-domain-com / web / core / lib / Drupal /Core/Form/FormBuilder.php(216): Drupal  Core  Form  FormBuilder-> buildForm (& # 39; commerce_checko ... & # 39 ;, Object (Drupal  Core  Form  FormState)) # 22 / var / www / dev-domaine-com / web / modules / contrib / commerce / modules / checkout / src / Controller / CheckoutController.php (94): Drupal  Core  Form  FormBuilder-> getForm (Object (Drupal  commerce_checkout  plugin  Commerce  CheckoutFlow  MultistepDefault), & # 39; order_informati ... & # 39;) # 23 [internal function]: Drupal  commerce_checkout  Controller  CheckoutController-> formPage (Object (Drupal  Core  Routing  RouteMatch)) # 24 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / EventSubscriber / EarlyRenderingControllerWrapperSubscriber. php (123): call_user_func_array (Array, Array) # 25 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal  Core  EventSubscriber  EarlyRenderingControllerWrapperSubscriber -> Drupal  Core  EventSubscriber  {Close} () # 26 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal  Core  Render  Renderer-> executeInRenderContext (Object (Drupal  Core  Render  RenderContext), Object (Close)) # 27 /var/www/dev-domaine-com/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php (97): Drupal  Core  EventSubscriber  EarlyRenderingControllerWrapperSubscriber-> wrapControllerExecutionInRenderContext (Array, Array) # 28 / var / www / dev-domaine-DE / vendor / symfony / http-kernel / HttpKernel. Php (151): Drupal  Core  EventSubscriber  EarlyRenderingControllerWrapperSubscriber-> Drupal  Core  EventSubscriber  {Close} () # 29 /var/www/dev-domaine-com/vendor/symfony/http-kernel/HttpKernel.php ( 68): Symfony  Component  HttpKernel  HttpKernel-> handleRaw (object (Symfony  Component  HttpFoundation  Request), 1) # 30 / var / www / dev-domaine-DE / web / core / lib / Drupal / Core / StackMiddleware / Session.php (57): Symfony  Component  HttpKernel  HttpKernel-> Handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 31 / var / www / dev-domaine-com / web / core / lib / Drupal / Core / StackMiddleware / KernelPreHandle.php (47): Drupal  Core  StackMiddleware  Session-> Handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 32 / var / www / dev-domaine-com / web / core / modules / page_cache / src / StackMiddleware / PageCache.php (99): Drupal  Core  StackMiddleware  KernelPreHandle-> handle (object (Symfony  Comp onent  HttpFoundation  Request), 1, true) # 33 /var/www/dev-domaine-com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php (78): Drup al  page_cache  StackMiddleware  PageCache-> pass (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 34 / var / www / dev-domaine-DE / web / core / modules / ban / src / BanMiddleware .php (50): Drupal  page_cache  StackMiddleware  PageCache-> handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 35 / var / www / dev-domaine-DE / web / core / lib / Drupal / Core / StackMiddleware /ReverseProxyMiddleware.php (47): Drupal  ban  BanMiddleware-> handle (object (Symfony  Component  HttpFoundation  Request), 1, true) # 36 / var / www / dev-domaine-com / web / core / lib /Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal  Core  StackMiddleware  ReverseProxyMiddleware-> handle (object (Symfony  Component  HttpFoundation  Request), 1, true) # 37 / var / www / dev-domaine -com / vendor / stack / buil the / src / Stack / StackedHttpKernel.php (23): Drupal  Core  StackMiddleware  NegotiationMiddleware-> handle (object (Symfony  Component  HttpFoundation  Request), 1, true) # 38 / var / www / dev-domaine- com / web / core / lib / Drupal / Core / DrupalKernel.php (693): Stack  Stacked HttpKernel-> handle (Object (Symfony  Component  HttpFoundation  Request), 1, true) # 39 / var / www / dev -domaine-com / web / index.php (19): Drupal  Core  DrupalKernel-> (object (Symfony  Component  HttpFoundation  Request)) # 40 {main}.
Meaning Erreur
Nom d & hôte xxx.xxx.xxx.xxx
operations