You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zen Cart version: 1.5.8a
PHP version: 8.0.23
MySQL version: 10.4.25-MariaDB
Plugins that may be related: None...it happens in a clean install as well as my own plugin
What older/newer versions were also tested? Just 1.5.8a
In trying fix an issue with the search engine where prices from and price to do not go into the text boxes all the time, I've hit a snag that I can't explain and don't understand. I'm actively involved with Search Bug Reports on the Zen Cart Forum and this has been posted there as well.
My understanding of the process is that it starts in tpl_search_default.php and uses the $sData values from modules/pages/search/header_php.php...like so.
For troubleshooting purposes, I changed the above code to the code below...using 1000, '1000', and "1000" at many different points in my testing.
$sData['pto'] = 1000;
In tpl_search_default.php, line 37, I tested if $sData['pto'] was available and correct...like so.
<?php print_r('$sData[pto] before sanitizing = ' . $sData['pto'] . '<br>'); //this is not making it's way into zen_draw_input_field('pto', $sData['pto'], 'id="pto"'); below
?>
It is available and correct but it is not getting into the text box.
So I moved on to verifying function zen_draw_input_field in the html_output.php file.
Around line 585, I tested for $value ($sData['pto']).
$value is still correct and available but it still isn't inside of the text box...but it should be, right? The empty text box appears at is should...other than being empty.
My confusion comes here while anylizing the above code. Why would you use $name in any part of this if statement below? The goal is to set $field .= ' value=" to the $value...not the $name, right?
Zen Cart version: 1.5.8a
PHP version: 8.0.23
MySQL version: 10.4.25-MariaDB
Plugins that may be related: None...it happens in a clean install as well as my own plugin
What older/newer versions were also tested? Just 1.5.8a
In trying fix an issue with the search engine where prices from and price to do not go into the text boxes all the time, I've hit a snag that I can't explain and don't understand. I'm actively involved with Search Bug Reports on the Zen Cart Forum and this has been posted there as well.
My understanding of the process is that it starts in tpl_search_default.php and uses the $sData values from modules/pages/search/header_php.php...like so.
For troubleshooting purposes, I changed the above code to the code below...using 1000, '1000', and "1000" at many different points in my testing.
In tpl_search_default.php, line 37, I tested if $sData['pto'] was available and correct...like so.
?>
It is available and correct but it is not getting into the text box.
So I moved on to verifying function zen_draw_input_field in the html_output.php file.
Around line 585, I tested for $value ($sData['pto']).
$value is still correct and available but it still isn't inside of the text box...but it should be, right? The empty text box appears at is should...other than being empty.
My confusion comes here while anylizing the above code. Why would you use $name in any part of this if statement below? The goal is to set $field .= ' value=" to the $value...not the $name, right?
So, I changed $name to $value and the text box now has the correct value in it.
Now, I'm reluctant to leave it this way because this function is WIDELY used throughout the programming.
My question, is this a good fix and a BUG?
I have no idea where the search engine NOTIFY system is located nor do I understand how the "watcher class" system works...so I couldn't analyze it.
I would appreciate some insight and help please.
The text was updated successfully, but these errors were encountered: