Author Topic: Upgrading to 3.2.12 and lost my category layout override  (Read 155 times)

Jokingmind

  • Beginner
  • *
  • Posts: 6
  • A beginner
Upgrading to 3.2.12 and lost my category layout override
« 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!

Jokingmind

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Upgrading to 3.2.12 and lost my category layout override
« Reply #1 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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7690
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Upgrading to 3.2.12 and lost my category layout override
« Reply #2 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jokingmind

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Upgrading to 3.2.12 and lost my category layout override
« Reply #3 on: January 09, 2018, 10:51:38 am »
OK, as I supposed the problem is related to this line
Code: [Select]
<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
  • everything seems to work fine.


Can you explain me this behavior?

Thanks!