VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Questions VM 1.1 ( the only active board for the old version) => Topic started by: FrankA on October 30, 2009, 20:02:52 pm

Title: Logged In basic Seach fails Migrated users only
Post by: FrankA on October 30, 2009, 20:02:52 pm
TITLE MODIFIED FOLLOWING RESPONSES BELOW:

Example


http://scotlandsglass.co.uk/cms/index.php?keyword=thrums&Search=Search&Itemid=6&option=com_virtuemart&page=shop.browse

In IE6, no problem.

In Firefox, the normal product search is returning 0 results.

If you use advanced search with a category selected it works.
Title: Re: Search OK in IE6, not so in Firefox (vm 1.1.4)
Post by: rb on October 30, 2009, 21:04:57 pm
Frank, the normal Search works for me in FF 3.5.3
Title: Re: Search OK in IE6, not so in Firefox (vm 1.1.4)
Post by: FrankA on October 30, 2009, 21:23:30 pm
Weird. Flushed by cache etc. also 3.5.3 but still get 0 results...

Hmm... tried logging out and the search example flashed up. Signed in again and it stayed.

Tried another search and 0 results. Logged out again and up pop the results?
Title: Re: Search OK in IE6, not so in Firefox (vm 1.1.4) LOGGED IN
Post by: rb on October 30, 2009, 22:23:52 pm
Maybe VM cookie check? Joomla cache settings?
Title: Re: Search OK in IE6, not so in Firefox (vm 1.1.4) LOGGED IN
Post by: FrankA on October 31, 2009, 10:15:15 am
Just to make it clear.

This problem is still occurring but only when logged in to the site.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: jenkinhill on October 31, 2009, 11:24:11 am
I am unable to duplicate this issue. Both Joomla & product search work fine for me in Firefox 3.5.4 when logged in with VirtueMart 1.1.4
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on October 31, 2009, 12:02:47 pm
Kelvyn, Was that on your site ot mine?

Someone else posted this in admin and configuration, they have 2,000 products - I have twice that. Perhaps it has to do with size of db, but why would being logged in change that?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: jenkinhill on November 01, 2009, 00:08:42 am
Because it workes with IE this is not likely to be a fault in VirtueMart. I have a site with nearly 9,000 products and no issues.

I have a feeling that you may have url issues on the site. If I access with http://www.scotlandsglass.co.uk  ie www. in the domain there are still links on the page to http://scotlandsglass.co.uk (no www)

This can cause issues with FireFox 3.5, so it is advised to be consistent and use .htaccess to force urls to use www.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 01, 2009, 01:39:54 am
That's interesting. If I change the URL to www the search works but when the search returns it removed!!!

It was set in vm without the www, changing that in VM has removed all the instances without www on the home page. But the search still is failing when logged in?

I don't know how to force www in htaccess?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 01, 2009, 01:41:44 am
Running the sdearch in debug mode (Firefox only IE6 still working in debig mode)

Quote
500 - JDatabaseMySQL::query: 1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SQL=SELECT COUNT(DISTINCT `jos_vm_product`.`product_sku`) as num_rows FROM (`jos_vm_product`, `jos_vm_category`, `jos_vm_product_category_xref`,`jos_vm_shopper_group`) LEFT JOIN `jos_vm_product_price` ON `jos_vm_product`.`product_id` = `jos_vm_product_price`.`product_id` LEFT JOIN `jos_vm_shopper_vendor_xref` ON (`jos_vm_shopper_vendor_xref`.`user_id` =64 AND `jos_vm_shopper_vendor_xref`.`shopper_group_id`=`jos_vm_shopper_group`.`shopper_group_id`) WHERE (`jos_vm_product_category_xref`.`product_id`=`jos_vm_product`.`product_id` OR `jos_vm_product_category_xref`.`product_id`=`jos_vm_product`.`product_parent_id`) AND `jos_vm_product_category_xref`.`category_id`=`jos_vm_category`.`category_id` AND ( (`jos_vm_product`.`product_name` LIKE '%thrums%' OR `jos_vm_product`.`product_sku` LIKE '%thrums%' OR `jos_vm_product`.`product_s_desc` LIKE '%thrums%' OR `jos_vm_product`.`product_desc` LIKE '%thrums%') ) AND (`jos_vm_product`.`product_id`=`jos_vm_product_price`.`product_id` OR `jos_vm_product_price`.`product_id` IS NULL)
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: jenkinhill on November 01, 2009, 10:42:10 am
For .htaccess see http://forum.virtuemart.net/index.php?topic=58026.msg190485#msg190485

