apigee / apigee-m10n-drupal

Add monetization features to a Drupal developer portal
https://www.drupal.org/project/apigee_m10n
GNU General Public License v2.0
13 stars 13 forks source link

Javascript 404 error for non-admin users #371

Closed vanberge closed 2 years ago

vanberge commented 2 years ago

Description

When using Apigee Monetization as an administrator, the functionality is as expected. However, when using a "normal" user account, the Monetization addon throws a javascript 404 error.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Sign in as non-administrator account
  2. Make call to Apigee monetization

Actual Behavior

Receive 404 code on javascript as noted in screenshot

Expected Behavior

Would expect all users to be able to execute this workflow, not just administrators

Screenshots

image

Notes

Tried both incognito and standard browser windows. Reviewed Apigee Monetization Permissions for Authenticated user vs. Administrator, but no clear path to resolution

Version Info

Drupal core 9.3.9 Apigee Monetization v2.0.1

phdhiren commented 2 years ago

@vanberge

It seems you need to rebuild compressed javascript or disable that. Clearing the cache should help. Let me know if it works.

vanberge commented 2 years ago

@phdhiren we did "Flush all caches" from the portal and still saw the same problem persist

phdhiren commented 2 years ago

@vanberge Can you disable 'Aggregate JavaScript files' from the Performance page, to identify which javascript is causing this error. Also, can you please confirm which page / action leads to 404 javascript error?

phdhiren commented 2 years ago

@vanberge

Disabling 'Aggregate JavaScript files' from the Performance page will help identify which module is causing the error.

Check the permission Manage own payment methods for authenticated users, if that doesn't help check the original issue queue of commerce payment module.

(The functionality belongs to another open source plugin i.e. commerce module, you can ask for help at issue queue in payment category on Drupal.org)

vanberge commented 2 years ago

@phdhiren we have enabled the manage own payment methods permission for authenticated users, and the same error persist. I will work with the developers to disable aggregate javascript files. Could you elaborate on how/where to continue troubleshooting after that has been executed?

Also, I will point out that this works as designed when it is an admin user. So, I am not certain that makes the functionality / bug on commerce module still a possibility.

vanberge commented 2 years ago

Thanks for your help @phdhiren, Confirmed that the javascript aggregation disable fixed the issue.