I really need to use this extension. Is there someone who can help me figure out what could be the problem? I have the same problem on two different installations of Joomla4/Seblod 4.0.6 php 8.1, different servers. If my content form contains the Upload jQuery field, my site breaks and get the error:
0 count(): Argument #1 ($value) must be of type Countable|array, null given
The debug shows the error is in JROOT/plugins/cck_field/upload_jquery/upload_jquery.php:257
which correspond to this function:
// Set Order @count $items = $value; $value = array();
The error message you are encountering, "0 count(): Argument #1 ($value) must be of type Countable|array, null given," is related to a change in PHP 8.1's behavior regarding the `count()` function. Starting from PHP 8.0, the `count()` function expects its argument to be countable, which means it must be an array or an object implementing the `Countable` interface. In your case, it appears that `$items[$field->storage_field]` is not an array or a countable object, which is causing the error.
To resolve this issue, you can modify the code in the `upload_jquery.php` file to ensure that you are passing a countable value to the `count()` function.
Here's a revised version of the code that should work:
This code first checks if $items is an array and if $items[$field->storage_field] is also an array before attempting to loop through it. This will prevent the "0 count(): Argument #1 ($value) must be of type Countable|array, null given" error when $items[$field->storage_field] is null or not an array.
Hi Jimenaes, unfortunately that's the major problem with Seblod: a very flexible product but almost no support. You can try to open an issue on GitHub, but there are issues open since a long time ago that do not have yet a solution and sometimes you need to fix the problem (or make a workaround) on your own. It's a pity since it is still technically the best CCK for Joomla in my opinion.
About the last error you encounter, it's because isAdmin() is no more a function in Joomla 4 (it was in Joomla 3), it has been replaced by