Symptom
After upgrading to R37 (or later), the Deal Management page keeps loading infinitely. The page never completes loading and users cannot interact with it.
Cause
A custom ProductConfigurationLoadInterceptor (e.g., in SC_DM_Plugin) has a hideConfigurations function that incorrectly hides all DM configurations. This results in param.configurations being blank, which causes checkBasketTotals to run in an infinite loop.
Resolution
Step 1: Open browser Developer Tools
Press F12 to open Developer Tools and check the Console for errors when loading the Deal Management page.
Step 2: Identify custom interceptors
Check if a custom ProductConfigurationLoadInterceptor is registered. Look for SC_DM_Plugin or similar plugin names in the codebase or configuration.
Step 3: Inspect the hideConfigurations function
Locate and review the hideConfigurations function in the custom plugin. Verify that it is not filtering out all configurations.
Step 4: Fix the logic
Update the logic in the hideConfigurations function so that it only hides intended configurations. Ensure that the function does not return or hide all configurations when some should remain visible.
Step 5: Compare environments
Compare behavior between a working environment and the failing one to isolate the difference. Confirm that the custom interceptor logic is consistent across environments.
Step 6: Verify the fix
Reload the Deal Management page and confirm that it loads successfully and that the infinite loop no longer occurs.
Why This Causes an Infinite Loop
The Deal Management plugin system maintains a registry of ProductConfigurationLoadInterceptor functions. When a configuration is loaded, each registered interceptor is evaluated -- if any returns 'hide', that configuration is excluded from the display. When a custom interceptor incorrectly hides all configurations, the resulting empty configuration set causes the basket totals validation (checkBasketTotals) to enter an infinite retry loop because it cannot complete its validation against zero configurations.
Additional Notes
- This issue is specific to custom plugins that implement ProductConfigurationLoadInterceptor. The standard CloudSense package does not cause this behavior.
- When
param.configurationsis blank,checkBasketTotalscannot complete its validation logic and repeatedly retries, causing the infinite loop.
Priyanka Bhotika
Comments