hyunsupul / aesop-core

Open-sourced suite of components that empower interactive storytelling in WordPress.
http://aesopstoryengine.com
GNU General Public License v2.0
245 stars 56 forks source link

PHP Error on posts with Aesop and Gutenberg active #337

Closed PeterArbaugh closed 5 years ago

PeterArbaugh commented 5 years ago

Hi all,

We’ve recently uncovered what seems like a bug when working with Aesop Story Engine and the latest versions of Gutenberg. When there is a Gutenberg post published, it appears there is a php error and any attempt to reach the front of the site results in an error page. To reproduce:

  1. Install and activate Gutenberg 3.9 plugin
  2. Install and activate Aesop Story Engine 2.0
  3. Create and publish a new post with the Gutenberg editor. (doesn't need to have any particular content.)
  4. Click "View Post" / Navigate to the front of the site.

This results in the error:

Fatal error: Cannot use object of type WP_Block_Parser_Block as array in /home/kmmhosti/public_html/wp-content/plugins/aesop-story-engine/public/includes/theme-helpers.php on line 72

This doesn’t seem to affect pages and we’ve been able to view pages even after we have encountered the error on posts. It also looks like the Aesop blocks do not appear on pages.

I’ve been able to reproduce this issue with

Aesop Story Engine

Gutenberg

Aesop Story Engine 1.9.10.5 and Gutenberg 3.6.2 seem to work fine together.

peiche commented 5 years ago

I've submitted PR #336 to address this issue. @hyunsupul, can you take a look?

hyunsupul commented 5 years ago

Made a new release 2.0.1 that addresses this issue. Thanks all.