sage-woocommerce icon indicating copy to clipboard operation
sage-woocommerce copied to clipboard

adding cart or checkout file results in an error 500 when visiting the page

Open mattcrn opened this issue 4 years ago • 1 comments

Description

I tried adding a custom sage template for the checkout page, but when I do that visiting the checkout page results in an white screen of death. I get no debug information although debug is set to true.

Steps to reproduce

  1. Install sage-woocommerce
  2. Copy the woocommerce folder from this repository to resources/views (now the archive and single templates work as expected)
  3. create a new folder "checkout" and in there create the form-checkout.blade.php template
  4. either add the contents from the default from-checkout.php or some dummy html
  5. on your website go to the checkout page

Expected behavior: [What you expect to happen]

The template I just created shows up

Actual behavior: [What actually happens]

After loading for some time a white screen of death appear. Network tab shows status 500 and no answer. Seems like an infinite loop to me.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

wordpress 5.3.1 woocommerce: 3.9.2 or 4.2 sage: 9.0.9 sage-woocommerce": 1.0.4

mattcrn avatar Apr 02 '20 16:04 mattcrn

I found what is causing this:

In my Page controller I got the post content using this:

apply_filters( 'the_content', get_the_content() ),

If I move the apply_filters to the template it works again.

mattcrn avatar Apr 03 '20 13:04 mattcrn