News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[TRACKER 2535] Advanced Search - IE error line37 "length null or not object"

Started by grayceworks, March 08, 2009, 05:56:17 AM

Previous topic - Next topic

grayceworks

Any help is greatly appreciated! (crossposted items updated with this link and tracker link, since I can't delete my own posts. )

Description:
When using the Advanced Search with Parameters in IE, A runtime error occurs on line 241, saying Error: 'length' is null or not an object

The script debugger points to the following line of the page shop.search.php line 37, where it has highlighted if (m.length>0)




<form action="http://youngaudiences.webtestsystems.com/index.php" method="get" name="adv_search" onsubmit="var p=new RegExp('(.*?),',['i']);var m=p.exec(this.search_category.value);if(m.length>0){this.category_id.value=m[1];}return true;">





so far, this is the only error I've gotten with VirtueMart 1.3 and Joomla 1.5.9, (which is way better than 1.1.2 on 1.5.7 where I had at least 12 errors on VirtueMart pages. Thanks for all your hard work guys! :) )


VirtueMart Version:
VirtueMart 1.3

Joomla/Mambo Version:
Joomla 1.5.9

Steps to replicate:
1.Go to Advanced Search in the front end using IE    (/index.php?option=com_virtuemart&page=shop.search ).
2.Enter search criteria and click search.
3.Get the error.
4.Ignore the error, and the search results still show up. Just looks bad to show a client a page with errors.

Steps already tried:
disabled all plugins and modules -- disabled all except bare-bones components. No effect, so reenabled the ones I will be using on the site, since if I can't use em, it's no good to me anyhow... ;)


Also provide live URL when available.
TEST SITE - ADVANCED SEARCH PAGE

Proposed fix(es):
I have no idea, I'm not a coder. Maybe length needs defined somewhere? Dunno. Any help is appreciated!



System info:
Operating system: Linux
Web server: Apache
PHP version: 5
mySQL version: 5
Internet Explorer 7 (error)
Firefox 3.0.6 (no errors)

searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10


grayceworks

Ok, Thanks.  I will keep checking back for a solution... btw, the bug tracker says line 75? But when I looked at the shop search page, it is actually line 37...
searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10

grayceworks

question:

Why is this listed in the bug tracker as a frontend module problem? It's got nothing actually to do with the module, the module is just an easy way to get to the search link. The module works fine and does what it's supposed to do... take you to the other pages.

It has to do with the SEARCH for VM, the shop.search.php file in the main VM component files.

You don't need to enable the mod_virtuemart module to see this.

Just go directly to the shop.search page, and enter search criteria and click search.



../index.php?page=shop.search&option=com_virtuemart&Itemid=73



IMO, this is an essential function of an online shop, for people to be able to search products by type, so the fact that it gives errors when customers try to search is is kindof a big deal... I hope this is fixed soon?

What does the .length thingy do in that line of code anyhow? Just out of curiosity....



<form action="http://youngaudiences.webtestsystems.com/index.php" method="get" name="adv_search" onsubmit="var p=new RegExp('(.*?),',['i']);
var m=p.exec(this.search_category.value);if(m.length>0) this.category_id.value=m[1];}return true;">

searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10

Adolph

Interesting post dude....discussion are always helpful in one way or the other. Thanks for giving out information. It's really nice and mean full.