? ? Pending

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
2 Apr 2018

Pull Request for Issue #20062

Summary of Changes

getInput() method of file
libraries/src/Form/Field/EditorField.php
(form field element type="editor" in the our XML files)

https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Form/Field/EditorField.php#L245
is passing "syntax" (syntax highlighting) in $params array
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Form/Field/EditorField.php#L254

but the display() method in codemirror.php file is not using $params['syntax']
instead it uses: $this->params->get('syntax' ...

  • which contains the $params data from the 1st call that loaded the editor instance
    (which is a bug for which i will make 2nd PR, but this 2nd PR might have side-effects as it is a more general fix that this PR)

This PR patches display() method in codemirror.php file to use $params['syntax'], similar like $params['readonly'] is used

Testing Instructions

XML for testing

<form>
	<field name="html" type="editor" filter="raw" editor="codemirror|none" syntax="html"/>
	<field name="css" type="editor" filter="raw" editor="codemirror|none" syntax="css"/>
	<field name="js" type="editor" filter="raw" editor="codemirror|none" syntax="js"/>
</form>

Expected result

The 1st editor will have HTML syntax highlighting
The 2nd editor will have CSS syntax highlighting
The 3nd editor will have JS syntax highlighting

Actual result

All codemirror editors have HTML syntax highlighting

Documentation Changes Required

None

avatar ggppdk ggppdk - open - 2 Apr 2018
avatar ggppdk ggppdk - change - 2 Apr 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2018
Category Front End Plugins
avatar ggppdk ggppdk - change - 2 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 2 Apr 2018
avatar ggppdk ggppdk - change - 2 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 2 Apr 2018
avatar Septdir
Septdir - comment - 2 Apr 2018

I have tested this item successfully on 0f8eba2

Test with this xml
Works great, I would like to see the nearest version


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20063.

avatar Septdir Septdir - test_item - 2 Apr 2018 - Tested successfully
avatar ggppdk ggppdk - change - 2 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 2 Apr 2018
avatar ggppdk ggppdk - change - 3 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 3 Apr 2018
avatar ggppdk ggppdk - change - 3 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 3 Apr 2018
avatar pavluk
pavluk - comment - 3 Apr 2018

I have tested this item successfully on 0f8eba2

Tested on com_content all works


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20063.

avatar pavluk pavluk - test_item - 3 Apr 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Apr 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2018

Ready to Commit after two successful tests.

avatar ggppdk ggppdk - change - 3 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 3 Apr 2018
avatar ggppdk ggppdk - change - 3 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 3 Apr 2018
avatar mbabker mbabker - change - 7 Apr 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-07 14:32:41
Closed_By mbabker
Labels Added: ? ?
avatar mbabker mbabker - close - 7 Apr 2018
avatar mbabker mbabker - merge - 7 Apr 2018

Add a Comment

Login with GitHub to post a comment