I have this strange issue.
It was not happening before and after I pulled form github ,
when I send json responses and send and eloquent object with it, it gives me this error. Presumably when the model gets serialized.
I've tried to parse it with json_encode but still the same issue.
I don't know whats going on , is it the issue of the json_encode or a problem with the eloquent model.It's related to all the models because all of them return the same error when i try to parse them to json.
It was ok before but now I don't know what went wrong.
I've compared commits to see the differences but still no luck.
I could not find anything that might have caused this issue so I'm guessing it is the fault of an nontracked file so I reinstalled the dependencies again through composer install still no luck.
When I reverse to the last commit it works fine so the theory of the untracked files is rubish.
Has anyone have any idea ?
I'm going nuts over this.
This is the stacktrace form when it starts to convert to json :
[2018-04-18 14:22:53] local.ERROR: Call to undefined method Illuminate\Database\Query\Builder::getEntityAttribute() {"exception":"[object] (BadMethodCallException(code: 0): Call to undefined method Illuminate\\Database\\Query\\Builder::getEntityAttribute() at /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2483)
[stacktrace]
#0 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1288): Illuminate\\Database\\Query\\Builder->__call('getEntityAttrib...', Array)
#1 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1470): Illuminate\\Database\\Eloquent\\Builder->__call('getEntityAttrib...', Array)
#2 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(438): Illuminate\\Database\\Eloquent\\Model->__call('getEntityAttrib...', Array)
#3 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(450): Illuminate\\Database\\Eloquent\\Model->mutateAttribute('entity', NULL)
#4 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(109): Illuminate\\Database\\Eloquent\\Model->mutateAttributeForArray('entity', NULL)
#5 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(970): Illuminate\\Database\\Eloquent\\Model->attributesToArray()
#6 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Support/Collection.php(1611): Illuminate\\Database\\Eloquent\\Model->toArray()
#7 [internal function]: Illuminate\\Support\\Collection->Illuminate\\Support\\{closure}(Object(App\\AdminActivity))
#8 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Support/Collection.php(1612): array_map(Object(Closure), Array)
#9 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(237): Illuminate\\Support\\Collection->toArray()
#10 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(970): Illuminate\\Database\\Eloquent\\Model->relationsToArray()
#11 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(237): Illuminate\\Database\\Eloquent\\Model->toArray()
#12 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(970): Illuminate\\Database\\Eloquent\\Model->relationsToArray()
#13 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(999): Illuminate\\Database\\Eloquent\\Model->toArray()
#14 [internal function]: Illuminate\\Database\\Eloquent\\Model->jsonSerialize()
#15 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php(71): json_encode(Array, 0)
#16 /home/marlind/PhpstormProjects/ital-restaurant/vendor/symfony/http-foundation/JsonResponse.php(50): Illuminate\\Http\\JsonResponse->setData(Array)
#17 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php(31): Symfony\\Component\\HttpFoundation\\JsonResponse->__construct(Array, 200, Array)
#18 /home/marlind/PhpstormProjects/ital-restaurant/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(83): Illuminate\\Http\\JsonResponse->__construct(Array, 200, Array, 0)
#19 /home/marlind/PhpstormProjects/ital-restaurant/app/Http/Controllers/BaseController.php(19): Illuminate\\Routing\\ResponseFactory->json(Array)
#20 /home/marlind/PhpstormProjects/ital-
I assume you have a problem with getting custom attribute. You can do that in a model by writing get{name}Attribute. You didn't provide us with any code so it's hard to point an error.
Old question but found it when searching for a problem I encountered.
Given that the stack trace is similar to mine I think the information and solution I found could shed more light on the matter.
Here's a link to Laravel's documentation about mutators as array:
https://laravel.com/docs/9.x/eloquent-mutators#array-object-and-collection-casting
For me the problem was when doing ->toArray() on a model that had attribute mutators.
Solved it by adding the following to the model:
protected $casts = [
'entity' => AsArrayObject::class,
];
Related
I'm working on a tool which uses Yii version 1.1.13 and after addig new error messages with the addErrormethod, despite it worked fine on the page I used it, it threw a strange, long error message on the index page with an error 500.
Missing argument 1 for CModel::getError(), called in /var/www/html/framework/base/CComponent.php on line 111 and defined (/var/www/html/framework/base/CModel.php:371)
Stack trace:
#0 /var/www/html/protected/models/Testcases.php(132): Testcases->__get()
#1 /var/www/html/protected/views/site/index.php(189): Testcases->search()
#2 /var/www/html/framework/web/CBaseController.php(126): require()
#3 /var/www/html/framework/web/CBaseController.php(95): SiteController->renderInternal()
#4 /var/www/html/framework/web/CController.php(869): SiteController->renderFile()
#5 /var/www/html/framework/web/CController.php(782): SiteController->renderPartial()
#6 /var/www/html/protected/controllers/SiteController.php(295): SiteController->render()
#7 /var/www/html/framework/web/actions/CInlineAction.php(49): SiteController->actionIndex()
#8 /var/www/html/framework/web/CController.php(308): CInlineAction->runWithParams()
#9 /var/www/html/framework/web/CController.php(286): SiteController->runAction()
#10 /var/www/html/framework/web/CController.php(265): SiteController->runActionWithFilters()
#11 /var/www/html/framework/web/CWebApplication.php(282): SiteController->run()
#12 /var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController()
#13 /var/www/html/framework/base/CApplication.php(184): CWebApplication->processRequest()
#14 /var/www/html/index.php(13): CWebApplication->run()
REQUEST_URI=/index.php
in /var/www/html/protected/models/Testcases.php (132)
in /var/www/html/protected/views/site/index.php (189)
in /var/www/html/protected/controllers/SiteController.php (295)
This bug appeared after generating test cases for my new error message. Then I reverted my modified file from the svn repository as the previous version worked fine, but I still can't get rid of this message.
I added the new errors like this:
if (FieldsQueue::model()->exists("fieldname = 'something'"))
$model->addError('Error', "Something happened");
else if (!isset($_POST['something']))
$model->addError('test',"This is the new error);
else { do something }
Thanks in advance for your helping answers. :)
Hii The definition of addError is
public void addError(string $attribute, string $error)
$attribute Should be your model (db) attribute
In your code
$model->addError('Error', "Something happened");
Error Should be your model attribute
Finally solved, there was a row in the database which caused an error, I still don't know how, and which one was it (I just deleted some I added recently before the bug appeared). It is actually very strange because there wasn't anything about the DB in this error message.
I have "randomly" some jobs failing in my beanstalked queue.
Two questions:
1/ By looking at the failed job table in the DB how can I interprate what is logged inside? The Data closure means "nothing" when reading it raw. Is there something to do to have more info?
2/ I went through the console logs of Laravel and this is what fails:
[2015-04-29 15:40:51] production.ERROR: exception 'ErrorException' with message 'Trying to get property of non-object' in /home/forge/api.hello.me/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(99) : eval()'d code:6
Stack trace:...
However I have no clue what exactly is failing... the stacktrace doesn't help and just starts at
[internal function]: Jeremeamia\SuperClosure\SerializableClosure::{closure}(Object(Illuminate\Queue\Jobs\BeanstalkdJob))
#2 /home/forge/api.hello.me/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(64): ReflectionFunction->invokeArgs(Array)
and finished a few lines later at
#15 /home/forge/api.hello.me/vendor/symfony/console/Symfony/Component/Console/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /home/forge/api.hello.me/artisan(59): Symfony\Component\Console\Application->run()
#17 {main} [] []
Any idea on how I could understand / find out what is happening? The queue is not even failing all the time...
ps: full stack trace:
#0 /home/forge/api.hello.me/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(99) : eval()'d code(6): Illuminate\Exception\Handler->handleError(8, 'Trying to get p...', '/home/forge/api...', 6, Array)
#1 [internal function]: Jeremeamia\SuperClosure\SerializableClosure::{closure}(Object(Illuminate\Queue\Jobs\BeanstalkdJob))
#2 /home/forge/api.hello.me/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(64): ReflectionFunction->invokeArgs(Array)
#3 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php(36): Jeremeamia\SuperClosure\SerializableClosure->__invoke(Object(Illuminate\Queue\Jobs\BeanstalkdJob))
#4 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(96): IlluminateQueueClosure->fire(Object(Illuminate\Queue\Jobs\BeanstalkdJob), Array)
#5 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php(50): Illuminate\Queue\Jobs\Job->resolveAndFire(Array)
#6 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(205): Illuminate\Queue\Jobs\BeanstalkdJob->fire()
#7 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(157): Illuminate\Queue\Worker->process('beanstalkd', Object(Illuminate\Queue\Jobs\BeanstalkdJob), '3', '0')
#8 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(105): Illuminate\Queue\Worker->pop('beanstalkd', 'default', '0', '10', '3')
#9 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(67): Illuminate\Queue\Console\WorkCommand->runWorker('beanstalkd', 'default', '0', '128', false)
#10 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Queue\Console\WorkCommand->fire()
#11 /home/forge/api.hello.me/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(253): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /home/forge/api.hello.me/vendor/laravel/framework/src/Illuminate/Console/Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /home/forge/api.hello.me/vendor/symfony/console/Symfony/Component/Console/Application.php(889): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /home/forge/api.hello.me/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /home/forge/api.hello.me/vendor/symfony/console/Symfony/Component/Console/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /home/forge/api.hello.me/artisan(59): Symfony\Component\Console\Application->run()
#17 {main} [] []
The way Laravel queues work is to serialize all the data you provide as the payload, and it sticks that in your database. When you process the queue, it will magically unserialize all this data so that you have basically the same object in memory as you did when you popped it into the queue.
The problem comes in when you change the class definition of a serialized object, or your object does not quite serialize correct (which seems to be the case here)...
I would suggest that you try not serializing anonymous functions, because Laravel uses SuperClosure to do this, and it's pretty hacky.
[internal function]: Jeremeamia\SuperClosure\SerializableClosure::{closure}(Object(Illuminate\Queue\Jobs\BeanstalkdJob))
Try pushing simpler objects into your Beanstalk queue (i.e. don't send objects to the queue) and you won't have this issue.
I am building a laravel application and everything seems to be working fine, except for the fact that I keep getting these errors appearing in the log file continuously. I mean they are showing up every few minutes, sometimes more often, sometimes less - it's making harder to find real problems in the log file. Except of these problems, they aren't really causing any problems - I have an App::missing method to take care of real users.
Do you have any idea of where to look for the solution?
[2014-05-15 19:58:20] local.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' with message 'Controller method not found.' in /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:254
Stack trace:
#0 [internal function]: Illuminate\Routing\Controller->missingMethod(Array)
#1 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#2 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('missingMethod', Array)
#3 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(HomeController), Object(Illuminate\Routing\Route), 'missingMethod')
#4 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/Router.php(934): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'HomeController', 'missingMethod')
#5 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Array)
#6 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/Route.php(105): call_user_func_array(Object(Closure), Array)
#7 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1000): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#8 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Routing/Router.php(968): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#9 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(738): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#10 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#11 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php(38): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#12 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true)
#13 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#14 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#15 /Applications/MAMP/htdocs/gran.pw/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#16 /Applications/MAMP/htdocs/gran.pw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#17 /Applications/MAMP/htdocs/gran.pw/public/index.php(49): Illuminate\Foundation\Application->run()
#18 {main} [] []
Its a 404 for a non existant url.
i.e. http://example.com/this-url-does-not-exist
To see which URL is actually causing the 404 - add this to your filters file
App::missing(function($exception)
{
Log::error('Missing URL was: ' . Request::fullUrl());
});
It will record the URL that any exception occurs on in your logs.
It is most likely due to either a search engine bot trying to search for old links, or could be some broken links within your application.
I did mention this to Taylor as a possible bug in Laravel 4.1 - that the http exception does not record the missing url - but it was closed at the time. I might re-open it as I'm sure it is a bug (since old 404 did record the url).
Looks like your HomeController is not extending Laravel's controller:
class HomeController extends Controller {
}
Because the method missingMethod is missing from yours and this one is in the Laravel Controller base class.
I have a Magento 1.8 installation which was working fine up until yesterday evening at which point changing any config settings in the admin area stopped working.
E.g. If I change 'store name' to anything different and clicking save: it says "The configuration has been saved" in the green bar at the top but the value stays as it previously was.
Checking in phpMyAdmin the value is unchanged, however you can change it manually in phpMyAdmin and this will be reflected in the admin backend.
Switching on developer mode, initially got me the following when I tried to load any page:
Strict Notice: Only variables should be passed by reference in /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2765
#0 /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php(2765): mageCoreErrorHandler(2048, 'Only variables ...', '/home/user/de...', 2765, Array)
#1 /home/user/dev/lib/Varien/Data/Collection/Db.php(483): Varien_Db_Adapter_Pdo_Mysql->prepareSqlCondition('path', Array)
#2 /home/user/dev/lib/Varien/Data/Collection/Db.php(414): Varien_Data_Collection_Db->_getConditionSql('path', Array)
#3 /home/user/dev/lib/Varien/Data/Collection/Db.php(385): Varien_Data_Collection_Db->_translateCondition('path', Array)
#4 /home/user/dev/app/code/core/Mage/Core/Model/Resource/Config/Data/Collection.php(58): Varien_Data_Collection_Db->addFieldToFilter('path', Array)
#5 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(306): Mage_Core_Model_Resource_Config_Data_Collection->addScopeFilter('default', 0, 'general')
#6 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(292): Mage_Adminhtml_Model_Config_Data->_getPathConfig('general', false)
#7 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(221): Mage_Adminhtml_Model_Config_Data->_getConfig(false)
#8 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(334): Mage_Adminhtml_Model_Config_Data->load()
#9 /home/user/dev/app/code/core/Mage/Paypal/Model/Observer.php(134): Mage_Adminhtml_Model_Config_Data->getConfigDataValue('paypal/general/...')
#10 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1338): Mage_Paypal_Model_Observer->loadCountryDependentSolutionsConfig(Object(Varien_Event_Observer))
#11 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Paypal_Model_Observer), 'loadCountryDepe...', Object(Varien_Event_Observer))
#12 /home/user/dev/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('adminhtml_init_...', Array)
#13 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config.php(93): Mage::dispatchEvent('adminhtml_init_...', Array)
#14 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config.php(63): Mage_Adminhtml_Model_Config->_initSectionsAndTabs()
#15 /home/user/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(88): Mage_Adminhtml_Model_Config->getSections('general')
#16 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#17 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/user/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/user/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/user/dev/index.php(87): Mage::run('', 'store')
#22 {main}
Looking up /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2765:
$key = key(array_intersect_key($condition, $conditionKeyMap));
Which made no sense to me, but something to do with MySQL seemed like I might be on the right track... I googled the error and found this: http://www.magentocommerce.com/boards/v/viewthread/266575/ - and tried the suggestion of replacing line 2795 with:
$tmp = array_intersect_key($condition, $conditionKeyMap);
$key = key($tmp);
Which resulted in the following dev mode error:
Method "addJqueryLibrary" is not defined in "Magentothem_Upsellslider_Model_Layout_Generate_Observer"
#0 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1340): Mage::throwException('Method "addJque...')
#1 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magentothem_Upsellslider_Model_Layout_Generate_Observer), 'addJqueryLibrar...', Object(Varien_Event_Observer))
#2 /home/user/dev/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#3 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#4 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#5 /home/user/dev/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#6 /home/user/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(95): Mage_Adminhtml_Controller_Action->loadLayout()
#7 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#8 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#9 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/user/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/user/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 /home/user/dev/index.php(87): Mage::run('', 'store')
#13 {main}
If you switch developer mode off now, the same thing happens, says its saved but no change.
Just found in /var/exception.log another error that says:
exception 'Mage_Core_Exception' with message 'Invalid block type: Fishpig_FPAdmin_Block_Adminhtml_Extend' in /home/pieboy/dev/app/Mage.php:594
(followed by another stack trace)
I'm pretty much at my wits end with what to try next and out of my depth. The store is using a paid for theme which included a lot of extensions which I didn't personally install, but it has been working completely fine up until now.
The most recent extension I installed was this:
http://www.magentocommerce.com/magento-connect/stripe-for-magento.html
As far as I could tell it all went smoothly, and I've been editing config settings since, but it was when I went to enable it in the payment methods area that I noticed the problem.
I know this was a lot of reading, but was just trying to get down all the info. Any suggestions at all on how to debug from here are welcome.
EDIT: I uninstalled Fishpig and Magentothem upsellslider extensions, and now I get no errors or exceptions at all in dev mode but still the same behaviour with config settings not saving.
With the help of my hosting company, we tracked this down to being caused by suhosin, they increased the following suhosin limits in the php.ini file for my server which resolved the issue:
suhosin.post.max_vars = 1000
suhosin.request.max_vars = 1000
(Thought I would update here in case anyone in the same boat googles it!)
I cannot find any documentation on how to read the exception.log in Magento; where is the documentation on how to read this?
If there is no documentation in what order are the exceptions printed?
Did #0 happen last or did it happen first?
Stack trace:
#0 .../html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 .../html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 .../html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 .../html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('select eav_opti...', Array)
#4 .../html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('select eav_opti...', Array)
#5 .../html/app/code/local/FME/Manufacturers/Model/Observer/Product.php(47): Varien_Db_Adapter_Pdo_Mysql->query('select eav_opti...')
#6 .../html/app/code/core/Mage/Core/Model/App.php(1338): FME_Manufacturers_Model_Observer_Product->saveTabData(Object(Varien_Event_Observer))
#7 .../html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(FME_Manufacturers_Model_Observer_Product), 'saveTabData', Object(Varien_Event_Observer))
#8 .../html/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('catalog_product...', Array)
#9 .../html/app/code/core/Mage/Core/Model/Abstract.php(466): Mage::dispatchEvent('catalog_product...', Array)
#10 .../html/app/code/core/Mage/Catalog/Model/Product.php(548): Mage_Core_Model_Abstract->_afterSave()
#11 .../html/app/code/core/Mage/Core/Model/Abstract.php(319): Mage_Catalog_Model_Product->_afterSave()
#12 .../html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(714): Mage_Core_Model_Abstract->save()
#13 .../html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Catalog_ProductController->saveAction()
#14 .../html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save')
#15 .../html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#16 .../html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#17 .../html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#18 .../html/index.php(91): Mage::run('', 'store')
#19 {main}
This is a regular PHP Exception Stack Trace; it's not specific to Magento.
Line #0 tells us, that the line 110 of the file lib/Varien/Db/Statement/Pdo/Mysql.php managed to successfully call the method Zend_Db_Statement_Pdo->_execute(), but then execution of one of the commands of this method resulted in throwing an Exception.
Simply spoken, a Stack Trace is just a list of method/function calls, that an application was in the middle of execution of when an Exception was thrown.
Code execution started at #19 {main} (bottom of the stack).
#18, {main} was executed untilmethod Mage::run() was calledin line 91 of index.php
#17, Mage::run() was executed untilmethod Mage_Core_Model_App->run() was calledin line 683 of app/Mage.php
:
#1, Zend_Db_Statement->execute() was executed untilmethod Varien_Db_Statement_Pdo_Mysql->_execute() was calledin line 300 of lib/Zend/Db/Statement.php
#0, Varien_Db_Statement_Pdo_Mysql->_execute() was executed untilmethod Zend_Db_Statement_Pdo->_execute() was calledin line 110 of lib/Varien/Db/Statement/Pdo/Mysql.php,but some command of this method caused throwing an exception.
As a side note, I wouldn't generally say a stack trace is "going down the list of functions that are failing", like #pzirkind mentioned in his answer.
Because if the method called in #0 (top of the stack) wouldn't have "failed", many of the methods called before may still work as expected (and many usually do, at least to my experience), or even catch the thrown exception.
Zero happened last.
What's happening is that it's going down the list of functions that are failing.
It starts with the actual function that failed and then shows you how it continued to cause other things to fail (this makes it easier to trace a deeper problem if it exists).
Pesach