VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: simbus82 on November 19, 2013, 16:35:34 PM

Title: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: simbus82 on November 19, 2013, 16:35:34 PM
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!)
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: simbus82 on November 19, 2013, 16:45:56 PM
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 :-(
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: 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.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: simbus82 on November 19, 2013, 18:42:27 PM
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.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: 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.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: simbus82 on November 19, 2013, 19:02:59 PM
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"?
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: Milbo on November 19, 2013, 23:20:59 PM
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.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: jenkinhill on November 20, 2013, 00:06:02 AM
Quote from: simbus82 on November 19, 2013, 19:02:59 PM
Oh thanks, but where you have write in site about this?

It was in the news, http://virtuemart.net/news/latest-news/450-virtuemart-2-0-24a-includes-klarna-checkout see #3 under "New features in VirtueMart 2.0.24a"
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: anna_w27 on November 20, 2013, 10:52:46 AM
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...
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: anna_w27 on November 20, 2013, 11:09:02 AM
Hm.. just found out, that at one of my other websites it does work... I will test some more.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: Milbo on November 20, 2013, 11:38:16 AM
We announced also in the news before that categories view is obsolete.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: anna_w27 on November 20, 2013, 12:21:03 PM
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.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: Milbo on November 20, 2013, 12:56:26 PM
that should not affect in any case the backend. php version? joomla version,.. etc?
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: anna_w27 on November 20, 2013, 13:10:54 PM
PHP Version 5.3.10
Joomla 2.5.16
Virtuemart 2.0.24b
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: anna_w27 on November 20, 2013, 13:21:34 PM
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!
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: anna_w27 on November 21, 2013, 10:25:01 AM
My whole website was blank caused by Phoca Virtuemart Category Module. It doesn't work with the new version Virtuemart.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: Milbo on November 21, 2013, 11:54:12 AM
Please read here http://forum.virtuemart.net/index.php?topic=120413.msg410322#msg410322

There is a new category model provided, just replace your old one and everything will work again. You should also update your php to 5.3 latest
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: bomneukmc on December 08, 2013, 16:20:48 PM
Hi Milbo,

This stiill doens't work for me. I added it and also created the suggested menu item, it does show only the categories. But after clicking on the category the products' won't show up And i get an blank page. I know that for some people the 'solution'  works, but not for me. I updated all the components, tried different overrides nothing works.

Plz help
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: bomneukmc on December 08, 2013, 16:33:19 PM
Ok I have finally found the answer:

In order to get the 'old' categories layout back you need to do the next steps:

1. create the categories.php file as suggested by milbo
2. After you uploaded the categories.php file set your menu view to categories and save it
3. edit the file : administrator/components/com_virtuemart/views/category/view.html.php and replace the following line(around line 216):

if(!empty($menu->query['categorylayout'])){

replace it with:
if(!empty($menu->query['categorylayout']) and $menu->query['virtuemart_category_id']==$categoryId){

Now the 'old' category layout without all the products udnerneath will show, and the category page will not be blank anymore.

Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: Milbo on December 10, 2013, 19:14:40 PM
No you do NOT TO HACK THE CORE, damnit

This is solved since weeks, please just use the latest version http://dev.virtuemart.net/attachments/download/666/com_virtuemart.2.0.25f_extract_first.zip

What you do is just to copy the category view and call it categories and choose then right layout.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: Milbo on December 11, 2013, 02:24:49 AM
Quote from: Milbo on December 10, 2013, 19:14:40 PM
No you do NOT need TO HACK THE CORE, damnit

This is solved since weeks, please just use the latest version http://dev.virtuemart.net/attachments/download/666/com_virtuemart.2.0.25f_extract_first.zip

What you do is just to copy the category view and call it categories and choose then right layout.
Title: Re: 2.0.24b Blank page with a menu to "Categories List -> First Category Level"
Post by: userakos on April 21, 2014, 19:06:27 PM
Quote from: Milbo on November 19, 2013, 23:20:59 PM
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.

Hi,

I followed the solution going to the menu item and setting the parameter "Page Layout" to "categories" but I see an empty page.
If I use the other solution through the VM configuration it works but I don't want this solution because it hides the products.

I have created only 1 category with two products.
I use the latest version 2.6.0 of VM.

Thanks