[BUG]: Field type custom not included in the complie result #1101
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1101
Loading…
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?
I have a field that its type is custom and has its own custom code for getOptions. I've added this field to an admin view.
When I compile this component with JCB 3.2.0 and set Joomla Version select box to Joomla 4, and then download the component, there is no php file to for this custom field in
admin/src/Field/
. I expect a php file in this location.And when I install this component and go to that admin view, and click on the New button, I see this field as an input box instead of select box. I expected it to be a select box.
Steps to reproduce the Bug
Use JCB v3.2.0.
Create a field. set type to custom. write some code for getOptions method.
Add this field to an admin view.
Go to compiler. set Joomla Version to Joomla 4. select the component. Click on compile component.
Download the component. Inspect the result (go to
admin/src/Field/
).Install the component. Go to the admin view. Click on New button. Checkout the custom field.
Which Joomla version are you compiling in?
v3.10.12
Which PHP version are you compiling in?
v8.1.27
Which Joomla versions are you targeting?
v4.4.1
Which PHP version are you targeting?
8.1.27
Which Web server is JCB running on?
LiteSpeed
Which Relational Database is JCB running on?
MySQL 10.3.39-MariaDB
Which OS is JCB running on?
linux Kernel Version 5.15.0-1037-gke
Which JCB version are you using?
v3.2.0
Which Joomla version is JCB installed on?
Joomla 3
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
No response
Okay so we do not get the same result following your steps, so you will need to give us more information that can help us understand what we are missing.
For example look at JCB4
admin/src/Field/
proof that it works.Thank you for the quick response.
I'm using JCB v3.2.0
List of files under
/administrator/components/com_componentbuilder/models/fields/
is attached.No you don't understand, I believe what your experiencing, and the link I send you is proofing that JCB does indeed build the field files and does indeed add them to the correct location in the Joomla 4 package.
So I need more information to understand why your system fails to do this.....
Humm. Got it.
Could you explicitly tell me what information do you need to debug this, so I provide them?
I can send a bunch of screenshots and text here, but I think that's not an efficient way to debug. So if you need access to my website, that's cool too, just tell me where I should send them to you?
Not really, you must debug this, and then when you find the issue give me all the details to understand what you found. I do not have time to debug your system. If this was a problem that I can duplicate it would be fixed by now... so with all issues I can't duplicate, the user is responsible to debug and communicate their findings.
Thanks, @Llewellyn.
My colleague, helped me and fixed this problem.
Actually, I was recreating a component in JCB. We had a component in JCB of website-A that we were trying to upgrade to Joomla 4 and when I upgraded the JCB to v3.2.0-beta7, The upgrade failed and the JCB corrupted bc of the unsuccessful upgrade.
I was recreating this component base on its code on the JCB of website-B. I've created "service" (custom) field base on models/forms/my_model.xml.
The problem was that this field had its own custom PHP code and I had to set php_prime property to 1. But I didn't notice that, I should have watched JCB's custom type field tutorial when I faced this problem.
Anyway, by setting php_prime to 1 the problem fixed.