News:

Support the VirtueMart project and become a member

Main Menu

Virtuemart product SEF problem ?!

Started by hitstore, February 11, 2013, 12:41:51 PM

Previous topic - Next topic

hitstore

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 ?

PRO

do you have something for the "suffix"  in vmart configuration?

hitstore

#2
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 ?

PRO

nobody can help much without a url?

are you usinig template overrides?



hitstore


jjk

#5
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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

franzpeter

@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.

hitstore

@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...

PRO

what happens when you switch to the standrad joomla template?

jjk

#9
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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

Has anyone found a fix for this yet without disabling default joomla/vm functions like SEO?

PRO

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?

jjk

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

PRO

he is using a customized template.

I think that will be the cause

anisimow

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.