Currently the bookmarklet on production is encountering an error 500 when loading a friend's quest. Here's my request for Kyle's quests, which makes an HTTP GET request to http://shopgab.com/bookmark/friend_quests/5). I spent my morning with cURL and found that setting the X-Requested-With header to XMLHttpRequest is causing the error.
public function before()
{
parent::before();
if (! Input::is_ajax())
{
$child_js = File::file_info(DOCROOT . 'assets/js/bookmark/child.js');
$this->template->last_modified = $child_js['time_modified'];
}
//Config::set('profiling', false); // not working
}
We haven't changed anything here for a while, so the ! Input::is_ajax() seems valid.
Checking the error logs, it looks like we're passing an object to the second parameter of method_exists(), which expects a string – all of this is happening in /fuel/core/classes/controller/rest.php:126.
At this point I'm pretty stumped, hopefully you have a better idea of what's going on.
Currently the bookmarklet on production is encountering an error 500 when loading a friend's quest. Here's my request for Kyle's quests, which makes an HTTP GET request to http://shopgab.com/bookmark/friend_quests/5). I spent my morning with cURL and found that setting the
X-Requested-With
header toXMLHttpRequest
is causing the error.X-Requested-With:
XMLHttpRequest
X-Requested-With:
abcdefghijklmnopqrstuvwxyz
As you can see, the first throws an error, whereas the second works as intended.
Moving our way down the rabbit hole, it looks like that's coming from fuel/app/classes/controller/bookmark.php:11.
We haven't changed anything here for a while, so the
! Input::is_ajax()
seems valid.Checking the error logs, it looks like we're passing an object to the second parameter of
method_exists()
, which expects a string – all of this is happening in /fuel/core/classes/controller/rest.php:126.At this point I'm pretty stumped, hopefully you have a better idea of what's going on.