CKEditor Bug / Help Needed

Found a bug? Tell us!!
Post Reply
Jade
Regular
Posts: 10
Joined: Wed Jun 05, 2013 7:26 pm
Location: Las Vegas
Contact:

CKEditor Bug / Help Needed

Post by Jade »

I installed the plugin CKEditor but it does not sit happily with sidebar plugin HTML Nugget. Existing nuggets work but when you edit them shows no code. New nuggets take code display nothing, it is like coding with a blindfold.

I tried to remove CKEditor plugin using the configure plugins screen. After removal the new and edit entry screen ends up messed up where the buttons were removed.

I tried this before and after the recent upgrade to 1.7.2 no difference

At present I have reinstalled CKEditor so I can maintain the esiting entries. Should I just start again with a fresh install or is there a way to remove CKEditor.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: CKEditor Bug / Help Needed

Post by Timbalu »

Jade wrote:I installed the plugin CKEditor but it does not sit happily with sidebar plugin HTML Nugget. Existing nuggets work but when you edit them shows no code. New nuggets take code display nothing, it is like coding with a blindfold.
This is the Serendipity 1.7 Series and backend only.
- We are talking about the serendipity_html_nugget_plugin v. 1.0?
- This Plugin is sitting in the upper (Sidebar) Plugin part of Plugins Management Console?
- On click to the config header link in there, it opens that plugins config page, which holds a textarea where the CKEDITOR should hook in?
- And you say it does not do this, or looks strange, right?

Mine does work and sits totally right without any problems! And I tested that some weeks ago...
And I even gave that a try now to have multiple nuggets... no problem.
Jade wrote:I tried to remove CKEditor plugin using the configure plugins screen. After removal the new and edit entry screen ends up messed up where the buttons were removed.
You may need to force full page reloads by [Ctrl] - [R] or [Ctrl] - [F5] or all 3 of them, to get rid of stricky css that maybe did not get updated ... This is the first thing to do, if something starts to look strange and this can happen in wide spread situations everywhere... and may also be the issue of the first too.

We will solve your problem easily, but I really need to understand the problem in detail first...
Jade wrote:Should I just start again with a fresh install or is there a way to remove CKEditor.
Removing a Plugin is easy. Just purge it from your plugin list. Then the Serendipity System will not talk with it anymore. Some Plugins have added CSS or Javascript to the backend, that are cached by your browser. That is why you will need to force upper mentioned hard reloads in your browser to get this into the right new order.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Jade
Regular
Posts: 10
Joined: Wed Jun 05, 2013 7:26 pm
Location: Las Vegas
Contact:

Re: CKEditor Bug / Help Needed

Post by Jade »

Rebooted, cleared browser and reloaded form.

IE: Fails for both HTML Nugget and Edit existing entries
Firefox: Works for exiting entries, however HTML Nugget code still disappears after 3 seconds.

Maybe its one of the other plugins I tried installing. It seems to happen after loading the edit bar (see image) when the html nugget is displayed there is no edit bar. After 3 seconds when bar appears test is removed. Scroll image to see 3 examples
Html Nugget Behaviour
Html Nugget Behaviour
html_nugget.jpg (237.42 KiB) Viewed 6255 times
Below is a list of installed plugins
Sidebar Plugins
[C] Categories
Shows the list of categories.
version: 2.03
[C] Recent Entries
Shows the titles and dates of the most recent entries
version: 2.4
[C] We Recommend
Holds a nugget of HTML in your sidebar
version: 1.0
[C] Advertisement
Holds a nugget of HTML in your sidebar
version: 1.0
Total: 4 plugins.

