VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Urs on April 04, 2012, 11:21:45 AM

Title: [solved] vmError: $link["view"] is empty
Post by: Urs on April 04, 2012, 11:21:45 AM
Hello

Migrated a vm shop from vm1.1. to 2.0.3.i

Now i have on all vm pages a lot of vmError: $link["view"] is empty Lines.

Tried to delete the databases, reinstalled, different template, ... nothing helps!

Any ideas?

regards
Urs
Title: Re: vmError: $link["view"] is empty
Post by: Urs on April 04, 2012, 18:36:38 PM
No one?
Title: Re: vmError: $link["view"] is empty
Post by: Milbo on April 04, 2012, 19:43:08 PM
Go in your virtuemart entry of your joomla menu... and store it again... it has somethign todo with the sef and the joomla menu item stuff.
Title: Re: vmError: $link["view"] is empty
Post by: Urs on April 04, 2012, 20:05:28 PM
Thanks! Solved!
Title: Re: [solved] vmError: $link["view"] is empty
Post by: fire47 on April 22, 2012, 01:03:09 AM
Didn't work for me, currently on v2.0.6
Title: Re: [solved] vmError: $link["view"] is empty
Post by: agrupe on May 04, 2012, 22:45:57 PM
Not solved for me, too. The problem disappears only if I disable SEF in Joomla (2.5). VM 2.0.6

But that's not a solution at all ;-(

