#51 – Issues with Woocommerce - Astra Theme

Posted in ‘weeblrAMP’
This is a public ticket. Everybody will be able to see its contents. Only enter usernames, passwords or any other sensitive information in the Private information field.
Monday, 12 February 2018 05:56 UTC
mlargue
 I am receiving the following error message when viewing a single product page:

Fatal error: Uncaught Error: Call to a member function get_availability() on string in /app/public/wp-content/themes/astra/inc/compatibility/woocommerce/woocommerce-common-functions.php:125 Stack trace: #0 /app/public/wp-includes/class-wp-hook.php(288): astra_woo_product_in_stock('', '') #1 /app/public/wp-includes/plugin.php(203): WP_Hook->apply_filters('', Array) #2 /app/public/wp-content/plugins/weeblramp-theme-wc/layouts/weeblramp/frontend/amp/contents/wc_add_to_cart_simple.php(51): apply_filters('woocommerce_get...', '', '', Object(WC_Product_Simple)) #3 /app/public/wp-content/plugins/weeblramp/vendor/weeblr/wblib/packages/mvc/layout/file.php(114): include('/app/public/wp-...') #4 /app/public/wp-content/plugins/weeblramp/vendor/weeblr/wblib/packages/mvc/layout/helper.php(24): WblMvcLayout_File->render(Array) #5 /app/public/wp-content/plugins/weeblramp-theme-wc/layouts/weeblramp/frontend/amp/contents/wc_single_item.php(125): WblMvcLayout_Helper::render('weeblramp.front...', Array, '/app/public/wp-...') #6 /app/public/w in /app/public/wp-content/themes/astra/inc/compatibility/woocommerce/woocommerce-common-functions.php on line 125

Any ideas?
 
Monday, 12 February 2018 08:38 UTC
wb_weeblrpress
Hi

This is your theme acting up. It still runs some code which breaks because the complete theme is not loaded on AMP pages.

To prevent that, I would recommend you make sure your theme is disabled on AMP pages which is a simple setting in weeblrAMP, under the "Comments and plugins" tab of weeblrAMP configuration: Find the "Theme management" section and set the theme to "Disabled":



Please see more details in the documentation on this page.

Regards
 
Monday, 12 February 2018 08:50 UTC
mlargue
Hi again

Thanks for the quick response. Unfortunately it didn’t work. In fact, it was already deactivated. To make sure, I enabled it, saved, disabled it, saved, and then tried again. Same error message.

Any other thoughts? It is quite important that I get this theme working.

Regards
Michael
 
Monday, 12 February 2018 09:16 UTC
wb_weeblrpress
Hi

1 -
Any other thoughts? It is quite important that I get this theme working.
Your main site wil not and cannot work on AMP pages - unless you customize it in a way that it becomes AMP-compatible. Maybe you simply means that you do not want an error happening?

Just to be clear, this error is not happening in weeblrAMP, but in your theme. Your theme code should not be running at all on AMP pages, yet it still does.

2 - If the theme is marked as disabled, but is still active, it can mean:

a - The MU-plugin we use to disable other plugins and theme is not working. Maybe it's not there? Can you look into /wp-content/plugins/mu-plugins if our weeblramp_plugins_handler.php file is there? Are there any other files in that directory?

b - The theme code is being loaded manually somwhere. Do you have custom code on that site? anywhere in the theme or in specific plugins?

Regards
 
Monday, 12 February 2018 09:42 UTC
mlargue
OK, here goes...

1. I am aware that this could be an issue with the theme, and I have also been in contact with the theme provider. I am still awaiting their response - time zone issue - but I was hoping that, with your experience, you could point me in the right direction.

2a. The weeblramp_plugins_handler.php is where it is supposed to be and there are no other files in that directory.

2b. There is no custom code being run on the site, in the theme or in plugins.

Thanks for your help so far, but perhaps I need to wait for feedback from the theme provider. I may yet have to find an alternative theme.

By the by, does your plugin support custom post types? It would be great if it handled WP Job Manager/Resume Manager posts.

Regards
Michael
 
Monday, 12 February 2018 10:24 UTC
wb_weeblrpress
Hi,

1. I am aware that this could be an issue with the theme, and I have also been in contact with the theme provider. I am still awaiting their response - time zone issue - but I was hoping that, with your experience, you could point me in the right direction.
What should happen with the theme is that no code for it runs. At all. It can only break as the theme assumes many things code-wise that simply do not exist when an AMP page is rendered.

Thanks for your help so far, but perhaps I need to wait for feedback from the theme provider.
I would not expect much from that, few provides AMP support. It's actually quite easy to handle from their side (just don't do anything if current page is AMP page) but it's just not handled yet.

If you provide FTP and super user access to the site, I can have a look and maybe understand why the theme would not be disabled using the usual approach we use.

By the by, does your plugin support custom post types? It would be great if it handled WP Job Manager/Resume Manager posts.
This is not about "supporting custom pst types" really. I could say we do, there's nothing special about CPT. This is more about providing appropriate display layouts for WP Job Manager specifically (which we don't).

Each CPT operates differently and need different output. Usually your theme will provide for that, or the plugin providing the CPT (WP Job Manager). If the output layouts are in the plugin, then it should "work" out of the box. But it may not look good. And if that CPT relies on javascript for instance, it will simply not work.
Al of that to say that writing custom output layouts for WP Job Manager is probably required to have a proper output.

Regards


 
Monday, 12 February 2018 19:57 UTC
mlargue
Hi,

As to access to the site...

