ecartz wrote: ↑Sat May 18, 2024 10:27 pm
Does address 4875 exist in the database (address_book table)?
It does but not related to the customer - I was being too cocky in the database tables while being too tired as well
Everything was further complicated by cashe - cleared that this morning and everything was working properly - well almost - I'm now getting a blank page on checkout success.php
Think this is the error:
[19-May-2024 10:47:53 UTC] PHP Fatal error: Uncaught TypeError: Text::output(): Argument #1 ($s) must be of type string, null given, called in /home/******/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php on line 72 and defined in /home/******/public_html/store/includes/system/versioned/1.0.8.2/text.php:59
Stack trace:
#0 /home/******/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php(72): Text::output(NULL, Array)
#1 /home/******/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php(97): Select->build_options()
#2 /home/******/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php(178): Select->draw()
#3 /home/******/public_html/store/includes/modules/content/product_info/templates/tpl_cm_pi_options_attributes.php(15): Select->__toString()
#4 /home/******/public_html/store/includes/modules/content/cm_template.php(14): include('/home/******/...')
#5 /home/******/public_html/store/includes/modules/content/product_info/cm_pi_options_attributes.php(25): include('/home/******/...')
#6 /home/******/public_html/store/includes/system/versioned/1.0.8.4/template.php(106): cm_pi_options_attributes->execute()
#7 /home/******/public_html/store/templates/xpajun/includes/pages/product_info.php(35): Template->get_content('product_info')
#8 /home/******/public_html/store/product_info.php(25): require('/home/******/...')
#9 {main}
thrown in /home/******/public_html/store/includes/system/versioned/1.0.8.2/text.php on line 59
Although everything went through OK
Current Store is now running 1.0.9.0 - php 8.2.18 Now working on taking a short rest - php 8.2.18
It's complaining that the attribute option choices are not showing up correctly. In particular, that the text is null or not set. The most likely places would be pi_options_attributes or the Product class.
ecartz wrote: ↑Sun May 19, 2024 11:22 am
It's complaining that the attribute option choices are not showing up correctly. In particular, that the text is null or not set. The most likely places would be pi_options_attributes or the Product class.
Thank you for your help Matt @ecartz checked all those those files they are the same on my site as the 1.8.0.21 full download
I then did a couple of test orders one with attributes and one without... they both went through OK
Current Store is now running 1.0.9.0 - php 8.2.18 Now working on taking a short rest - php 8.2.18
ecartz wrote: ↑Sun May 19, 2024 11:22 am
It's complaining that the attribute option choices are not showing up correctly. In particular, that the text is null or not set. The most likely places would be pi_options_attributes or the Product class.
It's back again and both when ordering products with attributes and products without here's the errors and the related lines being objeted to:
[25-May-2024 10:08:28 UTC] PHP Fatal error: Uncaught TypeError: Text::output(): Argument #1 ($s) must be of type string, null given, called in /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php on line 72 and defined in /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.2/text.php:59
Stack trace:
#0 /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php(72): Text::output(NULL, Array)
#1 /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php(97): Select->build_options()
#2 /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.other/1.0.8.21/select.php(178): Select->draw()
#3 /home/mudlarki/public_html/store/includes/modules/content/product_info/templates/tpl_cm_pi_options_attributes.php(15): Select->__toString()
#4 /home/mudlarki/public_html/store/includes/modules/content/cm_template.php(14): include('/home/mudlarki/...')
#5 /home/mudlarki/public_html/store/includes/modules/content/product_info/cm_pi_options_attributes.php(25): include('/home/mudlarki/...')
#6 /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.4/template.php(106): cm_pi_options_attributes->execute()
#7 /home/mudlarki/public_html/store/templates/xpajun/includes/pages/product_info.php(26): Template->get_content('product_info')
#8 /home/mudlarki/public_html/store/product_info.php(25): require('/home/mudlarki/...')
#9 {main}
thrown in /home/mudlarki/public_html/store/includes/system/versioned/1.0.8.2/text.php on line 59
#0 $field .= '>' . Text::output($option['text'], static::ESCAPES) . '</option>';
#1 $select = '<select' . $this->stringify_parameters() . '>' . $this->build_options() . '</select>';
#2 return $this->draw();
#3 $input = $input->require() . PHP_EOL . FORM_REQUIRED_INPUT;
#4 include(Guarantor::ensure_global('Template')->map($tpl_data['file']));
#5 include 'includes/modules/content/cm_template.php';
#6 $mb->execute();
#7 <?= $Template->get_content('product_info') ?>
#8 require $Template->map(__FILE__, 'page');
#9 public static function output(string $s, $translate = false) {
My initial thought was that when a product without attributes was ordered a NULL return would happen and cause the problem.
I don't use pi preferring product_tabs instead because it fits better with what I sell - has tabs been updated since d21?
Current Store is now running 1.0.9.0 - php 8.2.18 Now working on taking a short rest - php 8.2.18
The products class returns an array of options/attributes. The cm_pi_options_attributes copies parts of that array into another array with different structure. Then the tpl displays it. The tpl is saying that some of the values are null. That happens well after the array is created. The problem would be at creation, not when it is being read.
If all the code is core, then the next thing to check would be that the values are correct in the database. If it's happening consistently, try adding code in cm_pi_options_attributes to detect nulls and dump the data at that point. If this paragraph does not make sense to you, then you may need to escalate to a certified developer for debugging help.