codemonauts / craft-instagram-feed

Craft CMS plugin to receive Instragram feed data as variable in templates
MIT License
27 stars 7 forks source link

Undefined array key "data" #71

Closed hodgins96 closed 5 months ago

hodgins96 commented 5 months ago

Describe the bug:

Undefined array key "data" in vendor/codemonauts/craft-instagram-feed/src/services/InstagramService.php:126

I'm guessing this is related to the same issue as not getting the new feed but it took the site down today since nothing was returned in the array

Started last night around 9pm est

Where is it happening?

Temporary Fix Implemented If else added on returned data to ensure it doesn't give a server error

 if (isset($obj['data'])) 
        return $this->flattenMediaArray($obj['data']['user']['edge_owner_to_timeline_media']['edges'], self::STRUCTURE_VERSION_1);
    else
        return [];
    }

Software versions: Plugin Version: 1.1.8 / 1.2.0 PHP Version: 8.0.30 CraftCMS Version: 3.9.2 / 3.9.5

jamesmacwhite commented 5 months ago

The Craft CMS 3 version of the plugin requires an update, due to changes to the parsing for the Instagram public profile data changing recently.

https://github.com/codemonauts/craft-instagram-feed/issues/70

The changes are due to be backported and a new release coming soon from @kringkaste which should resolve the issue.

kringkaste commented 5 months ago

Hello @hodgins96 we just released version 1.3.0 for Craft3. Could you please update, invalidate your data cache (not only the Instagram data cache) and check if it now works for you?

hodgins96 commented 5 months ago

hi @kringkaste It seems to be working now, I had to force the update via cli