I am trying to: activate the layouts plugin, all fine in the backend
I visited this URL: any category in the site, on frontend side, with the layouts plugin active
I expected to see: the normal category page, but i get an error
Instead, I got:
PHP Fatal error: Call to a member function get_cells_of_type() on integer in wp-content/plugins/layouts/classes-auto/wpddl.layouts.render.manager.class.php on line 885, referer: /product-category/jewellery/necklaces/
All else works fine, if i disable the layouts plugin all back to normal.
Hi, that's not normal - let's try some troubleshooting steps:
- Make sure your Toolset plugins have all been updated to their latest versions
- It looks like you're using WooCommerce, so please make sure it's up-to-date as well, along with WordPress
- Temporarily activate a default theme like Twenty Seventeen to see if this resolves the problem
- Are you using WooCommerce Views? If so, what are your settings in Toolset > WooCommerce Views for Product Template Files and Product Archive Template Files?
Here's the requested info:
Confirmed - Make sure your Toolset plugins have all been updated to their latest versions
Confirmed - It looks like you're using WooCommerce, so please make sure it's up-to-date as well, along with WordPress
Tried this now - Temporarily activate a default theme like Twenty Seventeen to see if this resolves the problem
- Are you using WooCommerce Views? If so, what are your settings in Toolset > WooCommerce Views for Product Template Files and Product Archive Template Files?
YES, WooCom views was active.
I went to that configuration page and tried both "WooComm default template" as well as "Views plugin default single product template" for both Product Template and Product Archive Teamplate.
The only additional indication i have there is that it says:
"Congrats! The products template you selected uses Layouts. Next, you need to create a layout for products."
Will try to figure it out, but so far no improvement or progress, so any additional guidance would be appreciated.
I was just researching this error in our internal ticket system and it appears that another person has run across this bug as well. They were able to bypass the fatal error by creating a Layout and assigning it to the product category archive. Once a Layout was applied, then the fatal error stopped. It appears our developers have a permanent fix for this planned for the next release of Layouts (since it should not be mandatory to define a Layout for this archive), but for now the best solution is to create a Layout and apply it to this archive.
I followed your advice and got it to work in that particular setup.
However, I'd need the product-category pages (or other views) to work when the layouts plugin is enabled even when I choose to use the theme or woocommerce views for a certain page.
I understand this is not possible with the current code, right? Can you share any estimation (not binding, of course) on when the patch will be released?
However, I'd need the product-category pages (or other views) to work when the layouts plugin is enabled even when I choose to use the theme or woocommerce views for a certain page.
As far as I know, this issue only affects product taxonomy archive pages. If you place a View on a separate page or post, it should not experience fatal errors related to this issue. You are correct, it does not appear to make any difference if you choose "WooCommerce Plugin Default Archive Template (doesn't display layouts)" or "WooCommerce Views plugin default product archive template" - if you have Layouts plugin active but no Layout assigned to the Product Taxonomy archive, you will see the error.
I don't have a firm date for the plugin update, but I expect that an erratum post will be published within the next few days with a temporary patch. As soon as I hear more about that, I will update you here.
Hi, just a quick update to let you know that Layouts 2.0.1 has been released. The new version includes a fix for the Fatal Error you encountered earlier with no Layout assigned. Please let me know if you are still experiencing this error after updating. Thanks!