Content-Type header [application/x-www-form-urlencoded] is not supported
cnizzardini opened this issue · 4 comments
I am using ES in conjunction with https://github.com/lorenzo/audit-stash#configuration and received this error:
(Error) - Call to undefined function Cake\ElasticSearch\Datasource\deprecationWarning() in vendor/cakephp/elastic-search/src/Datasource/Connection.php on 242
CakePHP: v3.5.17
ElasticSearch: v6.6.2
CakePHP/ElasticSearch: 1.5.2 (fbc4df5)
Stack Trace
⟩ Elastica\Transport\Http->exec
ROOT/vendor/ruflin/elastica/lib/Elastica/Request.php, line 171
⟩ Elastica\Request->send
ROOT/vendor/ruflin/elastica/lib/Elastica/Client.php, line 662
⟩ Elastica\Client->request
ROOT/vendor/ruflin/elastica/lib/Elastica/Bulk.php, line 357
⟩ Elastica\Bulk->send
ROOT/vendor/ruflin/elastica/lib/Elastica/Client.php, line 348
⟩ Elastica\Client->addDocuments
ROOT/vendor/lorenzo/audit-stash/src/Persister/ElasticSearchPersister.php, line 86
⟩ AuditStash\Persister\ElasticSearchPersister->logEvents
ROOT/vendor/lorenzo/audit-stash/src/Model/Behavior/AuditLogBehavior.php, line 161
⟩ AuditStash\Model\Behavior\AuditLogBehavior->afterCommit
CORE/src/Event/EventManager.php, line 416
⟩ Cake\Event\EventManager->_callListener
CORE/src/Event/EventManager.php, line 393
⟩ Cake\Event\EventManager->dispatch
CORE/src/Event/EventDispatcherTrait.php, line 110
⟩ Cake\ORM\Table->dispatchEvent
CORE/src/ORM/Table.php, line 1741
⟩ Cake\ORM\Table->save
ROOT/plugins/Admin/src/Controller/PublisherController.php, line 279
⟩ Admin\Controller\PublisherController->edit
CORE/src/Controller/Controller.php, line 440
⟩ Cake\Controller\Controller->invokeAction
CORE/src/Http/ActionDispatcher.php, line 119
⟩ Cake\Http\ActionDispatcher->_invoke
CORE/src/Http/ActionDispatcher.php, line 93
⟩ Cake\Http\ActionDispatcher->dispatch
CORE/src/Routing/Dispatcher.php, line 60
⟩ Cake\Routing\Dispatcher->dispatch
ROOT/webroot/index.php, line 36
You will need to upgrade CakePHP to 3.6 or downgrade elasticsearch. The deprecationWarning()
function was added in 3.6.
min cakephp version now is 3.6 in both
cakephp/elastic-search
and lorenzo/audit-stash
just update your vendor
Understood, I've held off to avoid having to deal with any breaking changes but 3.6 doesn't appear to have any, right?
@cnizzardini It doesn't have any intentional API breaking changes. At this point we've hopefully fixed all the compatibility problems for 3.6 as well.