Unfortunately, I am only running it on a local installation - busy getting familiar with AMP and testing weeblrAMP for use on all my proposed sites. When I get a moment, I will create a web-based test site for you.

Another question, are there any additional baseline AMP themes/templates that I can use? Something with a fixed header with inline cart, search and menu icons?

Regards
Michael
 
Monday, 12 February 2018 22:14 UTC
mlargue
Hi again,

The more I work with your plugin, the more I like it. Rock-solid design and development. Support is also excellent. I have posted a review on Wordpress.

What would it take to provide WP Job Manager support in the plugin(time and money)? It would appear that the main issues would seem to be forms and searches, perhaps.

Regards
Michael
 
Tuesday, 13 February 2018 14:34 UTC
wb_weeblrpress
Hi Michael,

Sorry about the delayed response, I am actually attending the AMP Conf conference in Amsterdam, learning all new things about AMP.

Many thanks for the review and compliments, it's really appreciated. We would normally not undertake custom development as needed to provide support for WP Job Manager, but I think this is a good experience and we can work out something.

A first step would be to define the scope meaning probably we need to look at your current site, or the current state of your develooment, and then decide what to AMP and what not to AMP.

Due to attending the conference, it'd be great if we could postpone this discussion until the end of this week, like friday?

CHeers

 
Tuesday, 13 February 2018 19:32 UTC
mlargue
No problem
 
Wednesday, 14 February 2018 00:59 UTC
mlargue
There may be a couple of issues with the Woocommerce update. It seems that the cart and checkout pages no longer work in AMP. They kick out to the default web pages even when AMP is stipulated. This is on your demo site as well.

Michael
 
Wednesday, 14 February 2018 11:47 UTC
wb_weeblrpress
Hi Micheal,

This is as designed, those 2 pages never were amp. Cart and checkout requires too much JavaScript to be implemented within amp, at least in the general case.

We'll get there as amp evolves though, we will put a bit more effort in the coming months.

Cheers
 
Friday, 16 February 2018 20:04 UTC
wb_weeblrpress
Hi Michael,

Just got back and had to catch up today.

Unfortunately, I am only running it on a local installation - busy getting familiar with AMP and testing weeblrAMP for use on all my proposed sites. When I get a moment, I will create a web-based test site for you.
Actually, and if suitable, it's much more efficient to use something like Duplicator and provide me with a backup of the site that I can install on my local machine - this will be absolutely required if we are to proceed with making some layouts for WP Job Manager anyway, as I must have access to the PHP being executed by WP Job Manager.

Maybe that's also a way to discuss and evaluate the scope of the custom work to be done?

Rgds
 
Friday, 16 February 2018 23:22 UTC
mlargue
Hi again,

I trust the AMP conference was useful?

Concerning the Javascript issues on Cart and Checkout, do they also apply to the latest Woocommerce version? Any idea as to an ETA at this stage?

Happy to provide a version in Duplicator. I will set up two demo site using some dummy data for a jobs board and a directory site - the two primary uses of the plugins. I currently have two local environments, MAMP with Apache, and Local by Flywheel with nginx. Do you have a preference as to the source?

Regards
Michael
 
Saturday, 17 February 2018 06:19 UTC
mlargue
Hi

Can you provide me with an email address to which I can send the install and archive?

Michael
 
Monday, 19 February 2018 10:39 UTC
wb_weeblrpress
Hi

Please upload any file to the private online folder which I linked to in the "Prviate information box" below.

Concerning the Javascript issues on Cart and Checkout, do they also apply to the latest Woocommerce version? Any idea as to an ETA at this stage?
This is not about WooCommerce or weeblrAMP really, but more about AMP itself, which prevents any custom javascript to be used on AMP Pages. This is fine in most cases with standard pages, but cart and checkout pages requires a lot of interactions that are a bit harder to make with AMP. It's quite possible at least for the cart, but it requires in most cases some customization on a per site basis, so it's better to stay non-AMP on these pages.

Do you have a preference as to the source?
If it's a duplicator backup, the hosting setup does not really matters.

I will set up two demo site using some dummy data for a jobs board and a directory site - the two primary uses of the plugins
We probably won't have enough time available to quote for both jobs board and directory site, if the layouts required are different. Maybe it's better to pick one to get started with?

Likewise, it is important to decide from the get go which pages will be AMP and which ones will not. Just like for the cart and checkout pages on ecommerce, some pages on the Job Board are not good candicate for AMPlification. Of course, we need to know a bit better the site and actual content/pages to provide information on that.


Rgds
 
Monday, 19 February 2018 21:48 UTC
mlargue
Hi Yannick

I have uploaded the Job Board use case. This includes 3 themes (Jobify, Astra and Twenty Twelve).
The demo data is from Astoundify and installed by Jobify. It is probably the most popular job theme at the moment and does include a number of theme overrides.
I have also included several other WP Job Manager plugins that I use, but they remain inactive.

Regards
Michael
 
Tuesday, 20 February 2018 10:40 UTC
wb_weeblrpress
Hi

Thanks I will look at that in more details hopefully today.

This includes 3 themes (Jobify, Astra and Twenty Twelve).

The demo data is from Astoundify and installed by Jobify. It is probably the most popular job theme at the moment and does include a number of theme overrides.
Themes are not used on AMP pages, so that does not matter so much TBH.

What matters is to decide what pages should be AMP and which should not be. I would think that only the actual Job page should be AMP, not categories or such but I'll need to have a look at it first obviously.

Rgds

 
Wednesday, 07 March 2018 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.