Hi David,
I was out for 2 days. When back, I checked my site and found an error sign in the status bar of IE. The error details are:
row 212
error: "document.search.q" is 0 or no object
code:0
What could this mean and how can I eleminate that error?
Regards
Roland
Hi David,
it was not in the searchform.php nor in the index.php. I use the following code in my header.php:
<?php
require("html/searchform.php");
?>
Regards
Roland
Hi Roland,
If you have the search form displayed twice that will explain the error because the JavaScript does not know which search form to set focus to. The easiest thing to do is simply disable this feature in config.php as follows.
$config_useJavaScript = false;
That will clear the error.
Cheers,
David.
Hi
im having this problem too, im using a pricetapetrytemplates.com theme, so what should i change to not display this error in ie?
im also seeing:
Warning: Cannot modify header information - headers already sent by (output started at /home/apparelc/public_html/includes/database.php:27) in /home/apparelc/public_html/html/header.php on line 12
after putting a product in the box of search
i think the theme im using isnt suitable for the latest version?
PS: Im also looking for someone that can do a web2.0 design for the latest version of pt.
Hi,
The warning message is being generated because the HTTP headers (the code for which is in html/header.php) cannot be sent by PHP because something has already generated some output. PHP generates output by default at the end of every non-PHP code line, and in this case, it is saying that has happened in your includes/database.php file.
Open that file in your text editor, and make sure that there is absolutely nothing outside of the <?php ?> tags - it is indicating line 27, so that looks like there is a new-line at the end of the file, so removing that should solve the problem...
Cheers,
David.
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/apparelc/public_html/includes/database.php on line 27
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/apparelc/public_html/includes/database.php on line 32
i already checked in that file and didnt saw nothing wrong.
Im getting these errors but not all time in the home page.
if i open the home page it sometimes open ok and sometimes with that error.
I presume its a problem with the featured products.
I have changed that code you also wrote in one thread about random featured products, so im presuming the problem is with that code?
Its weird because if i hit f5 for 10 times, i will get that error message 3 or 4 times.
Could you see it for me?
apparelcombined.com is the url.
Hi,
If you enable Database Debug mode, the reason for the database errors will be displayed - if you could turn that on in config.advanced.php, by changing line 6 as follows:
$config_databaseDebugMode = TRUE;
Then if you could browse to one of the pages causing the error, and let me know the SQL and MySQL error message that is displayed that will tell me what area of the script is causing the problem...
Cheers,
David.
Hi
this is the error message i got on home page when debug is true:
[SELECT * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants FROM `products` WHERE name IN ('Sunflowers Jacquard Napkins','O'Neill Dresses/Skirts : O'Neill Ojai White Juniors Dress','Red by Burton Avid Helmet') GROUP BY name][You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Neill Dresses/Skirts : O'Neill Ojai White Juniors Dress','Red by Burton Avid Hel' at line 1]
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/apparelc/public_html/includes/database.php on line 27
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/apparelc/public_html/includes/database.php on line 32
Hi Roland,
If $config_useJavaScript is set to true, the script uses JavaScript to set focus on the main search box on the index page.
If you have edited your main page and no longer have the search form, or you have edited your search form and the main edit box no longer has the id='q' parameter then you will get this error...
If you're not sure, email me a copy of your index.php and html/searchform.php and i'll take a look for you...
Cheers,
David.