Event Plugins
[C] Markup: Serendipity
Apply basic serendipity markup to entry text
version: 1.3
[C] Markup: Emoticate
Convert standard emoticons into graphic images
version: 1.6
[C] Markup: NL2BR
Convert newlines to BR tags
version: 2.16
[C] Spam Protector
A variety of methods to prevent comment spam
version: 1.80
[C] Spartacus
[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/nification [S]ystem - Allows you to download plugins from our online repository
version: 2.30
[C] HTML META-Tags
Sets HTML meta keywords/description tags and title element for single entry pages and default meta keywords/description tags for non-single entry pages.
version: 0.15
[C] Sample!
Allows you to insert HTML-Code into the HEAD-area of your blog. You can use this for meta-tags or JavaScript inclusion.
version: 1.3
[C] Show links to services like Facebook, Digg, Technorati, del.icio.us, spread.ly etc related to your entry.
You can remove/insert other custom services to link to via the "plugin_findmore.tpl" template file easily. Also remember that if you want to save grandma's performance pennies that you can also insert the HTML/JS snippets into your entries.tpl template file instead of using this plugin!
version: 1.22
[C] Extended Editor Buttons: Youtube etc.
Offers more buttons to the editing screen to implement easy access to HTML/JS snippets like Youtube etc.
version: 1.3
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: CKEditor Bug / Help Needed

Post by Timbalu »

I see, I definitely misread your issues! :D

As I can see on that screenshot, you are trying to add a google javascript code into the editor.
This will not work! This is, while all these new CKEDITOR versions have a filter running, called ACF.
(*) What Impact Does ACF Have on Plugins?

Advanced Content Filter (ACF) is a set of rules that determine which editor features will be available to the user. It limits and adapts input data so it matches the editor configuration in the best possible way. It may also deactivate features which generate HTML code that is not allowed by the configuration.

How does it affect plugins? If your plugin generates content, you will need to update it so that it would extend the default CKEditor filters and make the editor accept this content.
So something like plain media iframes (youtube videos), or code like the one you are trying to insert, will never be allowed. For people not caring about this security feature by CKEDITOR, I added an option to the plugins config, to turn that off. Now every code, or iframe, or changed classname, etc will be executed, saved and reloaded, like you have inserted it. Having ACF On (default), CKEDITOR does not show forbidden markup again after you saved and reloaded that editor page.

The new version 1.3 coming out this week, see http://board.s9y.org/viewtopic.php?f=4& ... #p10436140, will take care of the video iframe things, without the need to turn off ACF.

If you think sharing code parts (which in my means, is something other than your example) to the editor is a need to be build-in by an included CKEDITOR-plugin, please share your thoughts in that other thread, so we all can discuss that.

This was point 1.

Point 2 is about inserting javascript execution code to this sort of nugget plugin. It will certainly scramble and interfere badly with the CKEDITOR Lib javascript and is generally a bad idea to this in here too. If you would like to have a pageads or analytic script added to your template, there are certain other ways to do this right with Serendipity.

Search the event plugin list for something like that, or learn to do it manually and write it to your index.tpl file. An example to put in an analytic script is here: board.s9y.org/viewtopic.php?f=5&t=19407&p=10435835#p10435835 - the other would be the Google Adsense plugin for example.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: CKEditor Bug / Help Needed

Post by Timbalu »

HUH! :shock: Analyzing your scrambled screenshot a little bit further, it also tells us, that (at least in the last picture, but also not being showed in your plugin list), that you do not have the CKEDITOR Plugin installed yet. The one shown at last, is the core delivered Xinha Editor. I personally do not support this any more, since I build the much better CKEDITOR plugin. But I can say, this will also not work, inserting javascript pageads code right into the textarea, without taking a code button or something Xinha has to take care of code parts. Also it will be the same for the nugget area not being the right place for execution javascripts.

The Plugin "Extended Editor Buttons" might be an interfering issue as well, hide it and save the plugin list to disable it temporary.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: CKEditor Bug / Help Needed

Post by onli »

If you disable the wysiwyg-option in the personal configuration, you should get no editor but a plain textfield, but which should work just fine (at least for inserting code). It seems like xinha is failing to load, the fallback-wysiwyg-editor. Did you count on using that one?
Jade
Regular
Posts: 10
Joined: Wed Jun 05, 2013 7:26 pm
Location: Las Vegas
Contact:

Re: CKEditor Bug / Help Needed

Post by Jade »

Thank you for your help.

Yes the screen shots are after uninstalling CKEditor again.

Disabling wysiwyg in personal configuration worked to remove the screen glitch.

----------------

Changing the ACF option in CK Editor may produce the results I require while keeping the functionality.

I assume there is no security vulnerability in CKEditor if I turn ACF off if its only used in create entries? (assuming only authorized users have access) or does the same function protect reader submitted comments?

----------------

Will look at the other options for adding java and goole ads the google plugin just didn't have the options I use. Will find a way to make do.

Thanks again for all the information
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: CKEditor Bug / Help Needed

Post by Timbalu »

Jade wrote:Changing the ACF option in CK Editor may produce the results I require while keeping the functionality.
Sure, that should or could do. Try it and please give feedback, if there were glitches with that too.
In a future plugin version, customizing CKEDITOR and ACF, I (maybe) will add another config option to set a conditional tags array, allowing to set individual Allowed Content Rules and possible Content Transformations.
Jade wrote:I assume there is no security vulnerability in CKEditor if I turn ACF off if its only used in create entries? (assuming only authorized users have access) or does the same function protect reader submitted comments?
Well, I named that a "security feature", but in detail it is something else .... It's more some sort of "Strong Customizable Housekeeper, interacting tags", which also takes care about "bugs" and "dirties"... :wink:
http://ckeditor.com/blog/CKEditor-4.1-Released
http://docs.ckeditor.com/?_escaped_frag ... ent_filter
http://ckeditor.com/blog/CKEditor-4.1-RC-Released (slightly different in the ACF description)

Submitting comments in the Userspace (Frontend) has nothing to do with which editor you are using in the backend... - normally! I talked about security, since Xinha once had an open door in one/some of its plugins (long) years ago, which was also accessible in the frontend - knowing the right path - and allowed to hack the whole site.

And, btw, I would still recommend to add ads and stuff like that - manually edited - to your index.tpl or sidebar.tpl. This is much less Overhead and is always better to handle, in my eyes.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply