No Code Attached Yet Information Required
avatar romeolandry
romeolandry
5 Dec 2025

The error occurs when I nest multiple subform fields.
I wrote the following code to fix the issue:

// Flatten the value if it is an array (list, checkboxes, etc.), independent of render_values
if (is_array($subfield->value)) {
    if (!empty($subfield->value)) {
        $new_value = "";

        array_walk_recursive($subfield->value, function ($value) use (&$new_value) {
            $new_value .= $value . " ";
        });

        $subfield->value = trim($new_value);
    } else {
        $subfield->value = implode(' ', $subfield->value);
    }
}

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar romeolandry romeolandry - open - 5 Dec 2025
avatar romeolandry romeolandry - change - 5 Dec 2025
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 Dec 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Dec 2025
avatar richard67
richard67 - comment - 5 Dec 2025

@Fedik As it is about subforms: Could you check this issue? I'm not sure if the proposed solution is right.

avatar Fedik
Fedik - comment - 5 Dec 2025

@romeolandry please provide more information.
What error occur?
How did you create subform, using Content Custom field or with XML in your extension?
With the fields example.

avatar MacJoom MacJoom - change - 6 Dec 2025
Labels Added: Information Required
avatar MacJoom MacJoom - labeled - 6 Dec 2025
avatar romeolandry
romeolandry - comment - 10 Dec 2025

This error occure:

Warning: Array to string conversion in ....\plugins\fields\subform\src\Extension\Subform.php on line 235
Call Stack

Time Memory Function Location

1 0.0009 424520 {main}( ) ...\index.php:0
2 0.0037 437368 require_once( '....\includes\app.php ) ...\index.php:51
3 0.3238 7580464 Joomla\CMS\Application\CMSApplication->execute( ) ...\app.php:58
4 0.3373 7783928 Joomla\CMS\Application\SiteApplication->doExecute( ) ...\CMSApplication.php:304
5 0.8535 18080112 Joomla\CMS\Application\SiteApplication->dispatch( $component = ??? ) ...\SiteApplication.php:271
6 0.9121 18786848 Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'co...

I use the Content Custom field from joomla.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46538.
avatar romeolandry
romeolandry - comment - 10 Dec 2025

This are the images, how I create the custom Fielgs


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46538.

avatar romeolandry
romeolandry - comment - 10 Dec 2025
avatar romeolandry
romeolandry - comment - 10 Dec 2025

sorry but I cannot upload my images

Your text to link here...

Your text to link here...


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46538.

Add a Comment

Login with GitHub to post a comment