Problem/Motivation

When a user has the role "OCI checkout", he cannot put more than one item into the cart.

Steps to reproduce

Created two users with identical settings (f-K, f-S), except one (f-S) got the role "OCI checkout" assigned. While f-K can put as many items as needed into his cart, f-S has only the last item he added to the cart left at checkout.

CommentFileSizeAuthor
#2 3198970.patch1.03 KBeiriksm
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nofue created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

Seems there was a change in a recent version of commerce that introduced this bug for us. Thanks for reporting it!

Here is a patch that I think will fix your problem

nofue’s picture

Wow, you're fast. Thanks for keeping this module current.

nofue’s picture

After patching the module and trying to use the Validator site, the WSOD kicked in.

Inspecting the case with drush ws showed:

  61   19/Feb 08:39   access denied    Warnung    Path: /admin/people.                                                          
                                                  Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'access    
                                                  users overview' permission is required. in                                    
                                                  Drupal\Core\Routing\AccessAwareRouter->checkAcces    

I added this permission to the test_user and retried.
Again the WSOD kicked in, the logs say:

Strike 1:
Path: /admin/reports/dblog. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'access site reports' permission is required. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 117 of /var/www/web29/htdocs/8ch/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).

Strike 2:
Path: /admin/people/permissions. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'administer permissions' permission is required. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 117 of /var/www/web29/htdocs/8ch/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).

Seems there's something odd with permissions going on.

eiriksm’s picture

That does not seem relevant to your wsod. Do you have some error log from your webserver instead? Like apache or nginx?

nofue’s picture

After re-patching all systems go … Great :)

nofue’s picture

Status: Needs review » Reviewed & tested by the community

  • eiriksm committed 0c90b93 on 8.x-1.x
    Issue #3198970 by eiriksm, nofue: Only one product-variation per cart
    
eiriksm’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again, merged the fix.

Will do a new release with the bug fixes recently fixed

nofue’s picture

Wow, you were busy last night … Does this patch rely to
https://www.drupal.org/project/commerce_oci_checkout/issues/3199524
as well?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.