Octopoos / SEBLOD

Build high-end websites with SEBLOD®, a CCK for Joomla!
https://www.seblod.com
GNU General Public License v2.0
129 stars 56 forks source link

issue on saving article php 8.1.x #665

Closed raramuridesign closed 1 year ago

raramuridesign commented 2 years ago

@sebastienheraud There is an error we are getting on save

php: 8.1.x Joomla: 3.10.11

0 count(): Argument #1 ($value) must be of type Countable|array, null given

Do you have any idea what this is about?

If you could provide a reply as soon as possible as this is preventing adding content to a site. Thanks Matthew

raramuridesign commented 2 years ago

@sebastienheraud @sebastienlapoux Please note this error also occurs on PHP 8.0.x

M

sebastienheraud commented 2 years ago

Hi @raramuridesign,

Please enable the debug and provide the full stack trace. The above is not enough to easily/quickly answer.

Saba

raramuridesign commented 2 years ago

@sebastienheraud I cannot seem to get a stack trace in the backend - the backend then stops working and shows a blank page. Any ideas?

raramuridesign commented 1 year ago

@sebastienheraud @sebastienlapoux It seems this has to with the tags from Joomla - ie the inbuilt tags. Any idea what we can do to sort this out? M

raramuridesign commented 1 year ago

@sebastienheraud Here is the debug info, which is finally showing, seems admin cached hid this.

`

An error has occurred.

0 count(): Argument #1 ($value) must be of type Countable|array, null given
/usr/www/users/agoa/plugins/cck_field_validation/tags/tags.php:56
Call stack -- # | Function | Location 1 | () | JROOT/plugins/cck_field_validation/tags/tags.php:56 2 | plgCCK_Field_ValidationTags::onCCK_Field_ValidationPrepareStore() | JROOT/libraries/cms/cck/cck.php:32 3 | JCck::callFunc_Array() | JROOT/libraries/cms/cck/plugin/field.php:1065 4 | JCckPluginField->g_onCCK_FieldPrepareStore_Validation() | JROOT/plugins/cck_field/jform_tag/jform_tag.php:306 5 | plgCCK_FieldJform_Tag->onCCK_FieldPrepareStore() | JROOT/libraries/joomla/event/event.php:70 6 | JEvent->update() | JROOT/libraries/joomla/event/dispatcher.php:160 7 | JEventDispatcher->trigger() | JROOT/libraries/src/Application/BaseApplication.php:108 8 | Joomla\CMS\Application\BaseApplication->triggerEvent() | JROOT/libraries/cck/base/form/store_inc.php:226 9 | include_once() | JROOT/administrator/components/com_cck/models/form.php:22 10 | CCKModelForm->store() | JROOT/administrator/components/com_cck/controllers/form.php:52 11 | CCKControllerForm->save() | JROOT/libraries/src/MVC/Controller/BaseController.php:702 12 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/administrator/components/com_cck/cck.php:31 13 | require_once() | JROOT/libraries/src/Component/ComponentHelper.php:402 14 | Joomla\CMS\Component\ComponentHelper::executeComponent() | JROOT/libraries/src/Component/ComponentHelper.php:377 15 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/AdministratorApplication.php:101 16 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT/libraries/src/Application/AdministratorApplication.php:159 17 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:225 18 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/administrator/index.php:51

`

raramuridesign commented 1 year ago

I need a fix, as this is causing editing issues on a site. Thanks.

raramuridesign commented 1 year ago

@sebastienheraud I have disabled validation on the 2 fields Internal joomla tags Seblod Tags field This seemed to have caused the issue Would you mind investigating this?

Validation on Tags had these settings

image

sebastienheraud commented 1 year ago

Hi, This may be an old plug-in, but it is not part of the current SEBLOD core, nor SEBLOD Store. Feel free to add an is_array( ... ) check before or around the count( ... ) which may trigger the error when no tag attached. Closing this one. Saba