Also make sure www. is included in siteurl and secureurl in VM configuration/security
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 01, 2009, 13:19:08 pm
List all products is working, search still fails when logged in. Tried as different user, same problem.

Created a new user... search works :0

What could be wrong with users records to cause such an issue, nothing looks different in a newly created record?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: rb on November 01, 2009, 18:41:01 pm
Frank, I created a new user on your site, logged on as the user, and was able to successfully perform a search (with results being returned) using FF 3.5.4.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 02, 2009, 23:33:33 pm
Thank RB yes, it only seems to affect profiles that were migrated and not newly created ones. I looked at the user file... nothing obvious... "thinks"... could any vm user file affect things?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 07, 2009, 14:33:07 pm
Can anyone suggest how I might deal with this problem? It is not realistic to delete all users and ask them to re-register! I did find the the VM user file was out of sync with joomla users, after deleting all the duplicated user records I still have 30 or 40 more profiles in vm than in joomla. Not a major problem in itself as none of the shopping features are used as it is an informational site not commercial.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: rb on November 07, 2009, 16:54:10 pm
Frank, I'm sure you probably tried this, but just in case you didn't, how about deleting all the VM cookies in FF?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 07, 2009, 17:31:25 pm
removed all the cookies for my site :( but the search also fails in IE. I would just remove the search from the VM menu but the Joomla search returns the same item link for each category that it appears in and with some items in a lot of categories it is not a useful workround. But with the images problem too the site is in a bad state.

Migration to 1.5 took 3 months due to having to replace all the articles as raw UTF text in all content - non Ascii characters got lost in the conversion. I still have to redo the 4000+ vm descriptions. At least the db is true UTF now so will not happen again. The site is supposed to be a centrepiece for a 400th Anniversary in Scotland next year and time is running out. I have thousands more images to be added but dare not progress that until all is working.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 14, 2009, 15:07:14 pm
A week on... I have tried changing password both in profile and via forgot password... still search will not work. Reregistering is not a solution as I need to keep connection to posts and other items throughout joomla. And telling all my users that they have to re-register in order to use the vm search is not really practical for similar reasons. So how can this only affect users registered before the migration?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: antonitus on November 16, 2009, 15:34:03 pm
I'm having the same issue here. I've searched through hundreds of threads here and there is no real solution.  I've installed the latest 1.1.4 and I believe there is a bug somewhere. Before upgrading from 1.1.3 everything was fine.

Has anyone got an idea as to why this is happening?

Also, I have to edit the following code:

Code: [Select]
SET SQL_MAX_JOIN_SIZE=#
This may help but what file is it in. Can anyone tell me this?

Thanks
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 17, 2009, 13:52:55 pm
Is yours also only affecting existing registered users?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 30, 2009, 11:14:46 am
This problem is still unresolved.... any ideas???
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 30, 2009, 11:19:39 am
Frank, I created a new user on your site, logged on as the user, and was able to successfully perform a search (with results being returned) using FF 3.5.4.
Could this be something to do with the users for whom search does not work were existing in the joomla 1.0 and migrated to the joomla 1.5. If I clear the VM users table would that create a problem or would it get rebuilt as users use vm?
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: rb on November 30, 2009, 15:28:15 pm
If you cleared the table jos_vm_user_info, at a minimum you would lose all your users' VM "Bill To" and "Ship To" addresses.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 30, 2009, 15:35:53 pm
Not a problem as it used only as a catalogue
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on November 30, 2009, 23:26:20 pm
OK, I cleared the VM user file. But still search is not working for me in my original profile but does work in a newly created profile....
... so what can be different between a user that is migrated from 1.0 to 1.5 and one that is created in 1.5 as far as the VM search function? Nothing I can see in the joomla user file  ??? ??? ??? ??? :'(
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on December 01, 2009, 11:49:33 am
If site is in debug mode, logged out no problem

Logged in the same search causes a 500 error.

SEARCH LOGGED IN

JDatabaseMySQL::query: 1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SQL=SELECT COUNT(DISTINCT `jos_vm_product`.`product_sku`) as num_rows FROM (`jos_vm_product`, `jos_vm_category`, `jos_vm_product_category_xref`,`jos_vm_shopper_group`) LEFT JOIN `jos_vm_product_price` ON `jos_vm_product`.`product_id` = `jos_vm_product_price`.`product_id` LEFT JOIN `jos_vm_shopper_vendor_xref` ON (`jos_vm_shopper_vendor_xref`.`user_id` =64 AND `jos_vm_shopper_vendor_xref`.`shopper_group_id`=`jos_vm_shopper_group`.`shopper_group_id`) WHERE (`jos_vm_product_category_xref`.`product_id`=`jos_vm_product`.`product_id` OR `jos_vm_product_category_xref`.`product_id`=`jos_vm_product`.`product_parent_id`) AND `jos_vm_product_category_xref`.`category_id`=`jos_vm_category`.`category_id` AND ( (`jos_vm_product`.`product_name` LIKE '%thrums%' OR `jos_vm_product`.`product_sku` LIKE '%thrums%' OR `jos_vm_product`.`product_s_desc` LIKE '%thrums%' OR `jos_vm_product`.`product_desc` LIKE '%thrums%') ) AND (`jos_vm_product`.`product_id`=`jos_vm_product_price`.`product_id` OR `jos_vm_product_price`.`product_id` IS NULL)

Call stack
#    Function    Location
1    JSite->dispatch()    /home2/scotlan4/public_html/cms/index.php:68
2    JComponentHelper->renderComponent()    /home2/scotlan4/public_html/cms/includes/application.php:124
3    require_once()    /home2/scotlan4/public_html/cms/libraries/joomla/application/component/helper.php:162
4    include()    /home2/scotlan4/public_html/cms/components/com_virtuemart/virtuemart.php:166
5    vm_ps_DB->query()    /home2/scotlan4/public_html/cms/administrator/components/com_virtuemart/html/shop.browse.php:57
6    JDatabaseMySQL->loadObjectList()    /home2/scotlan4/public_html/cms/administrator/components/com_virtuemart/classes/ps_database.php:120
7    JDatabaseMySQL->query()    /home2/scotlan4/public_html/cms/libraries/joomla/database/database/mysql.php:458
8    JError->raiseError()    /home2/scotlan4/public_html/cms/libraries/joomla/database/database/mysql.php:231
9    JError->raise()    /home2/scotlan4/public_html/cms/libraries/joomla/error/error.php:171
10    JException->__construct()    /home2/scotlan4/public_html/cms/libraries/joomla/error/error.php:136
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: rb on December 01, 2009, 15:35:02 pm
After your migrations, have you checked the data integrity of these tables:

jos_users
jos_vm_shopper_group
jos_vm_shopper_vendor_xref
jos_vm_userfield_values
jos_vm_vendor

For instance, does each id in jos_users have a correct, corresponding user_id in jos_vm_shopper_vendor_xref and jos_vm_userfield_values?

And does each vendor_id in jos_vm_shopper_vendor_xref have a correct, corresponding vendor_id in jos_vm_shopper_group?

Just a wild guess, but at least it will give you something to look at ;)
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on December 01, 2009, 18:43:04 pm
I guess I can safely clear all those as they would now be out of sync! Thanks for that tip will let you know the result.
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on December 04, 2009, 12:44:48 pm
Clearing jos_vm_shopper_vendor_xref.....


