J4 Issue ?
avatar brianteeman
brianteeman
21 Feb 2019

Steps to reproduce the issue

The note field is used to display the information about the skins in the tinymce editor plugin

The code has always been wrong but in j4 it now results in visually broken code as well

image

avatar brianteeman brianteeman - open - 21 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 21 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Feb 2019
avatar infograf768
infograf768 - comment - 22 Feb 2019

The correct path is
/media/vendor/tinymce/skins/
but placing a new skin there is killed when using npm ci.
As, normally, final users do not have to use npm ci when updating J, it may be possible to add the skin there and it would not be deleted. Not sure.

Also, tinymcebuilder is not designed to load the css from such a new skin. As well for init.es6.js. Maybe more in other files (theme.js, etc.).

@dgrammatiko
Shall we just get rid of the Note itself and only use lightgray or is it possible to correct all this?

avatar brianteeman
brianteeman - comment - 22 Feb 2019

the actual text is off topic - please open a separate issue for that - this issue is about the Note field itself. I just used the skins as an example of its use. It is used in many places

avatar dgrammatiko
dgrammatiko - comment - 22 Feb 2019

@infograf768 I’m pretty sure I had a pr that cleaned up this mess by moving the override template to the actual template of the site

avatar dgrammatiko
dgrammatiko - comment - 22 Feb 2019

@infograf768 feel free to resurrect:
#14510 and #14456
Both totally valid and imo needed changes. These PRs align tinyMCE to the rest of the overriding methods on Joomla

avatar infograf768
infograf768 - comment - 22 Feb 2019

@dgrammatiko
Alas I would not know what to do with these.

@brianteeman
The issue looks related to renderfield.php which does not accept specific elements in the xml, allowing therefore to create new css classes or conditions to cope with this bad display.

avatar infograf768
infograf768 - comment - 23 Feb 2019

Checked further:

  1. I see no reason (for TinyMCE) to use the Note type for that field. Using a spacer would be easier. (as we do for com_media Options). Don't know if any pb with spacer and a11y. If there is then the spacer field may have to be modified.
  2. The renderfield.php file has been heavily modified in 4.0 vs 3.x. This explain the double display of the description in a supplementary <div>.
    See #18465 by @C-Lodder and #22165 by @brianteeman
    It is not obvious to find out the reasons as these were merged without ever being tested OK, this already in 2017...
  3. As stated above there are ways to define specific classes in the xml and then check if they exist in renderfield.php $displayData and depending on this, create new css to correct the display.

I know there other fields in core using the Note field type but could not find a way to display them.
To implement this, it would be useful to test these too.

There may be simpler solutions but could not find them.
@C-Lodder

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Mar 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category Plugins
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar brianteeman
brianteeman - comment - 20 May 2019

The problem is that this field (and others) is not using a layout - instead all the markup is being generated (badly) in the library libraries\src\Form\Field\NoteField.php

@wilsonge has already pointed out that all fields need to use a layout and that will resolve everything for this note field as well.

I will try to work on this next week but if anyone else wants to do it then just go for it

avatar brianteeman
brianteeman - comment - 14 Sep 2019

@SharkyKZ as you did the checkbox field it would be great if you could also do the note field

avatar brianteeman
brianteeman - comment - 29 May 2020

Closing this as the issue with tinmyce has been fixed with #29259

avatar brianteeman brianteeman - close - 29 May 2020
avatar brianteeman brianteeman - change - 29 May 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-05-29 13:47:29
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 31 May 2020

Re-opened - #29259 just masked the problem by not using the note field. the problem still exists if the field is used.

avatar brianteeman brianteeman - change - 31 May 2020
Status Closed New
Closed_Date 2020-05-29 13:47:29
Closed_By brianteeman
avatar brianteeman brianteeman - reopen - 31 May 2020
avatar brianteeman brianteeman - change - 23 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-23 21:41:46
Closed_By brianteeman
avatar brianteeman brianteeman - close - 23 Dec 2020
avatar brianteeman
brianteeman - comment - 23 Dec 2020

closed see #29710

Add a Comment

Login with GitHub to post a comment