?
avatar sevenstudio
sevenstudio
3 Feb 2017

Steps to reproduce the issue

Upgraded Joomla 3.6.5 to 3.7.0 beta 1
open TinyMCE plugin settings

Expected result

opens the TinyMCE settings

Actual result

Error display:
An error has occurred. 0 Cannot use string offset as an array

System information (as much as possible)

PHP Version 7.1.0
error log:
PHP Warning: Illegal string offset 'toolbars' in C:\UniServerZ\www\365\layouts\plugins\editors\tinymce\field\tinymcebuilder.php on line 162, referer: http://localhost/365/administrator/index.php?option=com_plugins&view=plugins

Additional comments

In the layout file: layouts\plugins\editors\tinymce\field\tinymcebuilder.php
after line 143
foreach ( $setsNames as $num => $title ) :

I've added:
$value = array();

plugin settings are accesible now without any errros.
Not sure if this is correct fix but someone should look at this issue or try to reproduce it.
Thanks!

avatar sevenstudio sevenstudio - open - 3 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 3 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Feb 2017
avatar sevenstudio sevenstudio - edited - 3 Feb 2017
avatar infograf768
infograf768 - comment - 3 Feb 2017

@dgt41 can you have a look

avatar dgt41
dgt41 - comment - 3 Feb 2017

@infograf768 the proposed solution works for me, as well

avatar sevenstudio
sevenstudio - comment - 3 Feb 2017

@dgt41 sorry, the proposed solution is wrong, it allows to open the plugin settings without php error, but it looks that changes to sets for a different groups are not saved.

I think that the problem is that after migration the $value is empty, so it throws an error. After saving everything is ok.

This could be a correct solution, before foreach loop mentioned above I added:

	if (!is_array($value)) {
		$value = array();
	}

it allows to open the pulgin settings without any problems after upgrade 3.6.5 -> 3.7.0, also there is no problem with saving settings. Sorry, but my PHP knowledge is quite limited so I'm not sure if that is the best fix for this issue.

avatar Fedik
Fedik - comment - 4 Feb 2017

please test #13901

avatar zero-24 zero-24 - change - 4 Feb 2017
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-04 13:25:01
Closed_By zero-24
avatar zero-24 zero-24 - close - 4 Feb 2017

Add a Comment

Login with GitHub to post a comment