MyBB Community Forums

Full Version: SCEditor Issues and Resolutions [1.8.21 upgrade]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
This has been outlined in the comments in committed PR, but since users are still facing trouble; here is a more stepped, elaborated version of the todo you need to follow right after upgrading your site to 1.8.21.
  1. Delete the entire old folder sceditor, located under jscripts folder. (This is not a mandatory step, but recommended as the problem can happen what OP indicating if old files loaded, that will confuse and make troubleshoot harder) and upload the fresh sceditor folder from latest package.
  2. Since the code structure has been changed you need to revert the codebuttons template to default (located under Ungrouped Templates group) for every single theme you have installed and available.
  3. Open the theme settings (ACP > Templates & Style > Themes > [theme name]), find the dropdown called Editor Style, pick a style and apply. Please note here that if you were using MyBB as style earlier, you need to reselect the style and reapply. This will overwrite the old settings for your theme in database. You need to do this step for every single theme you have installed and available.


What happens if not done / what changed there? 
  • The BBCode was earlier implemented as plugin with SCEditor, now its format. So, not reverting that will lead you to having HTML output throughout the posts / signatures and wherever editor is used. Please also note that if you already faced HTML output issue and reverted codebuttons template default on a later stage: all the newly created posts will be fine but old posts showing HTML will not be magically fixed as they are already parsed and saved in database that way. In that case the old defective posts need to be manually edited.
  • The SCEditor-MyBB bridge javascript file (bbcodes_sceditor.js) has been re-written to make it compatible with latest jQuery library and as per latest SCEditor specifications. So, the bridge is linked through codebuttonstemplate with a version bump. If version bump is not there your browser may load the old bridge from local cache and that will break the editor.
  • There are significant changes in core paths of latest SCEditor which are reflected in codebuttonstemplate. Having the old template in place; the system will find the required supporting files in old paths, and if not found the editor will break, if found (in case you didn't follow step 1) the editor will start behaving weird and will confuse you how to fix the issues.
  • With the upgrade of version 2, SCEditor has introduced several backward incompatible changes, a major among those is the theme / styling of the editor. SCEditor is now using Flexbox as backbone of the editor frontend and that leads all the old editor styles to be invalidated.In order to fix some issues around re-sizing and resizing the editor in a hidden parent, the theme has been updated to use flex-box. Old themes will need to be updated to the new CSS and HTML in order to work.We have updated the available themes to work with latest SCEditor. However if you have custom styles for your theme you need to recode it for the above-mentioned change.
  • For advanced vector icon usage (the monocons users, specifically: that has been splitted from styles and introduced as icon system) please refer PR Comment.
Last but not least:

[*]SCEditor is a trouble for us since days. It is not like we are trying to introduce new bugs with our experiments but the fact is we have updated the SCEditor package to latest alongwith jQuery library to latest with a hope that everything will be improved. We have tested the implementation for like couple of months and invited open testing from community. The problem which our users are facing is occuring simply because of not following the important notes outlined in the release note / PR.

[*]We always want to provide best user experience but if the third party package in question always introduce new issues with the name of improvement then there is very less options remain in our hand other than regretting the decision of choosing the package and try to find a better alternative which we are already up to. If you are not happy we are also not, please bear with us for what is out of our control at this stage.
@effone  thanks you so much for The Support

I have read the information and followed the steps, now that its my code template of codebuttons: with new lines:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/icons/monocons.js?ver=1821"></script>
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
	plugins: "undo",
	format: "bbcode",
	icons: "monocons",
	style: "{$mybb->asset_url}/jscripts/sceditor/textarea_styles/jquery.sceditor.{$theme['editortheme']}?ver=1821",
	rtl: {$lang->settings['rtl']},
	locale: "mybblang",
	width: "100%",

Full Code of Template codebuttons:

<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/sceditor/editor_themes/{$theme['editortheme']}" type="text/css" media="all" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1821"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js?ver=1821"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/editor_plugins/undo.js?ver=1821"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/icons/monocons.js?ver=1821"></script>
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
	plugins: "undo",
	format: "bbcode",
	icons: "monocons",
	style: "{$mybb->asset_url}/jscripts/sceditor/textarea_styles/jquery.sceditor.{$theme['editortheme']}?ver=1821",
	rtl: {$lang->settings['rtl']},
	locale: "mybblang",
	width: "100%",
	enablePasteFiltering: true,
	autoUpdate: true,
	emoticonsEnabled: {$emoticons_enabled},
	emoticons: {
		// Emoticons to be included in the dropdown
		dropdown: {
			{$dropdownsmilies}
		},
		// Emoticons to be included in the more section
		more: {
			{$moresmilies}
		},
		// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
		hidden: {
			{$hiddensmilies}
		}
	},
	emoticonsCompat: true,
	toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",
};
{$editor_language}
$(function() {
	$("#{$bind}").sceditor(opt_editor);

	MyBBEditor = $("#{$bind}").sceditor("instance");
	{$sourcemode}
});
</script>

