VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: hitstore on February 11, 2013, 12:41:51 PM

Title: Virtuemart product SEF problem ?!
Post by: hitstore on February 11, 2013, 12:41:51 PM
Hi to all

I've a problem with product detail pages

I've configured SEF in joomla and i've modified .htaccess ... all be ok in the site...

but when i try to open a product detail page (from menu or from search results) joomla give me a 404 error like this

"Errore 404 - Il prodotto richiesto non esiste." (Error 404 - requested product don't exist)

and the link became: http://www.xxxxxxx.it/informatica/computer/notebook.html?error=404

If I disable SEF... all works correcly and I can see also product detail pages.

Who can help me ?
Title: Re: Virtuemart product SEF problem ?!
Post by: PRO on February 11, 2013, 13:15:35 PM
do you have something for the "suffix"  in vmart configuration?
Title: Re: Virtuemart product SEF problem ?!
Post by: hitstore on February 12, 2013, 09:14:14 AM
Yes, there's the standard suffix "-detail"

SEO Configuration in virtuemart is:

SEO enabled ( no check in the box)
SEO suffix: -detail
String translator (no)
Use id product and category (no)


i've translate config from italian... i'm not sure text is the same of english version.

I've also caught a debug message:

vmdebug self::$_jpConfig->lang it_it
        vmdebug vmTime: loadConfig db no: 0.00320410728455
        vmdebug Start used Ram 11.75M
        Errore 404 - Il prodotto richiesto non esiste.
        vmdebug self::$_jpConfig->lang it_it
        vmdebug vmTime: loadConfig db no: 0.00336003303528
        vmdebug Start used Ram 10.75M
        vmdebug I take for product the last category Var1:

        81

        Var2:

        Array
        (
            [0] => 37
            [1] => 38
            [2] => 47
            [3] => 81
        )

        vmdebug I take for product the last category Var1:

        81

        Var2:

        Array
        (
            [0] => 81
            [1] => 84
        )

        vmdebug I take for product the last category Var1:

        81

        Var2:

        Array
        (
            [0] => 51
            [1] => 81
        )

        vmdebug $this->category Accessori
        vmdebug vmTime: VirtuemartControllerCategory Finished task : 0.124966859818
        vmdebug End used Ram 18.25M
        vmdebug Peak memory peak 18.25M


Some ideas ?
Title: Re: Virtuemart product SEF problem ?!
Post by: PRO on February 12, 2013, 17:34:24 PM
nobody can help much without a url?

are you usinig template overrides?


Title: Re: Virtuemart product SEF problem ?!
Post by: hitstore on February 13, 2013, 11:03:18 AM


url -> www.hitstore.it?access=1

Now SEF is disabled.
Title: Re: Virtuemart product SEF problem ?!
Post by: jjk on February 13, 2013, 12:51:37 PM
According to your first post above, it looks like you have enabled "Adds Suffix to URL" in Joomla configuration. You may disable that in order to find out if the router (responsible for the SEF urls) has a problem with the additional suffix. It is useless anyway. Then enable Joomla SEF and VM SEF again and clear your browser and Joomla cache. Joomla cache should be disabled.
Title: Re: Virtuemart product SEF problem ?!
Post by: franzpeter on February 13, 2013, 15:20:59 PM
@jjk,
if a search engine did already crawl with enabled 'Add Suffix to URL' it is not a good idea to disable that. Joomla is not able to do a redirect for that case.
Title: Re: Virtuemart product SEF problem ?!
Post by: hitstore on February 13, 2013, 17:55:31 PM
@jjk

I've done with your instruction, but this don't solve my problem. With the changes VM don't give me the error message, but I can't access product detail page anyway, but remain in category browse page...
Title: Re: Virtuemart product SEF problem ?!
Post by: PRO on February 13, 2013, 18:15:05 PM
what happens when you switch to the standrad joomla template?
Title: Re: Virtuemart product SEF problem ?!
Post by: jjk on February 13, 2013, 18:51:35 PM
If I go to the url you provided above, I can see a warning related to the file md_stylechanger.js, which is making trouble: TypeError: container is null...store.it/templates/beez_20/javascript/md_stylechanger.js. Line 66. This often seems to prevent that your pages are fully loaded.

If you use the Firefox browser, I would recommend to install the 'Firebug' plugin, so you can see the problem areas yourself. See here: http://forum.virtuemart.net/index.php?topic=102850.0

Also I can access your product details pages. This one i.e. basically works and I can add the product to the cart:
...store.it/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=16132&virtuemart_category_id=77&Itemid=138
Title: Re: Virtuemart product SEF problem ?!
Post by: WebMercher on March 07, 2013, 08:30:54 AM
Has anyone found a fix for this yet without disabling default joomla/vm functions like SEO?
Title: Re: Virtuemart product SEF problem ?!
Post by: PRO on March 07, 2013, 13:55:54 PM
Quote from: WebMercher on March 07, 2013, 08:30:54 AM
Has anyone found a fix for this yet without disabling default joomla/vm functions like SEO?

what problem do you have?
Title: Re: Virtuemart product SEF problem ?!
Post by: jjk on March 07, 2013, 14:05:53 PM
Quote from: PRO on March 07, 2013, 13:55:54 PM
what problem do you have?

Hi Pro,
Have a look at this: http://forum.virtuemart.net/index.php?topic=113314.msg381428#msg381428 (http://forum.virtuemart.net/index.php?topic=113314.msg381428#msg381428)
and http://forum.virtuemart.net/index.php?topic=113034.msg381543#msg381543 (http://forum.virtuemart.net/index.php?topic=113034.msg381543#msg381543)
Title: Re: Virtuemart product SEF problem ?!
Post by: PRO on March 10, 2013, 23:59:33 PM
he is using a customized template.

I think that will be the cause
Title: Re: Virtuemart product SEF problem ?!
Post by: anisimow on April 24, 2013, 20:07:36 PM
Quote from: hitstore on February 11, 2013, 12:41:51 PM
Hi to all

I've a problem with product detail pages

I've configured SEF in joomla and i've modified .htaccess ... all be ok in the site...

but when i try to open a product detail page (from menu or from search results) joomla give me a 404 error like this

"Errore 404 - Il prodotto richiesto non esiste." (Error 404 - requested product don't exist)

and the link became: http://www.xxxxxxx.it/informatica/computer/notebook.html?error=404

If I disable SEF... all works correcly and I can see also product detail pages.

Who can help me ?
I had the same problem. In my case (and I'm sure that in your too) the problem is in constant global variable VMLANG. It hasn't defined yet. And It cant find product_id. For example part query is FROM `#__virtuemart_products_'.$this->vmlang.'` AS `p` where $this->vmlang = VMLANG but must bee "en-en" or another language. Then it will find correct product_id.
So you must defined VMLANG. components/com_virtuemart/router.php  after line 2 " if(  !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );" add

if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php');
VmConfig::loadConfig();
VmConfig::setdbLanguageTag();

for mee it works perfectly. Good luck.