wanze / SeoMaestro

🧙‍♂️A ProcessWire module helping you to manage SEO related tasks like a boss.
MIT License
34 stars 9 forks source link

Support image fields that are nested, i.e. hero_fieldset.hero_image #39

Open tim-vw opened 2 years ago

tim-vw commented 2 years ago

Hi Wanze,

Great module, thanks for developing.

I'm trying to use a default image field that is nested hero_fieldset.hero_image, if the image field is not populated with an image it throws the following: Error Call to a member function get() on null

Updating line 149 of OpengraphSeoData.php as follows prevents the error, I was wondering if you'd consider incorporating this fix into a future release.

if (!$field || !$field->get('defaultValuePage')) {

Thanks very much, Tim