Closed mattleff closed 1 year ago
Hi @mattleff,
I am going to check PR but I want to ask you please do not keep your changes until a new version of the theme is released.
Check status here: https://github.com/adventistchurch/alps-wordpress/pull/668 or on releases in github.
Thanks, Best Regards!
@YauheniKapliarchuk I believe this issue was resolved by #695
@claytonk
Thank you for this, You're right!
In #538 the header block featured was added with two undefined variables,
$mediaBlockTitleLink
which was assigned the undefined variable$headerTitleLink
:https://github.com/adventistchurch/alps-wordpress/blob/77598f35284385044123a9d46b0dbb65a90fb9e5/resources/views/patterns/01-molecules/blocks/header-block-featured.blade.php#L15
and
$mediaBlockKicker
which was used in the media block v2 template without being defined in header block featured:https://github.com/adventistchurch/alps-wordpress/blob/77598f35284385044123a9d46b0dbb65a90fb9e5/resources/views/patterns/01-molecules/blocks/media-block-v2.blade.php#L42-L44
I believe that the
getPostData($postId)
function inapp/template-helpers.php
returns the data for the header block featured template without including data for either of these variables:https://github.com/adventistchurch/alps-wordpress/blob/77598f35284385044123a9d46b0dbb65a90fb9e5/app/template-helpers.php#L122-L130
These undefined variables can cause a fatal exception (depending on PHP version):
The changes proposed in this PR are only to fix the fatal exceptions without actually addressing the missing variable sources.