VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Jokingmind on January 03, 2018, 16:44:50 PM

Title: Upgrading to 3.2.12 and lost my category layout override
Post by: Jokingmind on January 03, 2018, 16:44:50 PM
Hello.
---------------------------------------
Joomla! 3.8.3 Stable
Php  7.1.12
Template - Gantry Framework with Helium v5.4.22
VM upgraded from 3.2.4 to 3.2.12
-----------------------------------------
I'm facing an issue with the upgrade of VM.
It seems it doesn't load my category view layout, even if it is selected.
And in most cases I recive this error: 0 Call to a member function displayMediaThumb() on null

You can compare the live site (no upgrade): www.shop.barbieri-italiani.it
with the test site: www.bidev.davide-strati.it

If you take a look at the category pages VM is able to load only the first item of the main menu with some errors (and only for the italian language) while the others category pages recive this 0 Call error.
No problem with the product pages.

What I have changed in the category layout is the product layout that is called from category, in order to load the second image of the product and not the first one (that has a gary background).

Thanks for help!
Title: Re: Upgrading to 3.2.12 and lost my category layout override
Post by: Jokingmind on January 03, 2018, 17:59:52 PM
Tried with 3.2.8 too, same result.
Uploaded using jenkinhill suggestions.
Also tried to switch template, no changes.
Title: Re: Upgrading to 3.2.12 and lost my category layout override
Post by: GJC Web Design on January 08, 2018, 11:52:54 AM
Find the line that is causing this by switching on full debugging/error

Then it can be fixed.. prob. from one of the sublayouts ..  e.g. product.php
Title: Re: Upgrading to 3.2.12 and lost my category layout override
Post by: Jokingmind on January 09, 2018, 10:51:38 AM
OK, as I supposed the problem is related to this line

<a title="<?php echo $product->product_name ?>" href="<?php echo $product->link.$ItemidStr?>">
<?php
echo $product->images[1]->displayMediaThumb('class="browseProductImage"'false);
?>

</a>

Here I've changed the images[0] to images[1] in order to select the second image of the product that has a white background, insted of a gray one.
Before the update this line wasn't a problem, now it is, but i don't understand why.
If I revert it back to