J4 Issue ?
avatar RickR2H
RickR2H
29 Jun 2021

Issues in Joomla 4.0 rc3-dev!

Steps to reproduce the issue

Just did a clone from Git an noticed that some functionality from TinyMCE are broken.

  1. The icon configurator is empty:
    screen shot 2021-06-29 at 16 55 49
    When TinyMCE is saved in this state I get an error when I use the article editor: Notice: Trying to get property '2' of non-object in W:\wamp64\www\testeditor\plugins\editors\tinymce\tinymce.php on line 200

screen shot 2021-06-29 at 17 25 02

  1. Content Template Directory/functionality is not working
    There is new a functionality added to the TinyMCE called Content Templates. With this functionality you can select predefined content templates from Cassiopeia html/tinymce folder. As the folder selector is there in the TinyMCE, it only shows - Default -. Also the functionality is not working as TinyMCE only shows the predefined templates from the old location.

screen shot 2021-06-29 at 17 29 16

  1. Custom CSS Classes not working
    Selecting a custom CSS file is not working in TinyMCE. It will only load the editor.css

custom-classes

Expected result

Actual result

System information (as much as possible)

Additional comments

avatar RickR2H RickR2H - open - 29 Jun 2021
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Jun 2021
avatar RickR2H RickR2H - change - 29 Jun 2021
The description was changed
avatar RickR2H RickR2H - edited - 29 Jun 2021
avatar RickR2H RickR2H - change - 29 Jun 2021
The description was changed
avatar RickR2H RickR2H - edited - 29 Jun 2021
avatar chmst
chmst - comment - 29 Jun 2021

Did you composer install and npm ci?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34649.
avatar RickR2H
RickR2H - comment - 29 Jun 2021

Did you composer install and npm ci?

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

Yes I did! A clean install of the 4.0-dev branche.

avatar richard67
richard67 - comment - 29 Jun 2021

Issues in Joomla 4.0 RC3!

@RickR2H This version has not been released yet. I guess you mean rc3-dev.

avatar RickR2H RickR2H - change - 29 Jun 2021
The description was changed
avatar RickR2H RickR2H - edited - 29 Jun 2021
avatar RickR2H
RickR2H - comment - 29 Jun 2021

Issues in Joomla 4.0 RC3!

@RickR2H This version has not been released yet. I guess you mean rc3-dev.

Correct. Updated my description! How can I update the milestone?

avatar richard67
richard67 - comment - 29 Jun 2021

Did you composer install and npm ci?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34649.

Yes I did! A clean install of the 4.0-dev branche.

@RickR2H @chmst hasn’t asked if you made a clean installation, she has asked if you have run composer and npm.

avatar richard67
richard67 - comment - 29 Jun 2021

@RickR2H Milestones are set for pull requests, not for issues.

avatar RickR2H
RickR2H - comment - 29 Jun 2021

Did you composer install and npm ci?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34649.

Yes I did! A clean install of the 4.0-dev branche.

@RickR2H @chmst hasn’t asked if you made a clean installation, she has asked if you have run composer and npm.

True, but you have to run composer and npm ci to get the installation to work.

avatar richard67
richard67 - comment - 29 Jun 2021

Did you composer install and npm ci?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34649.

Yes I did! A clean install of the 4.0-dev branche.

@RickR2H @chmst hasn’t asked if you made a clean installation, she has asked if you have run composer and npm.

True, but you have to run composer and npm ci to get the installation to work.

@RickR2H Not necessarily if the branch hasn’t been cleaned up from previous, older results of these commands after having checked out or pulled.

avatar RickR2H
RickR2H - comment - 29 Jun 2021

@richard67 It was a git pull from the J! repo. After switching the branche to 4.0-dev I dit composer install and npm ci. That's what I ment with clean. Did an other run of composer and npm just to be sure. Same result.

avatar brianteeman
brianteeman - comment - 29 Jun 2021

Confirmed

avatar brianteeman
brianteeman - comment - 29 Jun 2021
Uncaught TypeError: Cannot read property 'tooltip' of null
    at g (tinymce-builder.min.js?9822b7ae5b380d2f620c8f583b70a843:1)
    at Object.h.TinyMCEBuilder (tinymce-builder.min.js?9822b7ae5b380d2f620c8f583b70a843:1)
    at HTMLDocument.<anonymous> (tinymce-builder.min.js?9822b7ae5b380d2f620c8f583b70a843:1)
avatar chmst
chmst - comment - 29 Jun 2021

I have repeated clean installation on win10, xampp PHP 7.4 and php8.0 without problem.

Until clearing browser cache ... then i could reproduce


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34649.
avatar RickR2H
RickR2H - comment - 29 Jun 2021

I'll try a nightly when I back on my PC.

avatar richard67
richard67 - comment - 29 Jun 2021

@RickR2H Better try the brand new RC 3. It has just been released.

avatar richard67
richard67 - comment - 29 Jun 2021

@RickR2H @brianteeman What’s your npm and node versions?

avatar brianteeman
brianteeman - comment - 29 Jun 2021

C:\htdocs\joomla-cms>npm -v
7.16.0

C:\htdocs\joomla-cms>node -v
v14.15.2

avatar richard67
richard67 - comment - 29 Jun 2021

Hmm versions should be new enough.

avatar richard67
richard67 - comment - 29 Jun 2021

If you can't test with the brand new RC 3 in an empty folder for some reason, issue following commands in a command window on your local git clone after having checked out and pulled the 4.0-dev branch:

git clean -d -x -f
git checkout .
git pull origin 4.0-dev

(assuming the remote is named "origin").

The first command removes all files and folder not being tracked by git and not being mentioned in the .gitignore file.
The second command reverts all modifications to files tracked by git.
The third commands pulls changes from remote.

After that, do again

composer install
npm ci

And then make again a new installation.

If that or the new 4.0 TC 3 package works, then there was some compiled/compressed/gzipped js leftover from past which causes the issues.

If all that does not work then we can be more sure that we have an issue.

avatar richard67
richard67 - comment - 29 Jun 2021

P.S.: And clear browser cache to be sure having gotten rid of old cached js.

avatar brianteeman
brianteeman - comment - 29 Jun 2021

Before I had the same screenshot as @RickR2H

Now after git clean etc I have

image

avatar richard67
richard67 - comment - 29 Jun 2021

Hmm ... less weird but still weird ... next step would be to format hard disk ...

avatar brianteeman
brianteeman - comment - 29 Jun 2021

remind me how to do that again ;)

avatar richard67
richard67 - comment - 29 Jun 2021

I can reproduce what @brianteeman reported back on a clean, current 4.0-dev branch after composer install and npm ci, cleared browser cache and closed browser session:

2021-03-29_1

2021-03-29_2

avatar richard67
richard67 - comment - 29 Jun 2021

Tested with latest version of Firefox and Google Chrome, both on Windows 10.

avatar richard67
richard67 - comment - 29 Jun 2021

The 2nd point I can't reproduce:

2021-03-29_3

avatar RickR2H
RickR2H - comment - 29 Jun 2021

I can reproduce what @brianteeman reported back on a clean, current 4.0-dev branch after composer install and npm ci, cleared browser cache and closed browser session:

2021-03-29_1

2021-03-29_2

Confirmed! Same result... On Windows 10 + Chrome

avatar RickR2H
RickR2H - comment - 29 Jun 2021

The 2nd point I can't reproduce:

2021-03-29_3

Same issue with the current 4.0-dev. Still only - Use Default - as an option

avatar richard67
richard67 - comment - 29 Jun 2021

@RickR2H You mean you have only the "Default" in the list select and not the "cassiopeia/html/tinymce"?

avatar richard67
richard67 - comment - 29 Jun 2021

Ah I was too fast, you wrote it already.

avatar RickR2H
RickR2H - comment - 29 Jun 2021

@RickR2H You mean you have only the "Default" in the list select and not the "cassiopeia/html/tinymce"?

Yes, only - Use Default - as option. Not the path like in your screenshot.

avatar RickR2H
RickR2H - comment - 29 Jun 2021

@brianteeman does the path in the "Content Template Directory" work in your installation?

avatar Fedik
Fedik - comment - 29 Jun 2021

the icons missed due to #34472
Joomla.sanitize() applied to icons:

if (item) {
$btn = createButton(name, item, type);
box.innerHTML += Joomla.sanitizeHtml($btn);

avatar RickR2H
RickR2H - comment - 29 Jun 2021

@dgrammatiko could you take a look?

avatar richard67
richard67 - comment - 29 Jun 2021

Ping @dgrammatiko ?

avatar RickR2H
RickR2H - comment - 29 Jun 2021

Could this also be related to the "Content Template Directory" path?

avatar brianteeman
brianteeman - comment - 29 Jun 2021

@brianteeman does the path in the "Content Template Directory" work in your installation?

Yes it works

Check to make sure that the folder exists

avatar brianteeman
brianteeman - comment - 29 Jun 2021

as the js issue was to fix a release blocker and it clearly created this issue then this should be a release blocker

avatar dgrammatiko
dgrammatiko - comment - 29 Jun 2021

the icons missed due to #34472
Joomla.sanitize() applied to icons:

if (item) {
$btn = createButton(name, item, type);
box.innerHTML += Joomla.sanitizeHtml($btn);

The sanitizer can have a second argument (array of objects) to extend the supported elements and the safe attributes. I’ll do a pr

EDIT: PR: #34654

avatar richard67 richard67 - change - 29 Jun 2021
Labels Added: J4 Issue ?
avatar richard67 richard67 - labeled - 29 Jun 2021
avatar richard67 richard67 - labeled - 29 Jun 2021
avatar alikon alikon - change - 30 Jun 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-06-30 06:10:35
Closed_By alikon
Labels Added: Language Change
Removed: ?
avatar alikon alikon - close - 30 Jun 2021
avatar alikon
alikon - comment - 30 Jun 2021

please test #34654

avatar rdeutz rdeutz - change - 30 Jun 2021
Labels Removed: Language Change
avatar rdeutz rdeutz - unlabeled - 30 Jun 2021
avatar RickR2H
RickR2H - comment - 30 Jun 2021

@richard67 @brianteeman Update regarding the "Content Template Directory" path. I did some extensive testing and I noticed that in a live site environment I can select the path "cassiopeia/html/tinymce" on my local WAMP server I just get "- Use Default -". So the issue is related to my local env, The problem is that is is just a clean WAMP installation with no fancy tweaks. So probably more people should have the same problem. Maybe it is an issue with how the Content Tenplate path is required from the server that only works om some configurations?

Do you guys have some tips on where to look and how to investigate the issue?

avatar richard67
richard67 - comment - 30 Jun 2021

I normally use Linux servers for testing but will later see if I can reproduce it on one of my Windows environments.

On the other hand, as far as I know @brianteeman uses Windows, so it should not be Windows specific problem.

avatar brianteeman
brianteeman - comment - 30 Jun 2021

correct - i am on windows

avatar RickR2H
RickR2H - comment - 30 Jun 2021

I normally use Linux servers for testing but will later see if I can reproduce it on one of my Windows environments.

On the other hand, as far as I know @brianteeman uses Windows, so it should not be Windows specific problem.

Thanks Richard! I'll also do some more investigation. Let me know it it works on your env. @brianteeman which WAMP install do you use?

avatar brianteeman
brianteeman - comment - 30 Jun 2021

I use native apache and php etc

avatar RickR2H
RickR2H - comment - 30 Jun 2021

@brianteeman @richard67 Did some extensive testing and can confirm that is was pure my local installation. Thanks for your patience and feedback.

avatar RickR2H
RickR2H - comment - 1 Jul 2021

@brianteeman looks like the "Content Template Directory" path work now but setting it is has no effect in the editor, Only the default templates show up in the template selector. Also setting a custom editor CSS in TinyMCE doesn't seems to work. Could you confirm my findings? If so, I'll open a new issue. Thanks!

avatar brianteeman
brianteeman - comment - 1 Jul 2021

are you sure you didnt fall into the trap of forgetting that those settings apply only to the selected set. So if you are a super admin you would need to move to the third tab (set 0) and make the settings there

avatar brianteeman
brianteeman - comment - 1 Jul 2021

tiny

avatar RickR2H
RickR2H - comment - 1 Jul 2021

@brianteeman never noticed that all te settings apply to every set differently! Thanks for pointing me in the right direction!

Add a Comment

Login with GitHub to post a comment