product thumbnails to details + Joomla VS VM account details + MySQL error

Started by JohnnyC, January 16, 2012, 09:45:02 AM

Previous topic - Next topic

JohnnyC

    Hello everyone,
    I use Virtuemart 2 (Joomla 1.7.3) but I am a begginer at all this stuff (including php)! My site uses VM2 through Joomla with a free VM theme.

    I would appreciate some help on the following issues (not related each other):

    • I need to make the product thumbnail link to the products details page.
      In my shop all the products' thumbnail open the image with some kind of Lightbox (I think its Fancybox) and if someone wants to enter the product details page, must use the linked name or a "Product details" button appearing at the bottom. Moreover, the products shown in a menu don't react like that. The thumbnail opens the image to a new window (like the lightbox doesn't work).
      By the way, the product categories' thumbnail works fine (linked).
      So,

      • How can I link all the product image thumbnails (body and menu included) to the product details page? In this case I should "disappear" somehow the "Product details" button...
      • Is it better or more easy to make all products' thumbnails open the image with Lightbox? In this case the only thing need to be fixed is the Lightbox at menu shown products. Any ideas?
    • Is there a way to make Joomla and Virtuemart register with same account details? When I make a new account through Joomla's or VM's "create new account" the only thing that is shown in common is the username and password. I need to create an account in one system and all the profile details (address, phone etc) to be "copied" and used by the other
    • I have a problem with a MySQL message that appears after some time that the site is not used (eg, after a night). During the message is displayed the site doesn't work. When I refresh the page or enter a link or perform a save in the backend, after some time (maybe a minute) the message disappears and the site comes back. The message is

      • Attention no standard shopper group set MySQL server has gone away SQL=SELECT * FROM `jos_virtuemart_shoppergroups` WHERE `default` = "1" AND `virtuemart_vendor_id` = "1"
      • Attention no standard shopper group set MySQL server has gone away SQL=SELECT * FROM `jos_virtuemart_shoppergroups` WHERE `default` = "1" AND `virtuemart_vendor_id` = "1"
      • Σφάλμα κατά την φόρτωση του ενθέματος MySQL server has gone away SQL=SELECT m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, mm.menuid FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id LEFT JOIN jos_extensions AS e ON e.element = m.module AND e.client_id = m.client_id WHERE m.published = 1 AND e.enabled = 1 AND (m.publish_up = '0000-00-00 00:00:00' OR m.publish_up <= '2012-01-03 08:49:25') AND (m.publish_down = '0000-00-00 00:00:00' OR m.publish_down >= '2012-01-03 08:49:25') AND m.access IN (1,1) AND m.client_id = 0 AND (mm.menuid = 500 OR mm.menuid <= 0) AND m.language IN ('el-GR','*') ORDER BY m.position, m.ordering
      (Σφάλμα κατά την φόρτωση του ενθέματος = Error loading module, in Greek)
    As I can understand, somehow MySQL "hibernates" and when the site calls it, "it is gone away"... Are there any ideas on how can I solve this? BTW I don't have the root administration of the system, as my site is in a Webhosting server of a paid service. The technical support of this service said that it is not a problem of the server or the system's environment (I told them if it had to do with the php.ini an the SQL timeout).
    [/li]

I would be very glad if you could give me some ideas on those questions.

Thanks!

Milbo

for 1. you should take a look in the template forum, what you want is 10 - 20 minutes.
2. http://forum.virtuemart.net/index.php?topic=96438.msg317068#msg317068

3. seems to be bug. First check if you have a default shoppergroup. But I think the real error is the second query, which is a joomla one. Maybe it is a robot running to fast throug all pages and using too much db connections.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

JohnnyC

Thank you for the fast reply!

1. I will give it a try to look in the forum you mention, however before I started this thread I had about 3 weeks searching for these issues with no luck (for VM2)
2. I have allready read that post and I know that creating a Joomla account automatically creates the shopper in VM (and vise versa), but the only information it copies is the basic information. Isn't there a way to synchronize the rest profile details (there will be chosen the same ones to be displayed of course). Or another way to have information registration once by the user...
3. I know that maybe is a bug. There are two shoppergroups, -anonymous- and -default- (that is the default too). All users are "default" unless the admin changes it. But the SQL error tells me that SQL does a timeout and when it is needed by the site, it is not "there"... As I said my site is in a Webhosting Server so I don't know if there is something in the rest system, except my files tha I have access... I just wonder if there is something I can do by my side...


kiofcon

when i try to see my products i take this message from the admin page of virtuemart
MySQL server has gone away SQL=SELECT m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, mm.menuid FROM c5g8a_modules AS m LEFT JOIN c5g8a_modules_menu AS mm ON mm.moduleid = m.id LEFT JOIN c5g8a_extensions AS e ON e.element = m.module AND e.client_id = m.client_id WHERE m.published = 1 AND e.enabled = 1 AND (m.publish_up = '0000-00-00 00:00:00' OR m.publish_up <= '2012-01-21 16:14:45') AND (m.publish_down = '0000-00-00 00:00:00' OR m.publish_down >= '2012-01-21 16:14:45') AND m.access IN (1,1,2,3) AND m.client_id = 1 AND (mm.menuid = 0 OR mm.menuid <= 0) ORDER BY m.position, m.ordering
and nothing works

JohnnyC

I guess if you make a few refreshes, or enter a link or save something in the backend ("wake up the database somehow"), it starts working...
I maybe found a way to figure it out.
Analysing the query I saw that Joomla had problem when trying to load VM modules (for example VM category module or/and featured products in a menu etc). My though on this is that Joomla and VM have 2 speeds on reading the database. So VM does timeout early and when Joomla asks to load a module MySQL "is not there"... I don't know how to sync the two systems to timeout and comeback at the same time, but I took a backup of my database (used phpMyAdmin) an then I reset the tables through the Tools->Tools&Migration->Reset all tables and do a fresh install. Then I recovered my old tables from the backup.
So far so good... This seems to work till now, but I don't claim it is definitely the solution, cause I don't know what will happen if the shop starts working normally with hundreds of products and many users... Maybe finding a way to syncronize VM and Joomla database reading is better...

JohnnyC

Continuing my post, I found something new.
At configuration.php change
public $dbtype = 'mysql';
to
public $dbtype = 'mysqli';

This changes the driver that contacts MySQL and might help. I just did it and don't have any remark yet...

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum