Problem/Motivation

After a fresh install of latest Drupal Commerce modules whenever I try to edit the default checkout flow, I get the following errors, with mail login version 2+ enabled. If I disable this module, the error goes away.

[error] 1072#1072: *1 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception LogicException: "Settings can not be serialized. This probably means you are serializing an object that has an indirect reference to the Settings object. Adjust your code so that is not necessary." at /xxx/xxx/xxx/core/lib/Drupal/Core/Site/Settings.php line 68" while reading response header from upstream, client: 127.0.0.1, server: xxx.xxx, request: "POST /admin/commerce/config/checkout-flows/manage/default?ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm-one.sock:", host: "xxx.xxx", referrer: "https://xxx.xxx/admin/commerce/config/checkout-flows/manage/default

CommentFileSizeAuthor
#6 mail_login-serialization-3161437-6.patch555 bytessj3
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

authintmedia created an issue. See original summary.

mqanneh’s picture

Status: Active » Postponed (maintainer needs more info)

Please include detailed instructions on how to recreate this error.
Also you might need to create an issue in Drupal commerce since this doesn't seem to be caused by main login module.

authintmedia’s picture

Please include detailed instructions on how to recreate this error.

  1. Install latest Drupal core ^8.9 or ^9.
  2. install Drupal commerce and mail login. I installed all of the modules and core via composer.
  3. Go to Checkout flow and try to edit or create a new one

It gives the above errors in the PHP logs, while in JS console it gives 500 errors.

Also you might need to create an issue in Drupal commerce since this doesn't seem to be caused by main login module.

I have already created and attached the related issue of the Drupal Commerce to this issue queue. The error goes away, and I'm able to edit checkout flow, properly, if I uninstall this module. With this module enabled, Checkout Flow is not editable.

v8comp’s picture

I can confirm I'm seeing the same thing in Drupal 9.0.2.

I narrowed it down to something added to both the 'login' and 'completion_register' checkout panes in the form but couldn't get any further than that.

mqanneh’s picture

Assigned: Unassigned » mqanneh
Status: Postponed (maintainer needs more info) » Postponed
sj3’s picture

I also ran into this issue. Looks like issue 2896993

I've tried to make a patch to add DependencySerializationTrait to the AuthDecorator service which seems to fix the issue for me.

mqanneh’s picture

Status: Postponed » Needs review
Samba B’s picture

#6 worked for me. This issue gave me nightmares to find what and where went wrong.

  • mqanneh committed a474f6f on 8.x-2.x authored by sj3
    Issue #3161437 by sj3, mqanneh, authintmedia: Incompatible with Drupal...
mqanneh’s picture

Status: Needs review » Fixed
mqanneh’s picture

Status: Fixed » Closed (fixed)
kristofferrom’s picture

Voting to reopen, as I Just had this issue using version 8.x-2.2 and disabling the module made it go away.

abdhomsi’s picture

+1