You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#115303 Error with JCE Media Field for image

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Monday, 20 November 2023 12:01 GMT

map
Hi,

I have a problem with category blog layout and an error thrown by the mediajce field.
This is the error message:

JSON_DECODE(): ARGUMENT #1 ($JSON) MUST BE OF TYPE STRING, ARRAY GIVEN

And this is the callstack:

Call stack
# Function Location
1 () JROOT/plugins/fields/mediajce/mediajce.php:103
2 json_decode() JROOT/plugins/fields/mediajce/mediajce.php:103
3 PlgFieldsMediaJce->checkValue() JROOT/plugins/fields/mediajce/mediajce.php:81
4 PlgFieldsMediaJce->onCustomFieldsBeforePrepareField() JROOT/libraries/src/Plugin/CMSPlugin.php:289
5 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
6 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
7 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/administrator/components/com_fields/src/Helper/FieldsHelper.php:208
8 Joomla\Component\Fields\Administrator\Helper\FieldsHelper::getFields() JROOT/plugins/system/fields/src/Extension/Fields.php:464
9 Joomla\Plugin\System\Fields\Extension\Fields->onContentPrepare() JROOT/libraries/src/Plugin/CMSPlugin.php:289
10 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
11 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
12 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/components/com_content/src/View/Category/HtmlView.php:108
13 Joomla\Component\Content\Site\View\Category\HtmlView->display() JROOT/libraries/src/Cache/Controller/ViewController.php:95
14 Joomla\CMS\Cache\Controller\ViewController->get() JROOT/libraries/src/MVC/Controller/BaseController.php:655
15 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/src/Controller/DisplayController.php:121
16 Joomla\Component\Content\Site\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:693
17 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
18 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/components/com_content/src/Dispatcher/Dispatcher.php:56
19 Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
20 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208
21 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:249
22 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
23 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
24 require_once() JROOT/index.php:32

Do you have any experience with this problem?

I have no override for the field.

Regards,
Marc

map
Hi.

after further investigation I have solved this issue which has probably something to do with the YTP Template in Combination with the dynamic content from the jce media field?!

Sry! But I have really no clue how I have solved this issue?! 🙁

Regards,
Marc

Ryan
It's always good when weird stuff happens, even when it gets solved, as it sometimes points to a problem elsewhere. I will investigate.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.