[BUG]: Compiler Error #1228
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
When attempting to compile a component, even the Demo component, I am receiving a Fatal Error from the compiler.
Compile Error: Declaration of VDM\Joomla\Componentbuilder\Compiler\Creator\FieldXML::get(string $setType, array &$fieldAttributes, string &$name, string &$typeName, string &$langView, string &$nameSingleCode, string &$nameListCode, array $placeholders, ?array &$optionArray, ?array $custom = null, string $taber = ''): stdClass must be compatible with VDM\Joomla\Componentbuilder\Compiler\Interfaces\Creator\Fieldtypeinterface::get(string $setType, array &$fieldAttributes, string $name, string $typeName, string $langView, string $nameSingleCode, string $nameListCode, array $placeholders, ?array &$optionArray, ?array $custom = null, string $taber = '')
Steps to reproduce the Bug
Install JCB 5.1.1-beta2 , and compile a component.
Which Joomla version are you compiling in?
5.3.1
Which PHP version are you compiling in?
8.2.24
Which Joomla versions are you targeting?
5.x
Which PHP version are you targeting?
8.2+
Which Web server is JCB running on?
Apache 2.4.62
Which Relational Database is JCB running on?
11.7.2-MariaDB-ubu2404
Which OS is JCB running on?
Ubuntu 24.04.2
Which JCB version are you using?
5.1.1-beta2
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
No response
Hello @mwweb,
I’ve tested both the HelloWorld and Demo components today, and I'm not encountering any issues.
Since the Demo component is working in both environments on my end, it suggests the issue might be specific to your setup.
To help us diagnose the problem, could you confirm the following:
Once we have more insight into your setup, and some additional debugging from your side, we’ll be better equipped to assist.
Hi, @mwweb does your install still have
/library/jcb_powers
folders? please remove those, and install JCB again.Also ensure that your projects are no longer using the default
Namespace Prefix
, and the default library location.Looking in the Global Options of JCB under the Compiler tab:

Change this namespace to your company name.
Then under the Folder Paths tab:

Change the
JCB Powers Path
to a location other than the defaults...When you compile your projects again... JCB will move all classes to this new location.
We are working on the option to move the classes into the component namespace and then add them under the
component/src/
folder but at this point all powers are placed in the libary folder, at the location set in these two places.You can on the component level override these values.
These may not solve this issue, but it good to know... while the addressing this issue... lets look at the files as they are on the repository.
VDM\Joomla\Componentbuilder\Compiler\Creator\FieldXML::get
VDM\Joomla\Componentbuilder\Compiler\Interfaces\Creator\Fieldtypeinterface::get
I see the pass by reference has changed... I will update these, and make it part of the next beta release.
I did not catch this... since I only use the String Manipulation build path, and not the XML :) but both should work, so Thanks!
@Lemuel be sure to also test the build with the XML path set in the component global settings under the compiler tab:
Currently the default in the Global Config is
SimpleXMLElement Class
.And the
SimpleXMLElement Class
comes as default with php8.0 and newer.But in the Compiler when I compile it still got this message:

So with advice from @Llewellyn I ran the following commands in my Docker Container.
I'm using octojoom so it made the process quite simple:
Now when I compile the Demo Component I no longer get that notice about the Tidy setup and everything is still compiling and installing correctly.
So coming back to the last reply on this issue:
@mwweb, just wondering if you got a chance to check if this issue is resolved with the latest Beta5 release? We really appreciate all the feedback from the JCB community - your input's really helpful!
Let us know if the issue's sorted!
I did the testing, and the Tidy install (even though I had already done so).
Still received the fatal error.
However, I changed the Field Builder Type to String Manipulation, as Llewellyn uses, an I didn't receive the fatal error, and the component compiled.
Then, just on a whim I downloaded JCB 5.1.1-beta5 (I had beta2), and the component compiled with no issues with SimpleXML
I have an odd compile issue that I need to try to track down, but that is another issue. In a nutshell, my component has 4 tables, and compiles correctly, but when I install it creates my tables, plus numerous JCB tables, except with my component name instead of componentbuilder.
A little more digging I found that in com_mycomponent_J5\libraries\mylibrary###.Joomla\src{MyComponent\Table.php, the JCB fields are in that table. Odd.
'link' => NULL, 'fields' => [ 'property' => [ 'name' => 'property', 'type' => 'pluginsclassproperties', 'link' => [ 'type' => 1, 'table' => '#__componentbuilder_class_property', 'component' => 'com_componentbuilder', 'entity' => 'class_property', 'value' => 'name', 'key' => 'guid', ], ], ], ], 'add_head' => [ 'name' => 'add_head', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_plugins', 'store' => NULL, 'tab_name' => 'Code', 'db' => [ 'type' => 'TINYINT(1)', 'default' => '0', 'GUID' => '65341477-33f1-4d58-9b3c-c371168809da', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => false, ], 'link' => NULL,
Please change
VDM.Table
content to like this:The power GUID:
bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8
It seems we released the power into the global repository accidentally with JCB code in it.
/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.power
I have now pushed out a fix... so just resetting the class will also fix it.
Just search for
bfd1d6d5
and reset that class. That should resolve the issue.Yay. I searched for the power GUID, opened it, performed a Reset, then recompiled my component, and it didn't install the extra JCB fields.