I am investigating a bug that is occurring in a Magento 2.4.4 Commerce project.
The bug occurs when the following steps are performed:
- Editing an address on my profile page.
- Checking out by selecting any shipping address.
- After the checkout is completed, whether it is successful or not, a new address record, as edited above, suddenly appears in the customer_address_entity table.
- The columns default_billing and default_shipping in the customer_entity table now contain the values of the newly created address record.
I have attempted various debugging methods to identify the cause of this issue. Initially, I added a log to the file extended from MagentoCheckoutModelPaymentInformationManagement
. The file path is GShopIpay88EppPluginCheckoutModelPaymentInformationManagement
. However, it became apparent that the address was already created before this point.
Subsequently, I attempted debugging by adding logs inside the vendor file located at MagentoCheckoutModelPaymentInformationManagement
for testing purposes. The logs indicated that the redundant address was not created only during the construct phase; rather, it was being stored throughout various functions.
I also explored other troubleshooting techniques, such as checking if the customer address list is accessed when the customer clicks on place-order.js through an Ajax call. However, I encountered an issue where the called link appeared to be a not found URL.
Additionally, I attempted to add an observer, but it seemed that the event observer was not being triggered. The events I tried were checkout_submit_all_after and sales_order_save_after.