Closed multizone-uk closed 2 years ago
Hi @multizone-uk here is a quick fix which should get you up and going. #36 I am not a maintainer of this project nor a joomla core developer but I know Joomla! enough as a developer and fixed the exact same error for a friend yesterday. It should work for you as well. Take care and have a great day.
Thank you so much! A simple fix and its working again! I hope someone accepts it into the code.
I like this little plugin and it works well for me. I realise it has limited scope but it does break the API for me.
Steps to reproduce
/api/index.php/v1/content/articles
with a correctly set tokeneverything.php log `#
<?php die('Forbidden.'); ?>
Date: 2021-10-04 21:14:48 UTC
Software: Joomla! 4.0.3 Stable [ Furaha ] 12-September-2021 10:39 GMT
Fields: datetime priority clientip category message
2021-10-04T21:14:48+00:00 CRITICAL 86.27.156.11 error Uncaught Throwable of type ArgumentCountError thrown with message "Too few arguments to function PlgContentJoomlarrssb::onContentPrepare(), 3 passed in [...]libraries/src/Plugin/CMSPlugin.php on line 285 and exactly 4 expected". Stack trace: #0 [...]libraries/src/Plugin/CMSPlugin.php(285): PlgContentJoomlarrssb->onContentPrepare('com_content.art...', Object(stdClass), NULL)
1 [...]libraries/vendor/joomla/event/src/Dispatcher.php(486): Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}(Object(Joomla\Event\Event))
2 [...]libraries/src/Application/EventAware.php(111): Joomla\Event\Dispatcher->dispatch('onContentPrepar...', Object(Joomla\Event\Event))
3 [...]api/components/com_content/src/View/Articles/JsonapiView.php(196): Joomla\CMS\Application\WebApplication->triggerEvent('onContentPrepar...', Array)
4 [...]libraries/src/MVC/View/JsonApiView.php(128): Joomla\Component\Content\Api\View\Articles\JsonapiView->prepareItem(Object(stdClass))
5 [...]api/components/com_content/src/View/Articles/JsonapiView.php(151): Joomla\CMS\MVC\View\JsonApiView->displayList()
6 [...]libraries/src/MVC/Controller/ApiController.php(275): Joomla\Component\Content\Api\View\Articles\JsonapiView->displayList()
7 [...]api/components/com_content/src/Controller/ArticlesController.php(78): Joomla\CMS\MVC\Controller\ApiController->displayList()
8 [...]libraries/src/MVC/Controller/BaseController.php(730): Joomla\Component\Content\Api\Controller\ArticlesController->displayList()
9 [...]libraries/src/Dispatcher/ApiDispatcher.php(59): Joomla\CMS\MVC\Controller\BaseController->execute('displaylist')
10 [...]libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\ApiDispatcher->dispatch()
11 [...]libraries/src/Application/ApiApplication.php(423): Joomla\CMS\Component\ComponentHelper::renderComponent('com_content')
12 [...]libraries/src/Application/ApiApplication.php(110): Joomla\CMS\Application\ApiApplication->dispatch()
13 [...]libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\ApiApplication->doExecute()
14 [...]api/includes/app.php(54): Joomla\CMS\Application\CMSApplication->execute()
15 [...]api/index.php(31): require_once('[...]...')
16 {main}`