Party

Problem SOLVED
Title: Re: Logged In basic Seach fails in Firefox ONLY (vm 1.1.4)
Post by: FrankA on December 08, 2009, 13:35:10 pm
Party over  :'(

It is not solved, not sure how I thought it was, how can I check the integrity jos_users? It is very frustrating to have to log out to perform search and then log-in to be able to update from front end.

With the 500 error above, can anyone explain what it means is going on there. It does not include the jos_users table - so how can that be affecting things?

The Joomla search works when logged in, but as that returns one entry for each category the item appears in makes finding the thing you are looking for difficult.

I tried changing passwords, but apart from that there is nothing visibly different between migrated users and newly registered users in jos_users so it must be something related to the vm search module. But why would that care if a user is logged in or not.
Title: Re: Logged In basic Seach fails Migrated users only
Post by: FrankA on December 29, 2009, 04:10:06 am
Still no solution :-( any advice on the 500 error, it might help if I understood why it gives an error?
Title: Re: Logged In basic Seach fails Migrated users only
Post by: rb on December 29, 2009, 15:46:38 pm
Frank, here's another user who had a MySQL 1104 error:
     http://forum.virtuemart.net/index.php?topic=64212.msg213829#msg213829

Even though it's a different problem, it may be worth trying his solution since you share one symptom.
Title: Re: Logged In basic Seach fails Migrated users only
Post by: FrankA on December 29, 2009, 16:24:42 pm
Wow!!! Tom Tomm's
--------------------------------------------------
in the Joomla file mysql.php I found a line which says:
$this->setQuery( "SET sql_mode = 'MYSQL40'" );
(around line 153).
UNDER this line I added:
$this->setQuery( "SET OPTION SQL_BIG_SELECTS=1" );
---------------------------------------------------

solved the problem. Intrigued that this turns out to be a Joomla bug! And so happy that it is easily fixed. Thanks folks.

Puzzling that the problem only affected migrated users and not newly registered ones though.