VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: dsrpmedia on August 21, 2016, 02:40:50 AM

Title: BUG? White screen loads on category pages with only sub categories (no product)
Post by: dsrpmedia on August 21, 2016, 02:40:50 AM
Hi

Using j 3.6.2 / vm 3.0.16

I have some categories which have no products - but they do have subcategories which have products

When I visit these pages (categories which have no products) all I get is a white screen

When I add a product to one of these categories the the page with allits sub categories loads fine?!

I have tried switching the template to the standard Beez & got the same behavior, so it is not a template thing - is this a bug?

any help would be greatly appreciated
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: GJC Web Design on August 21, 2016, 03:01:50 AM
Quoteall I get is a white screen

and the error is?
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: jenkinhill on August 21, 2016, 12:59:45 PM
http://forum.virtuemart.net/index.php?topic=117042.0
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: dsrpmedia on August 22, 2016, 00:43:17 AM
Quoteand the error is?

there is no error - there is no code at all

Quotehttp://forum.virtuemart.net/index.php?topic=117042.0

I went through the forum as best I could understand it - installed/configured the error reporting plugin then went to the blank page (category with sub categories but no products) - but I got no email from the plugin

I`ve got this deja vu feeling - I seem to recollect an issue like this with like VM 1.0, but can t recall how it was resolved

I am porting the site over to a completely different hosting company and see if the issue is with the current host (GoDaddy)
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: GJC Web Design on August 22, 2016, 01:21:34 AM
In this case then the host should be able to tell you the error -
all errors are logged somewhere...
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: dsrpmedia on August 22, 2016, 01:41:34 AM
that is the really weird thing

neither host has any error logged from this site (duplicate sire running on 2 hosts - same behaviour)

also - the plugin that is supposed to send email on blank screens & errors is sending nothing

the code on the page (Category with sub categories but no products is just <html><head<</head> <body></body></html>

there is nothing else there

if you want to see for yourself go to
http://5star.fyicreative.net/online-store-2/badges-seals-wallets (http://5star.fyicreative.net/online-store-2/badges-seals-wallets) --> category with no products (blank page)
http://5star.fyicreative.net/online-store-2/accessories (http://5star.fyicreative.net/online-store-2/accessories) --> category with products (loads fine)



Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: dsrpmedia on August 22, 2016, 02:17:22 AM
Finally got an email from the error alert plugin
RuposTel.com plg_system_fatal_catcher plugin detected a problem with your site.
Your site caused a blank screen upon a visit of this URL:

http://5star.fyicreative.net/online-store/epaulette-coverws-slip-on/epaulette-covers-slip-on-cafc

Error message data:
1 Class 'CurrencyDisplay' not found in file: /.../components/com_virtuemart/views/category/view.html.php line: 160
-----------------------------------------------------------------

this would appear to be the block of code causing  the issue


Quote
            if ($this->products) {
               $this->currency = CurrencyDisplay::getInstance( );
               $display_stock = VmConfig::get('display_stock',1);
               $showCustoms = VmConfig::get('show_pcustoms',1);
               if($display_stock or $showCustoms){

I`m not a coder - but it looks like there is an 'if' for if there is products - but not for if there is not?
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: GJC Web Design on August 22, 2016, 10:31:29 AM
?????   https://forum.virtuemart.net/index.php?topic=133888.0
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: dsrpmedia on August 22, 2016, 19:44:33 PM
that did it!

thank you

hopefully this will be fixed in the next release
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: Milbo on August 23, 2016, 11:06:06 AM
Please test with it http://dev.virtuemart.net/attachments/download/1011/com_virtuemart.3.0.17.6_extract_first.zip
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: dsrpmedia on August 24, 2016, 01:12:23 AM
this version does not appear to have the white screen problem - thank you!
Title: Re: BUG? White screen loads on category pages with only sub categories (no product)
Post by: Milbo on August 25, 2016, 21:56:24 PM
Thank you for testing.