User tests: Successful: Unsuccessful:
In JFormFieldEditor, $editorType reads $element['editor'] instead of $element['editorType']
For BC, added a fallback to use 'editor' if 'editorType' is not provided as an attribute.
Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33257
If you look in the history, it was introduced 5 months ago as part of GSOC. I think it is just oversight to not have included this type of correction. I plan to update the Joomla Doc for the field if/when this is merged.
Never mind ... I see now I was looking at this from the wrong perspective. $editorType was simply created to hold the possible values of the editor attribute in XML. Closing here and on Tracker.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-02-21 19:42:18 |
If it was simple created to hold possible values of the editor attribute in XML than it had to be left to:
/**
Why do we have this in __set:
case 'editorType':
// Can be in the form of: editor="desired|alternative".
$this->editorType = explode('|', trim((string) $value));
break;
if we can't actually use it? Am I missing something here?
@compojoom Imho it works just fine as it is, using the editor
attribute (as stated in documentation). The case 'editorType' ...
part is just not needed at all and should be removed.
It is taken care of on line https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/form/field/editor.php#L214 and https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/form/field/editor.php#L230
That is what I'm saying. It is working just fine with editor, so we should remove the case 'editorType' as it is just confusing.
When I was looking at the code and wanted to find out if there was a way to use an editorType I thought that I had to set an attribute 'editorType' in the xml... So, if it is not used, then it shouldn't be there.
That is what I'm saying. It is working just fine with editor, so we should remove the case 'editorType' as it is just confusing.
Agreed. Someone of you two want to do a PR for it?
Do you know when this got changed to
editorType
? Because the doc (http://docs.joomla.org/Editor_form_field_type) says to useeditor
. So I'd say the code checking foreditorType
is wrong andeditor
would be correct (as it used to be).Or is there a reason to change the attribute name?