[BUG]: Error when compiling without setting an image to the component #1282

Closed
opened 2026-01-23 09:43:16 +00:00 by oxido · 1 comment

What Happened?

VDM\Joomla\Componentbuilder\Compiler\Architecture\Component\ImageType::set(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php on line 221

Steps to reproduce the Bug

  1. Create a new component or remove the image (icon) of an existing one
  2. Compile

Which Joomla version are you compiling in?

v6.0.2

Which PHP version are you compiling in?

v8.3

Which Joomla versions are you targeting?

v5.x and v6.x

Which PHP version are you targeting?

8.x

Which Web server is JCB running on?

Apache/2.4.62 (Debian)

Which Relational Database is JCB running on?

Mysql, 11.6.2-MariaDB-ubu2404

Which OS is JCB running on?

Ubuntu

Which JCB version are you using?

6.1.4-beta6

Where in JCB did this issue occur?

Compilation of a component

On which browsers did you encounter the issue?

Firefox

Additional Comments

No response

### What Happened? VDM\Joomla\Componentbuilder\Compiler\Architecture\Component\ImageType::set(): Argument #1 ($path) must be of type string, null given, called in /var/www/html/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php on line 221 ### Steps to reproduce the Bug 1. Create a new component or remove the image (icon) of an existing one 2. Compile ### Which Joomla version are you compiling in? v6.0.2 ### Which PHP version are you compiling in? v8.3 ### Which Joomla versions are you targeting? v5.x and v6.x ### Which PHP version are you targeting? 8.x ### Which Web server is JCB running on? Apache/2.4.62 (Debian) ### Which Relational Database is JCB running on? Mysql, 11.6.2-MariaDB-ubu2404 ### Which OS is JCB running on? Ubuntu ### Which JCB version are you using? 6.1.4-beta6 ### Where in JCB did this issue occur? Compilation of a component ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
oxido added the Bug label 2026-01-23 09:43:16 +00:00
Owner

@oxido We have identified and resolved this issue, and the fix will be included in the next JCB release.

In the meantime, you can apply the following temporary workaround.

For a Manual Fix edit the file:
libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php

Locate line 221 and change:

CFactory::_('Architecture.Component.ImageType')->set(CFactory::_('Component')->get('image'));

To:

CFactory::_('Architecture.Component.ImageType')->set(CFactory::_('Component')->get('image') ?? '');

This change ensures that a missing Image is handled safely.
It prevents compilation errors when the Image is removed from a component and allows the build process to complete successfully.

@oxido We have identified and resolved this issue, and the fix will be included in the next JCB release. In the meantime, you can apply the following temporary workaround. For a Manual Fix edit the file: `libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php` Locate **line 221** and change: ```php CFactory::_('Architecture.Component.ImageType')->set(CFactory::_('Component')->get('image')); ``` To: ```php CFactory::_('Architecture.Component.ImageType')->set(CFactory::_('Component')->get('image') ?? ''); ``` This change ensures that a missing Image is handled safely. It prevents compilation errors when the Image is removed from a component and allows the build process to complete successfully.
oxido closed this issue 2026-02-10 10:02:18 +00:00
Robot referenced this issue from a commit 2026-02-10 10:13:46 +00:00
Robot referenced this issue from a commit 2026-02-18 14:57:05 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1282