2.0.24b Blank page with a menu to "Categories List -> First Category Level"

Started by simbus82, November 19, 2013, 16:35:34 PM

Previous topic - Next topic

simbus82

When i create a link to the "parent" of all categories i have a black page. In Joomla menu is "Categories List"...

The url generated is

/index.php?option=com_virtuemart&view=categories&virtuemart_category_id=0

Why now, with 2.0.24b, i see a blank page?
(source code is really blank!)
Joomla! 2.5.16 & VM 2.0.24b

simbus82

The problem occour even i select a single category.


With "developer error message" i can see

Fatal error: Using $this when not in object context in /home/var/www/gialdi.quantility.it/administrator/components/com_virtuemart/models/category.php on line 121


public function getChildCategoryList($vendorId, $virtuemart_category_id,$selectedOrdering = null, $orderDir = null, $cache = true) {

if($selectedOrdering===null){
//$selectedOrdering = VmConfig::get('browse_cat_orderby_field','category_name');
$selectedOrdering = $this->_selectedOrdering;
}
if(!in_array($selectedOrdering, self::$_validOrderingFields)){
$selectedOrdering = 'category_name';
}

if($orderDir===null){
//$orderDir = VmConfig::get('cat_brws_orderby_dir', 'ASC');
$orderDir = $this->_selectedOrderingDir;
}





if i comment the row with the "$this" all works!!!

found a bug, debugged, bypassed the error... now i hope in a fast release of solution please :-(
Joomla! 2.5.16 & VM 2.0.24b

jenkinhill

No problem here. Check your configuration.

For categories display I have a main menu link set to VM type "Category Layout" with the  "Select a Category" set to Top Level Category and "Browsepage" set to no override.

Then in Config/Templates/Shopfront Settings I have set "Category Layout" to "Categories".  I have no overrides and am using Beez20 template.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

simbus82

Quote from: jenkinhill on November 19, 2013, 18:35:05 PM
No problem here. Check your configuration.

For categories display I have a main menu link set to VM type "Category Layout" with the  "Select a Category" set to Top Level Category and "Browsepage" set to no override.

Then in Config/Templates/Shopfront Settings I have set "Category Layout" to "Categories".  I have no overrides and am using Beez20 template.

See my last edit please!

The problem is with menu link set to "Categories Layout", the layout that call the tmpl in "categories" folder inside VM frontend component.
Joomla! 2.5.16 & VM 2.0.24b

Milbo

Beware the difference please and this is also the reason we removed it.

We had a catgorieS view and a categorY view. We removed the categories view and what you see there is just the old view, which is not maintained anylonger. So how to reproduce the old categories view? There are two ways.

Either you use the way of Jenkinhill to set for all category's views as default the layout "categories". Or and I think this is what you want to achieve is to create a menulink to the view category and to select there the categories layout.

Quote from: simbus82 on November 19, 2013, 16:35:34 PM
The url generated is
/index.php?option=com_virtuemart&view=categories&virtuemart_category_id=0

So you can see at your link, that you used the obsolete categories view. Why we did not remove the obsolete view? because a lot people use it the old way, with their overrides and it should still work for them as they are used to it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

simbus82

Quote from: Milbo on November 19, 2013, 18:52:32 PM
Beware the difference please and this is also the reason we removed it.

We had a catgorieS view and a categorY view. We removed the categories view and what you see there is just the old view, which is not maintained anylonger. So how to reproduce the old categories view? There are two ways.

Either you use the way of Jenkinhill to set for all category's views as default the layout "categories". Or and I think this is what you want to achieve is to create a menulink to the view category and to select there the categories layout.

Quote from: simbus82 on November 19, 2013, 16:35:34 PM
The url generated is
/index.php?option=com_virtuemart&view=categories&virtuemart_category_id=0

So you can see at your link, that you used the obsolete categories view. Why we did not remove the obsolete view? because a lot people use it the old way, with their overrides and it should still work for them as they are used to it.

Oh thanks, but where you have write in site about this?

So i need to create a my override of "categorY" with same logic of "categorIES" and select it in the menu link "single category"?
Joomla! 2.5.16 & VM 2.0.24b

Milbo

You dont need any overwrite. You just go to your menu in joomla, add a new menu,... choose the vm categorY layout. Select their in the joomla parameter part the layout "categories". Thats it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

anna_w27

I had the same problem, and I've tried your solutions, but it only works with the Beez20 template, and when you click on a category it takes ages loading... Is there another way to fix it?.. And is there a possibility to go back to the previous Virtuemart version first, so I can test...

anna_w27

Hm.. just found out, that at one of my other websites it does work... I will test some more.

Milbo

We announced also in the news before that categories view is obsolete.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

anna_w27

At the moment my backend is down. I get a blank page with http error 503. When it was still working I've made a backup and installed at localhost, but here I have the same problem now. Any idea what happened? I only made some adjustments to the category menus.

Milbo

that should not affect in any case the backend. php version? joomla version,.. etc?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

anna_w27


anna_w27

When I change the following in configuration.php (public $ gzip = "1";) to (Public $ gzip = "0";) the backend is working again.
But I think the problem has to do with something else, but I don't have a clue what, but maybe that's not your problem :p

Thank you anyways!