-
Notifications
You must be signed in to change notification settings - Fork 749
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CKEditor not loading on site after upgrade from 9.8.1 to 9.9.0 #4536
Comments
|
@bdukes Not try to dispute what you're saying but I have it on 3 different sites. All 3 sites have originated from different versions of DNN. Site 1 want to say 5.X days, Site 2 - 6.X and DNNdev.me site - 9.X. And I've never touched this folder structure. |
Looks like it was part of the previous CKEditor provider |
/*********************************************************************************************************/
/**
* Ventrian News Articles Article Link Selector plugin for CKEditor by Ingo Herbote
* Released: On 2013-02-17
*/
/*********************************************************************************************************/
( function() {
CKEDITOR.plugins.add( 'newsarticleslinks',
{
requires: [ 'iframedialog' ],
lang: ['de', 'en', 'pl'],
init: function( editor )
{
var me = this;
CKEDITOR.dialog.add( 'newsarticleslinksDialog', function (editor)
{
return {
title : editor.lang.newsarticleslinks.title,
minWidth : 550,
minHeight : 160,
contents :
[
{
id : 'iframe',
label : 'Article Links',
expand : true,
elements :
[
{
type : 'html',
id : 'pagenewsarticleslinks',
label : 'Article Links',
style : 'width : 100%;',
html : '<iframe src="'+me.path+'/dialogs/newsarticleslinks.aspx" frameborder="0" name="iframenewsarticleslinks" id="iframenewsarticleslinks" allowtransparency="1" style="width:100%;margin:0;padding:0;"></iframe>'
}
]
}
],
onOk : function()
{
for (var i=0; i<window.frames.length; i++) {
if(window.frames[i].name == 'iframenewsarticleslinks') {
var index = window.frames[i].document.getElementById("ArticlesList").selectedIndex;
var linkUrl = window.frames[i].document.getElementById("ArticlesList").value;
var linkText = window.frames[i].document.getElementById("ArticlesList").options[index].text;
}
}
editor.insertHtml('<a href="' + linkUrl + '" title="' + linkText + '">' + linkText + '</a>');
}
};
} );
editor.addCommand( 'newsarticleslinks', new CKEDITOR.dialogCommand( 'newsarticleslinksDialog' ) );
editor.ui.addButton( 'newsarticleslinks',
{
label: editor.lang.newsarticleslinks.button,
command: 'newsarticleslinks',
icon: this.path + 'icon.gif'
} );
}
} );
} )(); |
Brian is correct, this plugin was added by Ingo some years ago in his original version of the CKEditor provider. DnnConnect CKEditor provider is based on Ingo's provider, but removed most of the plugins he wrote and included. You might transfer the plugin yourself, but need to register it as well in the editor configuration |
It's no problem @james7342, thanks for digging into this 😃 It looks like this plugin was removed via DNN-Connect/CKEditorProvider#66. Based on timing, this was probably included in 8.01 or 8.0.2, so probably only sites that upgraded to 8.0.0 would have this old plugin. We'll need to see what can be done to adjust the configuration for this scenario. |
Can you go to Site Settings in the Persona Bar, select the Site Behavior tab, the More sub-tab, then click the Open HTML Editor Manager button. In the HTML Editor Manager, open the Editor Config tab on the right, and scroll down to the ExtraPlugins field, does that include |
That interface is an editor over the three |
You sure it's storing this data in the XML files? I'm trying to delete the settings and the file time stamps are not changing and the save doesn't really seem to do much. As I delete the values in the GUI and when I go back in there the values are back. |
I think the files are used as defaults, and the settings are overrides, but it's possible the files aren't used at all. I believe in your examples here |
I have found this problem in 4 sites I upgraded from 9.8.0 to 9.9.0. Copying over the old 4.5.3 plugins fixed the problem for now. BTW, once newsarticleslinks was copied over, the same issue occurred for iframedialog. Copying over iframedialog fixed that with no more issues. Question: Should I remove these two plugins through the Editor interface to avoid more problems with future DNN updates? |
Even in the ones that didn't require patching with old plugin files, the Icon Legend images are missing. I'll start a new issue for that. Icons Issue: #4537 |
Background info: when Mauricio Marquez created the FCK Editor provider for DNN 4, he used the files and HostSettings table (even for site, page and module specific settings). |
Icon images might depend on the Editor theme being used (specified in Editor basic settings. |
Both instances of 9.9.0 aren't displaying images where as 9.8.1 is. All 3 are using moono skin/theme |
I believe new installations have ExtraPlugins: set to dnnpages only. In your steps you seem to be removing both newsarticleslinks and dnnpages. Do we need dnnpages or can we safely remove it? |
@TopCat6 I gave up using the GUI as it never seem to make much of a difference or do anything other than save the value to the DB. Not sure if it actually has any impact. Step 3 I adjusted the xml config file and put "dnnpages" in it. Edit /portals/0/Dnn.CKEditorSettings.xml and update the existing value of extraPlugins: <Config ......extraPlugins="dnnpages"> |
@james7342 Ok, thanks. I'll give it a try. |
Found this also in https://github.com/dnnsoftware/Dnn.Platform/blob/develop/DNN%20Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Install/Dnn.CKEditorDefaultSettings.xml "extraPlugins="dnnpages,wordcount,notification" Not sure if wordcount and notification should be in there. wordcount still exists as valid plugin, but notification looks like it's been removed. Not sure how this file is used. |
I did it and it worked on all sites. However, one must remember to do all the portals on the site, and then for completeness, I recommend doing the one for the _default portal, too.
The file there will be called: Edit @james7342 BTW, I found that changing in the GUI worked and stuck as long as I hit the Save button at the bottom. :) |
@TopCat6 Good catch on the _default portal. The GUI worked for you? That's good, for me it would save, but as soon as I went back in there it had some values in it. Currently it has "dnnpages,wordcount,notification" in the GUI even though the DB shows it as being empty, all the XML files have been updated. So not sure where these values are coming from. |
Did another quick test. I cannot figure out where it’s coming from or how it’s doing this. If I save from the GUI I get all 3 non “Dnn” prefixed configuration files back. The CKEditorSettings.xml, CKToolbarButtons.xml and CKToolbarSets.xml. Not sure how or why but something is causing it to recreate these files. Which I didn’t think should happen. 🤷♂️ |
I did find this in a file. Dnn.Platform/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Objects/EditorConfig.cs Line 59 in ec762ba
Not sure how all this ties together. The editor is working which is good, just wished there was a clear understanding of how this all works. What should be default? dnnpages,wordcount,notifications? How are files getting created after their deleted? Does it use the values stored in the DB or does it use the files? If it uses the files then why write to the DB? And if it uses the DB why write the files? Can one reset and cleanup all the crud that’s seems to be left behind from the various changes and upgrades. What if the DNNCKeditor provider was uninstalled and reinstalled from the the upgrade/installation package? |
Sorry if it seems like I'm beating possible a dead horse here. I worked on this some more and was able to get it to stop writing the non "Dnn.CK" versions of the files. It must of been in the DB some place. I went into the HTML GUI editor and clicked the remove site settings button. Once I did this the CKEditorSettings.xml, CKToolbarButtons.xml and CKToolbarSets.xml were no longer being created. I looked in the DB for something that was specifying these files prior and couldn't find it, but could have over looked it. I then proceed to re-add my custom settings in the GUI and everything seems to be working correctly now. The DNN.CK* files in the portal folders are for default values only, I think. As a test I deleted /portal/0/Dnn.CKEditorSettings.xml. Went to the GUI/Editor Config and clicked save. Upon doing so it created the file plus updated the DB. So not sure of the complete logic here, but there is some connection. If they exist they're not updated with the save action is what I've found. Another observation after removing the site settings value from the GUI. Upon reloading the GUI, I had a default value of "dnnpages" in the box of extraPlugins text box. Which now matches what I have in the /portal/_default/Dnn.CKEditorDefaultSettings.xml and also in /portal/0/Dnn.CKEditorSettings.xml file. There has to be some sort of reading of the files for default values. Maybe it tries to read /portal/0/Dnn.CKEditorSettings.xml and if it doesn't exist reads /portal/_default/Dnn.CKEditorDefaultSettings.xml. Sort of explains my above comments why I didn't think the GUI saves were doing anything. I was completely removing the values in the extraPlugins box and trying to save. Which updated the DB correctly but never really reflected in the GUI. Possibly on GUI reload they were being read back in from a xml file. Maybe it's per settings value. Check DB, if value doesn't exist read from file, else value doesn't exist in either use hard coded values in code. ???? To wrap up this novel...... I think some cleanup needs to happen. In some DNN version the default value was "extraPlugins="dnnpages"". Possibly around the 2017 timeframe as I have a file in /portal/_defaults on my Dnndev.me site with the timestamp. Looking in the 9.9.0 packages the default has been changed to "extraPlugins="dnnpages,wordcount,notification"". At what version that change was made? I'm not sure. Cleanup:
Other observations/issues
|
@james7342 Thanks for all your sleuthing. Sites that I started recently (2019 = DNN 8?) have only extraPlugins="dnnpages". I've change all my other sites and their Portals to be the just that. Hopefully, any new update to CKE will work smoothly now. |
Can confirm that we had this same issue and solution in our site upgrade |
We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically. |
I think this is still an issue. |
We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically. |
@james7342, this issue thread is very long and talks a lot about very specific pre-existing conditions, can you summarize how a developer can get into this kind of situation from scratch please so we can make this issue more actionable. Thanks. |
@valadas, Understand there was a lot of chatter on this. I think the issue could be duplicated in the future if there is/was another update to CKEditor that didn't validate the bundled plugins included (ExtraPlugins) with the new version. In this instance the issues was due to the code, configuration that at some point in the past configured an extra plugin(s) as the default. When CKEditor was upgrade from 4.5 to 4.15 the plugin wasn't included in the new bundle which caused the issue. I would say from a development perspective though.
I think someone really needs to open the hood and take a hard look at all of it. I'm not sure there is really a clear understanding of the CKEditor implementation in DNN. What configuration is applicable, what isn't? What is required what isn't? How is the CKEditor getting configured? Is it configuration XML files, DB, Code? As noted in the thread I found varies settings in DB and other various files that may or not be duplicated. I tried to cover some of the specific's in the post linked below, but the whole thread also highlights some of the challenges I had to trying to clean things up. |
I know I don't use extra plugins and I am assuming an upgrade does not remove existing ones as far as I know. I'll move this into a discussion until we can get a clear story that a developer can pick up to implement a fix. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description of bug
Upgraded my test site yesterday from 9.8.1 to 9.9.0. In testing I"m not able to CKEditor appear when trying to edit HTML module. Tried clearing browser cache. Tried on Mac OS Safari, Firefox, Chrome & Windows Edge and Linux Firefox and Chrome. Same issue across various OS and browsers. Note this site as has been upgrade over the years. I think it originated back in the 6.X days
Steps to reproduce
Try to edit HTML module
Current behavior
Editor is not loading.
Expected behavior
Editor loads to edit module
Screenshots
Error information
Affected version
Affected browser
The text was updated successfully, but these errors were encountered: