@lukasbestle I’ll post the lines from the file here, as you requested, but the problem that the plugin is having is not likely to be something to do with the code. It certainly has to do with Instagram’s policy change, which took effect just now, on 1st June. This is not an isolated incident: every instal of Kirbygram - including the ones that have been in production successfully for several months - have suddenly thrown the same error. If you have any sites using Kirbygram, I suggest you check them right now…
Kirbygram was not the only one affected. There are several libraries, frameworks and plugins for other CMSs that have also run into strife. An old and very popular Instagram javascript library, called instafeed.js is currently broken, too - even their webpage is missing its instagram gallery. Their GitHub repo has some interesting discussions, that have been going on since November last year, when Instagram first announced these changes.
In any case, here are the lines you requested. I know you’re a miracle worker, so here’s hoping that you’ll be able to weave your magic! ;):
The error that I get is:
Notice: Trying to get property of non-object in
/[...]/site/plugins/kirbygram/lib/Instagram/Query.php on line 74
Notice: Trying to get property of non-object in
/[...]/site/plugins/kirbygram/lib/Instagram/Query.php on line 43
Line 74 of kirbygram/lib/Instagram/Query.php
is:
$this->pagination = json_decode($content)->pagination;
In context:
public function parsePagination()
{
$content = $this->response->content;
$this->pagination = json_decode($content)->pagination;
}
Line 43 of the same file is:
return $this->content->data;
In context:
public function get()
{
$this->response = $this->igInstance->check_cache($this->name);
if(!$this->response){
$this->response = \Instagram\Remote::get($this->apiUrl . $this->endPoint, array(
'data' => array(
'access_token' => $this->igInstance->get_config('token'),
'count' => 20
)
));
}
$this->content = json_decode($this->response->content);
//echo '<pre>' . json_encode($this->response->content, JSON_PRETTY_PRINT) . '</pre>';
$this->igInstance->set_cache($this->name, $this->response);
$this->parsePagination();
return $this->content->data;
}