Now can see the correct BBcode via Quick Edit Button, with Edit Reason... but with Full Edit... please, see the picture:
[Image: Captura-de-pantalla-2019-06-27-a-la-s-10-09-38-a-m.png]

Good Day and Thanks in Advance for the Support!
Your templates "codebuttons" is still outdated. For example it references the directory editor_themes which has been removed in MyBB 1.8.21. Have you tried reverting the template?
(2019-06-30, 05:35 AM)StefanT Wrote: [ -> ]Your templates "codebuttons" is still outdated. For example it references the directory editor_themes which has been removed in MyBB 1.8.21. Have you tried reverting the template?

Hi StefanTTHank you for the support!
Yes, i tried to revert the template but still outdate of my live board of mybb, I will try to explain with an image.

in the left image display the template codebuttons of my test board, but in the right display the template codebuttons on my Live board, by default,
[Image: Captura-de-pantalla-2019-07-01-a-la-s-5-59-04-a-m.png]

Nota: It is shown in green code because I have to change the code like @effone recommendation, but if revert the template codebuttons to original, revert to:

Quote:<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/sceditor/editor_themes/{$theme['editortheme']}" type="text/css" media="all" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1820"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js?ver=1819"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/editor_plugins/undo.js?ver=1820"></script>
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
plugins: "bbcode,undo",
style: "{$mybb->asset_url}/jscripts/sceditor/textarea_styles/jquery.sceditor.{$theme['editortheme']}?ver=1820",
rtl: {$lang->settings['rtl']},
locale: "mybblang",
width: "100%",
enablePasteFiltering: true,
autoUpdate: true,
emoticonsEnabled: {$emoticons_enabled},
emoticons: {
// Emoticons to be included in the dropdown
dropdown: {
{$dropdownsmilies}
},
// Emoticons to be included in the more section
more: {
{$moresmilies}
},
// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
hidden: {
{$hiddensmilies}
}
},
emoticonsCompat: true,
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",
};
{$editor_language}
$(function() {
$("#{$bind}").sceditor(opt_editor);

MyBBEditor = $("#{$bind}").sceditor("instance");
{$sourcemode}
});
</script>

another problem is the style, after the update I can not see the board style MyBB by default
I have tried several times via ACP:  Home » Cache Manager to clear the cache, but the syles of my live board mybb, its missed from my database.
[Image: Captura-de-pantalla-2019-07-01-a-la-s-5-36-50-a-m.png]

I think these errors are related to the database, because the files are the same..

Thank You in Advance @StefanT
It seems you haven't run the upgrade script (properly).
(2019-07-01, 11:52 AM)StefanT Wrote: [ -> ]It seems you haven't run the upgrade script (properly).

Hi @StefanT  today can Upgrade the Board Script and can reverting the template.
the steps have been the same ones of easy install / update script.

I wrote to my hosting provider because I had other problems when entering the hosting or trying to update like folder permison or captcha imunify360 when used the mybb software or some security tool form CPanel like ModSecurity, or some protect tool of CPanel...

the good news is that today I was able to update the software MyBB 1.8.21 well

in advance thank you all for the support


pd: sorry for the inconveniences

now I can use the software normally Big Grin 

Big Grin
okay same problems with SCEditor but also with a twist.  I've gone through the messages relating to the problems with 1.8.21 fixed most of them (I think - deleted sceditor folder -> reloaded from zip file -> upgrade) but now have a screen that looks like this any place the full editor is invoked:

[Image: 37_08_07_19_2_16_37.png]

Did I miss something on the update or just hadn't this been mentioned yet?
//al

((admin move to separate topic if you want))
(2019-07-08, 02:19 PM)Al Jones Wrote: [ -> ]Did I miss something on the update or just hadn't this been mentioned yet?
//al

Go to the themes section of your theme and change the editor to default and refresh the editor page.

Also make sure templates > your theme > ungrouped templates > codebuttons is default.

[Image: Screenshot-1.jpg]
Thank you much @iAndrew to say that that wasn't exactly obvious would be an understatement. I run a forum, I expect the software (pretty much default) to behave!
same issue, i already follow the steps above but it wont work.
[attachment=41983]

[attachment=41982]
Pages: 1 2 3 4 5