Hi, I'm using VM 2.6.6: I have ssl installed and the cart.html page and checkout pages work - but when reached for the first time, they always display a "0 - Table categories not supported. File not found." message. It's only when I refresh the page that it actually pulls up the cart.html page itself. Any ideas why that is?
I did notice that the URL for it is /myVMsubdirectory/home/cart.html - why is "home" there? I don't see extra subdirectories when accessing other parts of VM...?
checking further the problem seems to be an inability to make a smooth transition to the https:// prefix: when I click to see the cart, the subsequent transition tries to pull up the page as http://www.... and creates the error. Only when I refresh the page it manages to hook on to the correct https:// prefix... how do I fix that kind of problem?
And a related question (a separate post of mine here): how can I enable users who exit an https page to go to non-SSL pages so that they get called up with http only?
doing more research and chatting with the hosting company it turns out that this is a popular problem and its solution is on the webmaster's end.
SSL redirection Plugins unfortunately don't target specific components of VM and will only apply to the whole program.
I saw some suggestions to create MOD rewrites, of http URLs to https URLs, and I think that's what I'll do.
The question is, does it matter in which htaccess file I do that? I have VM installed in a subdirectory and I have an htaccess file in the root as well as the htaccess file that came with Joomla-VM, in the subdirectory.
I'd prefer to do the rewrites from the root...?
...I tested the idea out on the root htaccess file with this code - but it caused all of VM to run slowly, and I still got the page display error when trying to view the cart:
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mysite.com/VMsubdirectory/home/cart.html [R,L]
RewriteRule ^(.*)$ https://mysite.com/VMsubdirectory/home/user.html [R,L]
RewriteRule ^(.*)$ https://mysite.com/VMsubdirectory/home/orders.html [R,L]
I saw somewhere else (http://www.virtuemart.net.ua/payment/94-ssl-https (http://www.virtuemart.net.ua/payment/94-ssl-https)) the following suggestion, to add this code in the <head> of the template before the css and js callups - but it had no effect. Can anyone suggest if this code is compatible with VM 2.6.6 and what may be the reason it didn't work:
<?php if ((JRequest::getVar('option') == 'com_virtuemart' and JRequest::getVar('view') == 'user' || JRequest::getVar('view') == 'orders' || JRequest::getVar('view') == 'cart' )): ?>
<?php if($_SERVER['SERVER_PORT'] != '443') { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?>
<?php endif; ?>
<?php if ((JRequest::getVar('view') !== 'cart' )): ?>
<?php if ((JRequest::getVar('view') !== 'user' )): ?>
<?php if ((JRequest::getVar('view') !== 'orders' )): ?>
<?php if($_SERVER['SERVER_PORT'] != '80') { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
this is getting frustrating:
I tried using Yireo's ssl redirection plugin.
a. if I selected a component to apply the plugin to, if I select VM aio I still got the page display error (attached), or if I select just VM as the component, the "put in cart" button just clocked and nothing happened.
b) if I selected the custom pages option and entered the 3 URLs that seem to be SSL based /cart.html, /user.html, /order.html - I STILL GOT THE ERROR(!)
What are we supposed to do to get SSL pages to show up?
[attachment cleanup by admin]
I saw a suggestion on this thread (http://forum.virtuemart.net/index.php?topic=96053.msg358074#msg358074 (http://forum.virtuemart.net/index.php?topic=96053.msg358074#msg358074)):
to use:
########## Begin - redirect to SSL Section
############# Use this section for custom redirects
#
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} component/virtuemart/cart
RewriteRule ^(.*)$ https://yoursecureurl.com/component/virtuemart/cart/$1 [R,L]
#
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} component/users
RewriteRule ^(.*)$ https://yoursecureurl.com/component/users/$1 [R,L]
#
########## End - SSL Section
The URL's referencing the components didn't look quite accurate, so I did this - but again, I still got the page error message...
########## Begin - redirect to SSL Section
############# Use this section for custom redirects
#
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} components/com_virtuemart/views/cart
RewriteRule ^(.*)$ https://www.mysite.com/VMdirectory/components/com_virtuemart/views/cart/$1 [R,L]
#
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} components/com_virtuemart/views/user
RewriteRule ^(.*)$ https://www.mysite.com/VMdirectory/components/com_virtuemart/views/user/$1 [R,L]
#
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} components/com_virtuemart/views/orders
RewriteRule ^(.*)$ https://www.mysite.com/VMdirectory/components/com_virtuemart/views/orders/$1 [R,L]
#
########## End - SSL Section
Any suggestions and guidance would be gratefully appreciated :-)