Page 1 of 2

Payment Address Error 1.0.8.14

Posted: Tue May 10, 2022 5:47 am
by radhavallabh
Hi dear all;
When a customer tries to change the address on payment page below address is thrown-

Notice: Undefined index: company in xx/includes/modules/customer_data/cd_company.php on line 102

Fatal error: Uncaught TypeError: Argument 1 passed to Text::input() must be of the type string, null given, called in /xx/includes/modules/customer_data/cd_company.php on line 102 and defined in /xx/includes/system/versioned/1.0.8.2/text.php:34 Stack trace: #0 /xx/includes/modules/customer_data/cd_company.php(102): Text::input(NULL) #1 /xx/includes/system/versioned/1.0.5.6/requirements_manager.php(37): cd_company->process(Array) #2 /xx/includes/system/versioned/1.0.5.6/requirements_manager.php(65): requirements_manager->act_on(Object(cd_company), 'process', Array) #3 /xx/checkout_payment_address.php(29): requirements_manager->process(Array) #4 {main} thrown in /xx/includes/system/versioned/1.0.8.2/text.php on line 34

Please can you help me determine the issue to fix it??

Thanking you in advance;
Very Warm Regds./
radhavallabh

Re: Payment Address Error 1.0.8.14

Posted: Tue May 10, 2022 6:08 am
by ecartz
You could hide it by changing line 102 to

Code: Select all

      $customer_details['company'] = Text::input($_POST['company'] ?? '');
But the default version doesn't do this. So I'm guessing that the actual problem is in the configuration. Some things to check:

1. Is company installed?
2. Is it enabled?
3. Is it assigned to the checkout_new_address under Pages?

Re: Payment Address Error 1.0.8.14

Posted: Tue May 10, 2022 6:38 am
by radhavallabh
ecartz wrote: Tue May 10, 2022 6:08 am You could hide it by changing line 102 to

Code: Select all

      $customer_details['company'] = Text::input($_POST['company'] ?? '');
But the default version doesn't do this. So I'm guessing that the actual problem is in the configuration. Some things to check:

1. Is company installed?
2. Is it enabled?
3. Is it assigned to the checkout_new_address under Pages?
Yes dear
1. Company is installed
2. It is enabled
3. Yes Checkout_new_address assigned

To be more precise there is no error when I change the delivery address on checkout, but error occurs when I change billing address on checkout.

Regds./
radhavallabh

Re: Payment Address Error 1.0.8.14

Posted: Tue May 10, 2022 8:24 am
by radhavallabh
radhavallabh wrote: Tue May 10, 2022 6:38 am
ecartz wrote: Tue May 10, 2022 6:08 am You could hide it by changing line 102 to

Code: Select all

      $customer_details['company'] = Text::input($_POST['company'] ?? '');
But the default version doesn't do this. So I'm guessing that the actual problem is in the configuration. Some things to check:

1. Is company installed?
2. Is it enabled?
3. Is it assigned to the checkout_new_address under Pages?
Yes dear
1. Company is installed
2. It is enabled
3. Yes Checkout_new_address assigned

To be more precise there is no error when I change the delivery address on checkout, but error occurs when I change billing address on checkout.

Regds./
radhavallabh
The fix did not work as it should dear @ecartz as now it is highlighting the same error for country_id so there seems an issue with the checkout_payment_address.php
I also tested on 1.0.8.14 default install dear yet same issue persists....

Re: Payment Address Error 1.0.8.14

Posted: Wed May 11, 2022 3:54 pm
by ecartz
radhavallabh wrote: Tue May 10, 2022 8:24 am I also tested on 1.0.8.14 default install dear yet same issue persists....
It doesn't when I test. So why are you getting different results?

Re: Payment Address Error 1.0.8.14

Posted: Thu May 12, 2022 1:48 am
by radhavallabh
ecartz wrote: Wed May 11, 2022 3:54 pm
radhavallabh wrote: Tue May 10, 2022 8:24 am I also tested on 1.0.8.14 default install dear yet same issue persists....
It doesn't when I test. So why are you getting different results?
Even I am failing to understand this... :(
How to debug this issue dear as not able to find from where to start....could you please elaborate so I could starting looking in it more deeply

I just checked in browser console of checkout_payment_address.php dear this error is thrown
Uncaught TypeError: $(...).val() is undefined jQuery 13.........
The below is the highlighted script for the error.....

Code: Select all

<script>$(document).ready(function () { $('#inputState').next('span').hide();  $("#inputCountry").val("99");  var selected_state = $('#inputState').val().length; var selected_country = $('#inputCountry').val(); if ( (selected_country > 0) && (selected_state == 0) ) { change_state(selected_country); } $('#inputCountry').on('change', function() { var selected_country = $('#inputCountry').val(); change_state(selected_country); }); }); function change_state(country) { $.ajax({ url: 'ext/scripts/stateSelector.php', data: {'country' : country}, success: function(data) { if(data) { $('#inputState').hide(); $('#inputState').after( data ).remove(); } else { $('#inputState').replaceWith('<input type="text" name="state" id="inputState" required aria-required="true" data-required="True" placeholder="State/Province" class="form-control" />');  } } }); }</script>
Thank you in advance;
Very Warm Regds./
radhavallabh

Re: Payment Address Error 1.0.8.14

Posted: Thu May 12, 2022 2:17 am
by radhavallabh
ecartz wrote: Wed May 11, 2022 3:54 pm
radhavallabh wrote: Tue May 10, 2022 8:24 am I also tested on 1.0.8.14 default install dear yet same issue persists....
It doesn't when I test. So why are you getting different results?
Hi dear @ecartz the same issue is there on the 1.0.8.14 demo site I just tested it....
https://phoenixcart.org/demo/checkout_p ... ddress.php

Please help with a fix....
Thank you in advance
Very Warm Regds./
radhavallabh

Re: Payment Address Error 1.0.8.14

Posted: Thu May 12, 2022 3:26 am
by ecartz
Which version of Firefox are you using? And what extensions?

Re: Payment Address Error 1.0.8.14

Posted: Thu May 12, 2022 3:59 am
by radhavallabh
ecartz wrote: Thu May 12, 2022 3:26 am Which version of Firefox are you using? And what extensions?
Firefox 100.0 (64-bit) dear no extensions used dear.

Re: Payment Address Error 1.0.8.14

Posted: Thu May 12, 2022 10:32 am
by Kofod95
Works fine on Chrome 100.0.4896.127, Edge 101.0.1210.39, Internet Explorer 21H2 and Firefox 100.0 (64 bit) for me. Not that it helps you, @radhavallabh :?

//Daniel