Posts: 4,217
Threads: 120
Joined: May 2012
Reputation:
497
2019-06-27, 06:08 AM
(This post was last modified: 2019-06-27, 06:20 AM by effone. Edited 4 times in total.)
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.
- 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.
- 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.
- 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
codebuttons template 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
codebuttons template. 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.
Posts: 429
Threads: 77
Joined: Aug 2013
Reputation:
21
2019-06-27, 03:20 PM
@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:
Good Day and Thanks in Advance for the Support!
Posts: 4,241
Threads: 113
Joined: Jan 2006
Reputation:
111
2019-06-30, 05:35 AM
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?
Posts: 429
Threads: 77
Joined: Aug 2013
Reputation:
21
2019-07-01, 11:22 AM
(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 StefanT, THank 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,
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.
I think these errors are related to the database, because the files are the same..
Thank You in Advance @StefanT
Posts: 4,241
Threads: 113
Joined: Jan 2006
Reputation:
111
2019-07-01, 11:52 AM
It seems you haven't run the upgrade script (properly).
Posts: 429
Threads: 77
Joined: Aug 2013
Reputation:
21
2019-07-02, 04:36 PM
(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
Posts: 52
Threads: 13
Joined: Sep 2014
Reputation:
2
2019-07-08, 02:19 PM
(This post was last modified: 2019-07-08, 02:21 PM by Al Jones. Edited 2 times in total.)
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:
Did I miss something on the update or just hadn't this been mentioned yet?
//al
((admin move to separate topic if you want))
Posts: 1,582
Threads: 54
Joined: Jun 2014
Reputation:
249
2019-07-08, 03:02 PM
(This post was last modified: 2019-07-08, 03:02 PM by iAndrew.)
(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.
Posts: 52
Threads: 13
Joined: Sep 2014
Reputation:
2
2019-07-08, 03:21 PM
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!
Posts: 67
Threads: 35
Joined: Oct 2015
Reputation:
1
2019-07-10, 11:07 PM
same issue, i already follow the steps above but it wont work.
|