Andreas
Title: Re:NOT SOLVED vmError: $link["view"] is empty
Post by: fire47 on May 10, 2012, 18:38:54 PM
Still looking for a solution!!!!!  >:(
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Sunglasses-Joe on June 23, 2012, 13:08:36 PM
I agree, Still NOT solved,
Only way to get rid is SEO Settings

    Search Engine Friendly URLs       Yes   No            to NO in Joomla config

ANyone any other ideas ?
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Sunglasses-Joe on July 16, 2012, 10:26:36 AM
Solved with VM2.0.8c

Thanks
Title: Re: [solved] vmError: $link["view"] is empty
Post by: manburg6 on August 31, 2012, 15:17:08 PM
Happen again with 2.0.10 but disable Joomla SEF does not works to solve problem.

Any other suggestion?

Thanks,
Mario
Title: Re: NOT SOLVED vmError: $link["view"] is empty
Post by: fire47 on September 05, 2012, 20:52:25 PM
This is a bug!  Admins/Devs please fix this!!!!!
Title: Re: [solved] vmError: $link["view"] is empty
Post by: wsfsb on October 16, 2012, 13:00:22 PM
Not a bug, a warning.
As suggested, go back to your menu manager.  Any menu item that relates to virtuemart, reselect it and save.

In my case after migation from 1.1.9 to 2.12 there were old menu items, on edit the type is missing, press reselect, re-choose (cart or category layout) and save.

Jason
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Lenfitz on November 21, 2012, 06:22:35 AM
Still have this problem. It is not solved.

Appears to be a SEF issue. No amount of resaving menu's fix's this error.

Turn off VM SEF and it dissappears. Turn on VM sEF and this error re-appears.

A fix please...
Title: Re: [solved] vmError: $link["view"] is empty
Post by: jjk on December 19, 2012, 19:25:44 PM
Just a guess - maybe an obsolete menu item in the joomla database??? (I did have that once long time ago - but I don't remember if I had the same warning)
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Milbo on December 19, 2012, 23:25:53 PM
I added a vmdebug, if vmdebug activated it should now show the problematic item
Title: Re: [solved] vmError: $link["view"] is empty
Post by: lysov on March 22, 2013, 18:33:29 PM
Not solved at J! 2.5.9, VM 2.0.18c, the url is http://mir-parketa.spb.ru/index.php?option=com_virtuemart&view=category&virtuemart_category_id=43
vmdebug self::$_jpConfig->lang ru_ru
vmdebug vmTime: loadConfig db no: 0.00563311576843
vmdebug Start used Ram 12.5M
vmdebug my item with empty $link["view"] Var1:
stdClass Object
(
    [id] => 9
    [menutype] => left
    [title] => Паркетная доска
    [alias] => 2010-02-25-13-50-21
    [note] =>
    [path] => 2010-02-25-13-50-21
    [link] => index.php?option=com_virtuemart
    [type] => component
    [published] => 1
    [parent_id] => 1
    [level] => 1
    [component_id] => 0
    [ordering] => 2
    [checked_out] => 0
    [checked_out_time] => 0000-00-00 00:00:00
    [browserNav] => 0
    [access] => 1
    [img] =>
    [template_style_id] => 0
    [params] => {"product_id":"","category_id":7,"flypage":"","page":"","page_title":"","show_page_title":1,"pageclass_sfx":"","menu_image":"","secure":0,"show_page_heading":0}
    [lft] => 83
    [rgt] => 84
    [home] => 0
    [language] => *
    [client_id] => 0
)

Array
(
)
vmdebug my item with empty $link["view"] Var1:
stdClass Object
(
    [id] => 13
    [menutype] => right
    [title] => Прайс-лист
    [alias] => catalog
    [note] =>
    [path] => catalog
    [link] => index.php?option=com_virtuemart
    [type] => component
    [published] => 1
    [parent_id] => 1
    [level] => 1
    [component_id] => 0
    [ordering] => 5
    [checked_out] => 0
    [checked_out_time] => 0000-00-00 00:00:00
    [browserNav] => 0
    [access] => 1
    [img] =>
    [template_style_id] => 0
    [params] => {"product_id":"","category_id":"","flypage":"","page":"","page_title":"","show_page_title":1,"pageclass_sfx":"","menu_image":"","secure":0,"show_page_heading":0}
    [lft] => 129
    [rgt] => 134
    [home] => 0
    [language] => *
    [client_id] => 0
)

Array
(
)
vmdebug subtotal vattax id 1 = 0
vmdebug subtotal vattax id 1 = 0
vmdebug $this->category коллекция "SALSA"
vmdebug vmTime: VirtuemartControllerCategory Finished task : 0.337886095047
vmdebug End used Ram 21M
vmdebug Peak memory peak 21M

vmError: $link["view"] is empty
vmError: $link["view"] is empty


[attachment cleanup by admin]
Title: Re: [solved] vmError: $link["view"] is empty
Post by: lysov on March 22, 2013, 18:51:19 PM
Another example / url with this error (I switch on global SEO), the url is http://mir-parketa.spb.ru/store/корзина
vmdebug self::$_jpConfig->lang ru_ru
vmdebug vmTime: loadConfig db no: 0.00597500801086
vmdebug my item with empty $link["view"] Var1:
stdClass Object
(
    [id] => 9
    [menutype] => left
    [title] => Паркетная доска
    [alias] => 2010-02-25-13-50-21
    [note] =>
    [path] => 2010-02-25-13-50-21
    [link] => index.php?option=com_virtuemart
    [type] => component
    [published] => 1
    [parent_id] => 1
    [level] => 1
    [component_id] => 0
    [ordering] => 2
    [checked_out] => 0
    [checked_out_time] => 0000-00-00 00:00:00
    [browserNav] => 0
    [access] => 1
    [img] =>
    [template_style_id] => 0
    [params] => {"product_id":"","category_id":7,"flypage":"","page":"","page_title":"","show_page_title":1,"pageclass_sfx":"","menu_image":"","secure":0,"show_page_heading":0}
    [lft] => 83
    [rgt] => 84
    [home] => 0
    [language] => *
    [client_id] => 0
)

Array
(
)
vmdebug my item with empty $link["view"] Var1:
stdClass Object
(
    [id] => 13
    [menutype] => right
    [title] => Прайс-лист
    [alias] => catalog
    [note] =>
    [path] => catalog
    [link] => index.php?option=com_virtuemart
    [type] => component
    [published] => 1
    [parent_id] => 1
    [level] => 1
    [component_id] => 0
    [ordering] => 5
    [checked_out] => 0
    [checked_out_time] => 0000-00-00 00:00:00
    [browserNav] => 0
    [access] => 1
    [img] =>
    [template_style_id] => 0
    [params] => {"product_id":"","category_id":"","flypage":"","page":"","page_title":"","show_page_title":1,"pageclass_sfx":"","menu_image":"","secure":0,"show_page_heading":0}
    [lft] => 129
    [rgt] => 134
    [home] => 0
    [language] => *
    [client_id] => 0
)

Array
(
)
vmdebug Start used Ram 13.5M
vmdebug CustomsFieldCartDisplay Var1:
29::953:4;
vmdebug subtotal vattax id 1 = 0
vmdebug getOrderWeight Var1:
22.0000
vmdebug shipmentmethod Стандартная = TRUE for variable weight = 44 Reason: is within Range of the condition from 1 to 9999999999
vmdebug shipmentmethod Стандартная = TRUE for variable products quantity = 2 Reason: is within Range of the condition from 1 to 999999999
vmdebug shipmentmethod Стандартная = TRUE for variable order amount = 3500 Reason: no boundary conditions set
vmdebug shipmentmethod Стандартная = TRUE for variable zip = 194100 Reason: is within Range of the condition from 190000 to 199999
vmdebug shipmentmethod Стандартная = TRUE for variable virtuemart_country_id = 176, Reason: Country in rule or none set
vmdebug shipmentmethod Стандартная = TRUE for variable weight = 44 Reason: is within Range of the condition from 1 to 9999999999
vmdebug shipmentmethod Стандартная = TRUE for variable products quantity = 2 Reason: is within Range of the condition from 1 to 999999999
vmdebug shipmentmethod Стандартная = TRUE for variable order amount = 3500 Reason: no boundary conditions set
vmdebug shipmentmethod Стандартная = TRUE for variable zip = 194100 Reason: is within Range of the condition from 190000 to 199999
vmdebug shipmentmethod Стандартная = TRUE for variable virtuemart_country_id = 176, Reason: Country in rule or none set
vmdebug CustomsFieldCartDisplay Var1:
29::953:4;
vmdebug loginform $url Var1:
/store/корзина
vmdebug vmTime: VirtuemartControllerCart Finished task : 0.853842973709
vmdebug End used Ram 30.5M
vmdebug Peak memory peak 30.75M

This problem also is discussed at https://forum.virtuemart.net/index.php?topic=105330.0
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Saliven007 on April 05, 2013, 16:34:19 PM
Do you using JoomSEF? If yes, check if plugin System - ARTIO JoomSEF isnt disabled ;-)
Title: Re: [solved] vmError: $link["view"] is empty
Post by: jillymot on April 08, 2013, 06:28:51 AM
I am getting this error and with vmdebug on I get the following message:

Quotevmdebug self::$_jpConfig->lang en_gb
vmdebug vmTime: loadConfig db no: 0.003209114074707
vmdebug my item with empty $link["view"] Var1:

stdClass Object
(
    [id] => 21
    [menutype] => virtuemart
    [title] => Home
    [alias] => home-1
    [note] =>
    [path] => home-1
    [link] => index.php?option=com_virtuemart
    [type] => component
    [published] => 1
    [parent_id] => 1
    [level] => 1
    [component_id] => 10000
    [ordering] => 1
    [checked_out] => 0
    [checked_out_time] => 0000-00-00 00:00:00
    [browserNav] => 0
    [access] => 1
    [img] =>
    [template_style_id] => 0
    [params] => {"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}
    [lft] => 61
    [rgt] => 62
    [home] => 0
    [language] => *
    [client_id] => 0

Could you please help interpret what the problem is and what action I need to take?  I am in the middle of upgrading this site and this message has only just started appearing during testing when I logged in as previous user and was taken to the page to update details.


UPDATE:  After viewing another forum post that suggested this was happening when logging in as a user who is an Administrator, I found this to be the case.  So will just setup another Registered user to test and fingers crossed won't see the error anymore. 
Title: vmError: $link["view"] is empty
Post by: franzpeter on April 10, 2013, 14:37:54 PM
This is a very serious error and very bad for search engines. If a category for example is removed or if the slug changes, VM obviously uses something completely wrong. Instead, if VM frontpage for example is the default start page and if you enter the non existing url, VM does not show an error and does not search for the correct menu entry in the Joomla menu, which would be normally www.myhomepage.com for example (the menu link for VM if VM frontpage is the start page). Instead it uses something like www.myhomepage.com/index.php?option=com_virtuemart instead of the correct address which should be something like www.myhomepage.com/index.php?option=com_virtuemart&view=virtuemart for example. So a crawler, if a category is changed or deleted, does not get an error or a redirect to the correct homepage address, instead it is redirected to a physically non existing menu item, which returns duplicate meta infos a.s.o.. Very bad for search engines!!!
Title: Re: [solved] vmError: $link["view"] is empty
Post by: franzpeter on April 10, 2013, 15:59:25 PM
I did find something, what could help until the developers remove that bug. In /components/com_virtuemart/virtuemart.php I did replace at the end of the file this:
} else {
    vmDebug('VirtueMart controller not found: '. $_class);
    $mainframe = Jfactory::getApplication();
    $mainframe->redirect('index.php?option=com_virtuemart');
}

with that:
} else {
    vmDebug('VirtueMart controller not found: '. $_class);
    $mainframe = Jfactory::getApplication();
    $mainframe->redirect(JRoute::_ ('index.php?option=com_virtuemart'));
}

Now, it works, hope so, as it should. The problem is, that obviously in case of not finding Virtuemart controller, it needs to be routed via JROUTE. But it is just a workaround. I think that the whole part of the mentioned code needs an overhaul. I do not understand if a menu entry in Joomla menu is available, why the debug function gets activated showing that the VirtueMart controller is not found!

A strange thing is, that with second level categories, if they get deleted or the slug is changed, that VM uses a modus, which shows all products.
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Milbo on April 10, 2013, 17:52:09 PM
and how works this?
$mainframe->redirect('index.php?option=com_virtuemart&view=virtuemart');

Btw, the searchengines get a 404 if a product or category was not found, but the user should see the normal shop /category with the message product/category not found. This is the way I wrote it,... maybe there is a bug, but just that you guys know how it is intended.
Title: Re: [solved] vmError: $link["view"] is empty
Post by: franzpeter on April 10, 2013, 18:23:15 PM
Well Milbo,

that is another way to redirect but I think there is a problem with crawlers with the default code in virtuemart.php. If a category is not found and if VM is the default standard start page for Joomla, it produces some problems because you receive page doublets. index?option=com_virtuemart shows somehow the frontpage but only somehow. For a crawler it must look like a page doublet. Another thing is that: index.php?option=com_virtuemart&view=category&virtuemart_category_id=0. Entering that shows all products but that page is not linked to a Joomla menu, so it produces only acceptable results if you use the pagination. The default display is exactly the same problem as described with not found categories.
I see those problems in Google Webmaster tools and if they declare it as a problem, it is a problem. Those pages are outside the standard pages. They are not linked to Joomla, I would say that they work somehow in a panic mode.

And, in the case of products it works as described by you showing product not found. But I do not see any information if a category is not found. There is no error message and what the users and the crawlers see in case of not existing categories is the panic mode, the pseudo VM frontpage.

Just did try, what you proposed: $mainframe->redirect('index.php?option=com_virtuemart&view=virtuemart');

It delivers the panic mode page too. If I use
$mainframe->redirect(JRoute::_ ('index.php?option=com_virtuemart'));

it redirects to the correct homepage.
Title: Re: [solved] vmError: $link["view"] is empty
Post by: Milbo on April 10, 2013, 21:03:01 PM
Quote from: franzpeter on April 10, 2013, 18:23:15 PM
And, in the case of products it works as described by you showing product not found. But I do not see any information if a category is not found. There is no error message and what the users and the crawlers see in case of not existing categories is the panic mode, the pseudo VM frontpage.

Haha panic mode, yes it is. It is a fallback. But this is a good hint. It shows me that I implemented it just not correct for the categories or maybe just forgot it. It is a long time ago that I wrote it.
Title: Re: [solved] vmError: $link["view"] is empty
Post by: franzpeter on April 11, 2013, 14:12:06 PM
I think it has to do something with url encoding. JRoute does create & a.s.o. if we use JRoute. So
this: $mainframe->redirect('index.php?option=com_virtuemart');

is different from:
$mainframe->redirect(JRoute::_ ('index.php?option=com_virtuemart'));
JRoute delivers something like: index.php%3Foption%3Dcom_virtuemart
while
index.php?option=com_virtuemart remains unencoded.
It works, as long as we only use VM methods, but if it is in Joomla (like the menu links), we have doublets, it delivers same page with slightly different content. So for example if we define VM categories and subcategories in a Joomla menu and we use something like a native VM module without JRoute, we have double urls, one encoded and one unencoded.