Identifying problems with VirtueMart
Scar:
I just thought I'd add a short troubleshooting list for new VM users that struggles with their sites. I think that the same questions comes up over and over again and it's basically a small number of solutions to all these problems. If you feel there are more questions that have typical answers feel free to post them below and I'll add them to this post (but please keep this thread clean, only tips and tricks or general solutions). It also contains some useful tips and tricks.
There are a lot of different ”problems” that constantly keep showing up in VirtueMart forum. Here you have a checklist with basic things to check before posting and before starting to pull your hair off.
1. ALWAYS disable your Joomla SEF URL’s. VirtueMart doesn’t work very well with Joomla SEF URL’s at the moment. Neither should you have any SEF extension activated before you’ve worked out all the issues you might encounter. If you think that this doesn’t apply to you, you should reconsider; this is the first thing to do when you have some sort of issue. Actually you should never have enabled it in the first place until you consider yourself done with your site. If you want SEF URL’s, get one of the third party extensions, like sh404SEF: http://extensions.joomla.org/extensions/site-management/sef/2380, and take some time to learn how to set it up.
LOCATION: Joomla backend->Site->Global Configuration->Site(TAB)
2. Add to cart doesn’t work. Switch off your AJAX add to cart. This function is known to have issues with other javascript, like the once that are implemented in your template or in other modules or extensions. If you still have problems after having switched it off you might experience issues with SEF URL’s or wrong URL setup. You should switch SEF URL's off when you have problems with your site (see no. 1 and no.3)
LOCATION: Joomla backend->Components->Virtuemart->Configuration(under Admin TAB)->Site(TAB)->Layout(section)->Configuration
3. Links and/or buttons doesn’t work. This is often reported and the standard solution is to switch your SEF URL’s off (see no.1) and make sure you have the right URL set under Admin->Configuration->Site(TAB)->Site URL and Secure URL. You should also make sure that your configuration file really has the right URL. You’ll find it under JOOMLAROOT /administrator/components/com_virtuemart/virtuemart.cfg.php. Don't forget the trailing slash in your URL. Also make sure you have a menu item linking to VM component and the mod_virtuemart module published.
4. Layout issues like menus doesn’t show all categories, popups behind text etc. 99.9% of all layout issues are related to custom themes and templates. This can easily and quickly be tested by setting one of the standard Joomla/VM templates as default. If the issue is still there it might be something else. If it’s gone it’s a template/theme issue and you should turn to your template provider for support.
5. Checkout button doesn’t work. See no.3 and no.1
6. I can’t edit the product description when adding or changing products. VM backend doesn’t work very well with Safari, Opera or Chrome browsers at the moment. Use another browser and you should be fine.
7. My images doesn't show (or other troubles) after moving site. Read this post: http://forum.virtuemart.net/index.php?topic=59414.0
8. Switch off your cookie check Don't use the cookie check, it's known to cause a lot of problems especially with links not working or wrong directing.
LOCATION: Joomla backend->Components->Virtuemart->Configuration(under Global TAB), Core Settings box (scroll down)
Other basic tips and tricks during setup/installation/troubleshooting
1. Don’t use VM cookie check. It may very well work but this is the last thing you should activate when you are done with your site. Activate and try thorough before launching.
2. Never ever do changes to your live site. You don’t know what might break your site. Your site is a complex thing and it’s impossible to imagine all the issues that might show up with even the slightest change to your site. ALWAYS test first on a working/testing site no matter how small change. You can easily set up a copy of your site with JoomlaPack: http://extensions.joomla.org/extensions/access-a-security/backup/1606. How to: http://forum.virtuemart.net/index.php?topic=60033.msg201228#msg201228 . Even more important if you have any custom mod’s applied. And definitely don’t do major changes (like upgrading to latest version) without testing first. Personally I don’t even install a new module without checking its compatibility first.
3. Backup your site! During setup this is crucial and might save you hours and hours. If you break something you can easily restore it if you have a backup. Definitely do a backup on your live site before you apply any mod. Do this even if you have tried a mod or change on your working site first.
4. One thing at the time. Don’t do a lot of changes to your site at once. Do ONE (1) thing and then test thoroughly. If you do a lot of mod’s or install several modules/components/plugins at once and then realize you have some trouble you won’t be able to figure out what modification/install/addon gave you the problem. Set up a testing team of friends, family etc. and let them go crazy on your site. It’s hard to find all possible issues but take your time, if you don’t find them and make another change you might find yourself in much more trouble than necessary. Don’t even change two settings without testing in between, even if they seem harmless.
5. Sites don’t just stop working by themselves. This is just a basic fact. It can feel like it sometimes but this just isn’t the case. If you think really hard you’ll probably come up with that small change you just did that “can’t have any effect”. Or maybe your host changed some setting on your server. There is always some change behind a changed site behavior. If it’s a live site it might even have been hacked. The most logical way to tackle this is to not panic but sit down and think real hard, and be honest to yourself; don’t start blaming VM or Joomla or anything, it’s probably you who is the cause but you just don’t know it yet. Also talk to your host about if they made any changes. If you follow all posts in this document you will probably never even get into this. Remember: ONE change, then test systematically.
6. Read the manual and play around. Before you get started to build your first site you should definitely read the manual: http://virtuemart.net/documentation/User_Manual/index.html. You should also play around with VM settings, try them out and make sure you have clicked every single link in your VM backend to get to know this complex thing. The complexity is scary at first but once you get to know it this is what gives it its strength. Change one setting and then go to front end to see what you’ve just changed. I believe this is the best way to learn.
7. SEARCH THE FORUM. This is a skill that will pay off to learn. There is tons of knowledge gathered already in the threads in the forum. Read and learn and use your imagination when you search. If you don’t find what you search for try to find some other words for it. The more you learn to use the VM vocabulary the easier you’ll have to find what you’re looking for. You’ll learn the vocabulary from reading a lot of posts and also the manual. You will also find it easier to describe your problem in a manner that makes it possible for others to help you. If you don’t find it in the forum, try Google.
8. Try to be practical about things. For example: You want to sort your products in both categories and manufacturers but you don’t like the manufacturers’ module for some reason. Then we think about this and take another approach. How about setting up manufacturers as categories? Just because it’s called Categories and not Manufacturers doesn’t mean we can’t use it for manufacturers as well. This applies to a lot of the functions in VM. Just because it’s called one thing doesn’t make it solely meant for that purpose. See how the functions work and think really hard about what it can be used for.
9. Clear Joomla! cache. If you have Joomla cache enabled you should always clear cache in between changes. And remember to reload your site without reading cache in your browser, Ctrl+F5. Joomla cache is cleared in Tools->Clean Cache
MikeUK:
Nice.
I think you should make this two threads, one for the trouble shooting, and for the tips.
dbzeroone:
Excellent, EXCELLENT article!
I would like to add one thing about the "add to cart button doesn't work".
I had this issue on my most recent VM site. It would work fine without the AJAX updater, but my client insisted I make it work with the AJAX updater.
The fix was to tweak the .htaccess file to always rewrite the urls to start with 'www'.
Entering the URL http://mysite.com would cause the AJAX add to cart function to not work. After the .htaccess fix, every page url gets 'www' in front of it (if it's not already there), so http://mysite.com would automatically flip to http://www.mysite.com. Problem solved.
Hope that's helpful to someone!
Scar:
Forcing every visitor to visit your site with or without www through .htaccess is always a good practice. You should always force the URL you have in your config file. So if your config file URL is non-www force non-www through .htaccess like this:
in your .htaccess add these lines directly after "RewriteEngine On":
Code:
RewriteCond %{HTTP_HOST} ^www.yoursite.com$ [NC]
RewriteRule ^(.*)$ http://yoursite.com/$1 [R=301,L]
Problems that are likely to arise if you don't do this is layout/styling issues, buttons/links not working, login problems and probably a lot more.
Scar:
How to set up a local test/work site
I think I constantly see people in great panic all over the forum because their live sites do not work. Basically they run into trouble because they've just made some change to their live site without testing it first. It is so simple to just setup a complete copy of your live site and it will save you so much trouble that there is no excuse to not do it. ALWAYS test changes/installs/hacks on your test site first. Since there are so many third party developers and even more people hacking files there just never is any guarantee that the mod will be compatible with your specific setup. Only way to find ot is to test.
This describes how to setup a local copy of our site on a Windows PC:
1. Download XAMPP 1.7.1 (xampp-win32-1.7.1-installer.exe) from http://sourceforge.net/projects/xampp/files/
(Do not download any more recent versions. The more recent one containes PHP 5.3 which Joomla 1.5.14 and lower are not compatible with.)
2. Run the setup and install it to your C: root (not in C:\Programs due to permissions)
3. When finished start the XAMPP control panel and start Apache and MySQL services by clicking the start button next to them.
4. Now open your browser and type http://127.0.0.1/phpmyadmin. Set up a new database and make sure to create a new user with complete permissions (click Privileges tab after creating new database).
5. If your live site do not have Joomapack installed, go get it from: http://joomlapack.net/download/JoomlaPack-Components-download.html and install it to your live site. Also grab the Kickstart package from the same page but do not try to install that, just let it be on your computer. If you do not understand how to use JoomlaPack just read the instructions.
6. Create a backup of your site with JoomlaPack and download it to your computer. On your compter open up C:\xampp\htdocs. Create a new folder with your sites name. Copy the downloaded backup file and the kickstart zip-file into this new folder. Unzip the Kickstart zip (NOT YOUR BACKUP FILE, JUST LET THAT BE).
7. In your browser go to http://127.0.0.1/yourfoldername/kickstart.php. You'll see a dropdown which containes the zip file which is the backup file you created and downloaded before. Choose it and click start and just sit back and wait. Then follow the instructions carefully! It will guide you through the rest of the setup of your site backup.
8. When finished go to C:\xampp\htdocs\yourfoldername\administrator\components\com_virtuemart\virtuemart.cfg.php and edit lines 35 and 36 so it reads: http://127.0.0.1/yourfoldername/
9. You now have an exact copy of your site which you can play with as much as you like without ending up in panic if something goes wrong. Good luck!
Navigation
[0] Message Index
[#] Next page