-
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html_output.php causing search problems #6364
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: