Go to System > Plugins
Edit Editor - TinyMCE
plugin.
Click Save & Close
button.
Create or edit an article.
See error.
Notice: Trying to get property '0' of non-object in \plugins\editors\tinymce\tinymce.php on line 200
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Release Blocker
|
I could not replicate this on a completely clean install
I cannot replicate the error on the site where I am working on (4.0.5 dev, not empty)
The reason that I said not empty was that I could replicate it on an install that had moved up to 4.1 and then back to 4.0
$toolbarParams = $toolbarParamsAll->{$set};
should do
Same error. Initially, it is an object. After saving TinyMCE settings, it is an array.
Before:
object(stdClass)[1058]
public '2' =>
object(stdClass)[1057]
public 'toolbar1' =>
array (size=11)
0 => string 'bold' (length=4)
1 => string 'underline' (length=9)
2 => string 'strikethrough' (length=13)
3 => string '|' (length=1)
4 => string 'undo' (length=4)
5 => string 'redo' (length=4)
6 => string '|' (length=1)
7 => string 'bullist' (length=7)
8 => string 'numlist' (length=7)
9 => string '|' (length=1)
10 => string 'pastetext' (length=9)
After:
array (size=3)
0 =>
object(stdClass)[1066]
public 'menu' =>
array (size=6)
0 => string 'edit' (length=4)
1 => string 'insert' (length=6)
2 => string 'view' (length=4)
3 => string 'format' (length=6)
4 => string 'table' (length=5)
5 => string 'tools' (length=5)
Try
$extraOptionsAll = (object) $this->params->get('configuration.setoptions', array());
$toolbarParamsAll = (object) $this->params->get('configuration.toolbars', array());
Can you reverse the array and then cast it to an object?
Sorry I don't understand. Another issue is that it is displaying set 2 and not set 0 after saving TinyMCE settings. Something else is going on since v4.0.4.
Labels |
Removed:
Release Blocker
|
Yes, I understand. Hopefully, it is an isolated case. If no one else can reproduce it, I will close it by tomorrow.
@Quy did you edited TinyMCE plugin options after installation, or not? so they is default now
Something else is going on since v4.0.4.
there was PR #36066
One thing I can guess, before the PR we had keys as 2 1 0 and JRegistry store it as object
,
after changing order to 0 1 2 JRegistry store it as array
.
This need to check.
Labels |
Added:
Release Blocker
|
Just tried and can confirm the issue with today nightly build!
Reversing this
joomla-cms/plugins/editors/tinymce/src/Field/TinymcebuilderField.php
Lines 97 to 100 in 8bcefc9
to
// Get array of sets names
for ($i = $setsAmount; $i >= 0; $i--)
{
$data['setsNames'][$i] = Text::sprintf('PLG_TINY_SET_TITLE', $i);
}
Seems to do the trick. (keep the typecasting and the other ->{$set}
from my previous comments)
@Fedik since the whole tinyMCE builder is mostly your code can you confirm that this is correct? If so, then someone needs to do a PR with the changes
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-12-02 19:16:19 |
Closed_By | ⇒ | Fedik |
Labels |
Removed:
Release Blocker
|
Is this a completely clean installation?