bobbingwide / oik-block

Gut feel - helps you form Gutenberg compatibility opinions
GNU General Public License v3.0
1 stars 0 forks source link

Fatal error: undefined function bw_as_array #27

Open bobbingwide opened 6 years ago

bobbingwide commented 6 years ago

While trying the Distributor plugin I noticed a message in the Editor Selection meta box when updating External connections.

Fatal error: Uncaught Error: Call to undefined function bw_as_array() in 
C:\apache\htdocs\wordpress\wp-content\plugins\oik-block\admin\class-oik-block-editor-opinions.php:281 

Note: The oik plugin was not active at the time.

Workaround

Activate the oik plugin.

bobbingwide commented 6 years ago

I got this again on s.b/wp50-beta5 when I deactivated oik but left oik-block active. This time I got the WSOD. Fixing the bw_as_array problem led to another Fatal error.

 Uncaught Error: Call to undefined function bw_tablerow() in 
\oik-block\admin\class-oik-block-editor-opinion.php:213

Obviously more work is needed to allow oik-block to operate independently of oik.

bobbingwide commented 6 years ago

The logic which loads files should first test for the existence of the file. But bw_as_array may come from oik or oik-bwtrace. So we can't use it to determine that oik has been loaded. It would be better to test for did_action( 'oik_admin_loaded' );