J4 Issue ?
avatar frogydiak
frogydiak
25 Jun 2018

Steps to reproduce the issue

I created a custom field that I wanted to add as a field in the config.xml file in the root folder of my com_custom.

So, I added a property addfieldpath="/administrator/components/com_custom/Field".

Going to Options, I see the field is being rendered by using the default layout which is Text. And I knew that my custom field is not being loaded is because anything I do in the method getInput() does not do anything including die().

Is is possible to use a custom field in the config.xml by the way?

Expected result

My custom field should be rendered.

Actual result

No custom field is being rendered.

Additional comments

If it should work, what should be the proper way to adding a field path to the fieldset in config.xml?

avatar frogydiak frogydiak - open - 25 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Jun 2018
avatar frogydiak frogydiak - change - 25 Jun 2018
Title
[J4.0] Config.xml with addfieldpath property in fieldset
[4.0] Config.xml with addfieldpath property in fieldset
avatar frogydiak frogydiak - edited - 25 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2018
Category com_fields
avatar SharkyKZ
SharkyKZ - comment - 26 Jun 2018

I'm not sure if addfieldpath is supposed to be broken but 4.0 uses addfieldprefix: addfieldprefix="Joomla\Component\Custom\Administrator\Field".

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Jun 2018
Status New Discussion
avatar brianteeman brianteeman - change - 26 Jun 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 26 Jun 2018
avatar frogydiak
frogydiak - comment - 26 Jun 2018

@SharkyKZ I tried addfieldprefix as well and same thing, it is not loading my custom field. Shouldn't the FormField class spits an error when an xml file is trying to load an unknown field?

avatar frogydiak
frogydiak - comment - 26 Jun 2018

Nevermind, I figured it out. J4.0 is loading custom fields in config.xml just fine. It just need documentation :) and going back to my question on unknown field:

I think it should not load field type text when it cannot load the field class being called. IMO, it would be best for developers to debug if FormHelper throw an exception when field class does not exists (line 203-206 and 218-221).

avatar brianteeman
brianteeman - comment - 23 Jul 2018

Closed. Feel free to submit the documentation to the docs site - it's a wiki and/or submit a pr to add the esception

avatar brianteeman brianteeman - close - 23 Jul 2018
avatar brianteeman brianteeman - change - 23 Jul 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-07-23 18:40:13
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment