[BUG]: Custom fields and Rules are not compiled in module #1313

Open
opened 2026-06-23 11:08:57 +00:00 by SimonvanDoorne · 2 comments
Member

What Happened?

When you link a module to a component and select in the module to add the custom fields to the module: afbeelding.png
The folders /src/Field and /src/Rule are built, but they only contain an index.html file.
The XML definition also does not contain any reference to the rules or field files
afbeelding.png

Steps to reproduce the Bug

  1. Create component
  2. Create Module with custom field in config
  3. Set 'Fields and Rules location' to 'Module'
  4. Folders /Field and /Rule are created but only contain index.html files
  5. The XML definition file also does not contain the reference to the folders created

Which Joomla version are you compiling in?

5.3.3

Which PHP version are you compiling in?

8.1

Which Joomla versions are you targeting?

any version

Which PHP version are you targeting?

8.1

Which Web server is JCB running on?

Ubuntu

Which Relational Database is JCB running on?

MariaDB

Which OS is JCB running on?

Ubuntu 20.04 LTS

Which JCB version are you using?

5.1.6 stable

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? When you link a module to a component and select in the module to add the custom fields to the module: ![afbeelding.png](/attachments/467002ba-12c7-4881-9966-0a1502131578) The folders /src/Field and /src/Rule are built, but they only contain an index.html file. The XML definition also does not contain any reference to the rules or field files ![afbeelding.png](/attachments/8d987a55-bf75-4529-9426-d031261c7d3d) ### Steps to reproduce the Bug 1) Create component 2) Create Module with custom field in config 3) Set 'Fields and Rules location' to 'Module' 4) Folders /Field and /Rule are created but only contain index.html files 5) The XML definition file also does not contain the reference to the folders created ### Which Joomla version are you compiling in? 5.3.3 ### Which PHP version are you compiling in? 8.1 ### Which Joomla versions are you targeting? any version ### Which PHP version are you targeting? 8.1 ### Which Web server is JCB running on? Ubuntu ### Which Relational Database is JCB running on? MariaDB ### Which OS is JCB running on? Ubuntu 20.04 LTS ### Which JCB version are you using? 5.1.6 stable ### Where in JCB did this issue occur? Compilation of a component ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
SimonvanDoorne added the Bug label 2026-06-23 11:08:57 +00:00
Owner

Hi Simon,

This is a known issue at the moment.

When we moved from Joomla 4 to Joomla 5 and introduced namespaces into the fields and rules classes, it immediately added an extra layer of complexity to the file-location process. Previously, we only needed to identify that a field file had to be moved, and then move that file to the correct location. That process was relatively simple.

However, with namespaces now involved, moving the file alone is no longer enough. We also need to update the namespace inside the file, along with any related namespace related stuff. Unfortunately, we have not yet been fully successful in completing that process, and as a result, it currently stops halfway through in the compiler.

So, at this stage, this functionality is not working as intended.

We are aware of the issue, and we are working on a solution, but it has not been our main focus recently. A lot of our effort has been directed toward deeper AI integration in JCB. I am not sure whether you have seen the latest tutorial we released, but it shows how AI can now help you generate metadata for tables much faster. That area has received most of our attention lately.

Regarding this specific issue, I cannot give you a timeframe for when it will be resolved. I have given it quite a bit of thought, and there are a few ideas I am exploring that would fundamentally change the way we handled this in the past.

The core challenge is that simply moving the file now leaves it with the wrong namespace, which can cause errors when that field or rule is loaded, especially because of namespace collisions. For that reason, I have been looking at a cleaner approach where, if we move the file, we also safely update the namespace and related references. I was not willing to implement a quick or dirty solution for this, so the issue was put on hold for the time being.

Thanks for bringing it up. I appreciate the reminder. While I cannot give any timeline yet, we are aware of the problem and it is still something we intend to solve.

Hi Simon, This is a known issue at the moment. When we moved from Joomla 4 to Joomla 5 and introduced namespaces into the fields and rules classes, it immediately added an extra layer of complexity to the file-location process. Previously, we only needed to identify that a field file had to be moved, and then move that file to the correct location. That process was relatively simple. However, with namespaces now involved, moving the file alone is no longer enough. We also need to update the namespace inside the file, along with any related namespace related stuff. Unfortunately, we have not yet been fully successful in completing that process, and as a result, it currently stops halfway through in the compiler. So, at this stage, this functionality is not working as intended. We are aware of the issue, and we are working on a solution, but it has not been our main focus recently. A lot of our effort has been directed toward deeper AI integration in JCB. I am not sure whether you have seen the [latest tutorial](https://youtu.be/JeUNTSz5BY8) we released, but it shows how AI can now help you generate metadata for tables much faster. That area has received most of our attention lately. Regarding this specific issue, I cannot give you a timeframe for when it will be resolved. I have given it quite a bit of thought, and there are a few ideas I am exploring that would fundamentally change the way we handled this in the past. The core challenge is that simply moving the file now leaves it with the wrong namespace, which can cause errors when that field or rule is loaded, especially because of namespace collisions. For that reason, I have been looking at a cleaner approach where, if we move the file, we also safely update the namespace and related references. I was not willing to implement a quick or dirty solution for this, so the issue was put on hold for the time being. Thanks for bringing it up. I appreciate the reminder. While I cannot give any timeline yet, we are aware of the problem and it is still something we intend to solve.
Author
Member

Thank you for the feedback, is there a plugin event that is triggered after compiling by JCB, but before zipping the files? That way i could make a plugin that would intercept this moment and attempt to create the file myself :)

Thank you for the feedback, is there a plugin event that is triggered after compiling by JCB, but before zipping the files? That way i could make a plugin that would intercept this moment and attempt to create the file myself :)
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1313