SQL Field - Bug in XML Form Compiler? #14
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#14
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?
Hello Again,
So I'm wondering if this is a bug in the system or if there is something I am missing.
I've used CB to create a field called 'Countries' which does a lookup in a 'countries' table (installed with the component as a SQL Script, NOT via an admin view). The field is being used in an admin view called 'Contacts'. The component compiles and installs fine, lists contacts fine, but when I try adding an new contact, a parse error is thrown - the contacts.xml form file generated by CB contains an error...
I've looked up the line of code and debugged. Below is the XML generated for this specific field:
I've got it working by deleting the line
<!-- No Manual Options Were Added In Field Settings. -->
IE, the below works fine, without throwing errors, and saves contacts:
So am I missing something that the compiler throw this line in, or is it a bug?
Thanks,
Paola
Wow Paola
IT seems you are right, this is a bug... I will fix it and get back to you.
The line that adds that string can be found here https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/helpers/compiler/c_Fields.php#L859
The SQL field is part of the options group, since it is a list field. But since you don't add options the CB-tool thinks you made a mistake and adds this line... so I will add a check to insure that it will ignore the SQL field.
Let me know if this fix worked for you.
That's great, thank-you for the quick fix! And the sermons too, also working - its a great example for the more complex goodies I'm doing.
Thoroughly appreciate the quick turn around here Llewellyn. My timeline is tight and this is hugely supportive.
Warmly,
Paola