GetSimple Support Forum
3.3.0 and custom Editor Toolbar - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Installation & Setup (http://get-simple.info/forums/forumdisplay.php?fid=5)
+--- Thread: 3.3.0 and custom Editor Toolbar (/showthread.php?tid=5584)



3.3.0 and custom Editor Toolbar - Timbow - 2014-01-31

Still upgrading sites. I have only one site with a problem in that after upgrade the CKEditor didn't start, so page editor panel just showed source code. Downgraded the live site without a problem and testing locally it seems that my gsconfig is causing the failure. I presume it is the custom toolbar. Would that follow? My gsconfig has
Code:
# WYSIWYG toolbars (advanced, basic or [custom config])
define('GSEDITORTOOL',"['Paste','PasteFromWord','Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList','JustifyLeft','JustifyCenter','JustifyRight',
'JustifyBlock', 'TextColor', 'BGColor', 'Link', 'Image', 'HorizontalRule', 'RemoveFormat'],
'/',
['Format', 'Source']
");

although that isn't the only place I edited.


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

Its not that, do you have a editoroptions set

Or any less popular editing plugins that we might have missed testing that has cke inputs?

Also are you using a special branch ?


RE: 3.3.0 and custom Editor Toolbar - Timbow - 2014-02-01

Let me test a bit more.

If I comment out the WYSIWYG Toolbars section then the editor works as normal, so maybe it is that.

This is ordinary 3.3.0, I did overwrite again in case I had confused it with the patch_cke_4.3.2 thing.

Plugins are Abs Link Fixer, Child Menu, Cust Title, i18nGallery, Imagizer, Multi User. I am using a editor.css. This is the entire gsconfig
PHP Code:
<?php
/**
 * GSConfig
 *
 * Edited by TRW for JanetP's Site    
 *
 * @package GetSimple
 */

/** Prevent direct access */
if (basename($_SERVER['PHP_SELF']) == 'gsconfig.php') { 
    die(
'You cannot load this page directly.');
}; 

/*****************************************************************************/
/** Below are constants that you can use to customize how GetSimple operates */ 

# Extra salt to secure your password with. Default is empty for backwards compatibility.
#define('GSLOGINSALT', 'your_unique_phrase');

# Turn off auto-generation of SALT and use a custom value. Used for cookies & upload security.
#define('GSUSECUSTOMSALT', 'your_new_salt_value_here');

# Default thumbnail width of uploaded image
define('GSIMAGEWIDTH''120');

# Change the administrative panel folder name
#define('GSADMIN', 'admin');

# Turn on debug mode
#define('GSDEBUG', TRUE);

# Ping search engines upon sitemap generation?
define('GSDONOTPING'1);

# Turn off CSRF protection. Uncomment this if you keep receiving the error message "CSRF error detected..."
#define('GSNOCSRF', TRUE);

# Set override CHMOD mode
define('GSCHMOD'0755);

# Enable Canonical Redirects?
#define('GSCANONICAL', 1);

# Use Uploadify to upload files?
#define('GSNOUPLOADIFY', 1);

# WYSIWYG editor height (default 500)
#define('GSEDITORHEIGHT', '400');

# WYSIWYG toolbars (advanced, basic or [custom config]) 
define('GSEDITORTOOL',"['Paste','PasteFromWord','Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList','JustifyLeft','JustifyCenter','JustifyRight',
'JustifyBlock', 'TextColor', 'BGColor', 'Link', 'Image', 'HorizontalRule', 'RemoveFormat'],
'/',
['Format', 'Source']
"
);

# WYSIWYG editor language (default en)
#define('GSEDITORLANG', 'en');

# WYSIWYG Editor Options
#define('GSEDITOROPTIONS', '');

# Set email from address
#define('GSFROMEMAIL', 'noreply@get-simple.info');

# Autosave within edit.php. Value is the autosave interval in seconds
#define('GSAUTOSAVE', 900);

# Enable the External API to be shown on settings page 
#define('GSEXTAPI', 1);
    
# Set PHP locale
# http://php.net/manual/en/function.setlocale.php
#setlocale(LC_ALL, 'en_US');

# Define default timezone of server, accepts php timezone string
# valid timeszones can be found here http://www.php.net/manual/en/timezones.php
# define('GSTIMEZONE', 'America/Chicago');

# Disable loading of external CDN versions of scripts (jQuery/jQueryUI)
#define("GSNOCDN",true);

# Disable Codemirror theme editor
#define("GSNOHIGHLIGHT",true);

# Forces suppression of php errors when GSDEBUG is false, despite php ini settings
 
define('SUPPRESSERRORS',true);

# Disable check for Apache web server, default false
#define('GSNOAPACHECHECK', true);

# Disable header version check
define('GSNOVERCHECK'true);

# Enable alternate admin styles, current style constants are
# note: stylesheets are cached
# GSSTYLEWIDE = wide fluid
# define('GSSTYLE',GSSTYLEWIDE);

# Disable Sitemap generation and menu items
# define('GSNOSITEMAP',true);

# Enable auto meta descriptions from content excerpts when empty
# define('GSAUTOMETAD',true);

?>



RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

No I mean , It is something else interacting with it, cause it works fine on my install, I tested your toolbar.


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

Did you clear your browser cache ?


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

Your javacript console will have an error.


RE: 3.3.0 and custom Editor Toolbar - Timbow - 2014-02-01

(2014-02-01, 01:12:45)shawn_a Wrote: Your javacript console will have an error.

Javascript and consoles is unfamiliar territory. In opera development tools I get a console showing 3 warnings and 1 error
Quote:Uncaught SyntaxError: Unexpected token , edit.php?id=order:257



RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

one of your plugins is manipulating the ck globals.

if you click that error it should show you the code
or show source and find

CKEDITOR.replace

copy the entire js block

Any idea which plugin has a ckeditor instance in it ?


RE: 3.3.0 and custom Editor Toolbar - Timbow - 2014-02-01

Shawn I will have to come back to this. I only have until midnight to submit my tax stuff or i get a £100 late fine. Every year the same - urgh!


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

lol, sure thing, If you want let me on and I will take a look and get you a fix.
It is possible that the comma fix from 3.2.2 was reverted or missing, so i have suspects.


RE: 3.3.0 and custom Editor Toolbar - Timbow - 2014-02-01

(2014-02-01, 03:55:05)shawn_a Wrote: lol, sure thing, If you want let me on and I will take a look and get you a fix.
It is possible that the comma fix from 3.2.2 was reverted or missing, so i have suspects.

Code:
<script type="text/javascript">
            
            var editor = CKEDITOR.replace( 'post-content', {
                    skin : 'getsimple',
                    forcePasteAsPlainText : true,
                    language : 'en',
                    defaultLanguage : 'en',
                                            contentsCss: 'http://localhost/JPW/theme/Weaving/editor.css',
                                        entities : false,
                    uiColor : '#FFFFFF',
                    height: '300px',
                    baseHref : ' http://localhost/JPW/',
                    tabSpaces:10,
                    filebrowserBrowseUrl : 'filebrowser.php?type=all',
                    filebrowserImageBrowseUrl : 'filebrowser.php?type=images',
                    filebrowserWindowWidth : '730',
                    filebrowserWindowHeight : '500'
                    ,toolbar: ['Paste','PasteFromWord','Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList','JustifyLeft','JustifyCenter','JustifyRight',
'JustifyBlock', 'TextColor', 'BGColor', 'Link', 'Image', 'HorizontalRule', 'RemoveFormat'],
'/',['Format', 'Source']                    ,                    
            });
            CKEDITOR.instances["post-content"].on("instanceReady", InstanceReadyEvent);
                function InstanceReadyEvent() {
                    this.document.on("keyup", function () {
                            $('#editform #post-content').trigger('change');
                  });
                }

            </script>

when I click the error link, I get this:
Code:
<script>
            /* Warning for unsaved Data */
            var yourText = null;
            var warnme = false;
            var pageisdirty = false;
            
            $('#cancel-updates').hide();
    
            window.onbeforeunload = function () {
                if (warnme || pageisdirty == true) {
                    return "You are about to leave this page and will lose any unsaved information.";
                }
            }
            
            $('#editform').submit(function(){
                warnme = false;
                return checkTitle();
            });

            checkTitle = function(){
                if($.trim($("#post-title").val()).length == 0){
                    alert("You cannot save a page with an empty title");
                    return false;
                }                    
            }

            jQuery(document).ready(function() {

                                $('#editform').bind('change keypress paste focus textInput input',function(){                    
                            warnme = true;
                            pageisdirty = false;
                            autoSaveInd();
                    });
                                        
                    function autoSaveInd(){
                            $('#pagechangednotify').show();                
                            $('#pagechangednotify').text("Page has unsaved changes");  
                            $('input[type=submit]').css('border-color','#CC0000');              
                            $('#cancel-updates').show();                        
                    }
            });
        </script>
except with 295 empty lines before it. I don't know what plugin would use the editor.


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

What browser are you on ?


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

I gotta figure out where that comma is coming from
That means there is an empty edtools somewhere, and i am probably not checking for empty only isset

Code:
'/',['Format', 'Source']                    ,                    
            });

My install does not do that.
Some browsers choke on that, I am guessing that is what the issue is.


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

Which of those plugins are made by mikeh ?


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

nevermind, it is multiuser plugin
I had gsblog installed and it fixed the issue, now I can reproduce and fix it.


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

odd i am using google chrome and the source comes up empty as well.
must be a bug, its all empty space.


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-01

just checked fix in to hotfixes branch

https://github.com/GetSimpleCMS/GetSimpleCMS/commit/6b3e5d96ddba9156c77c5ebb9ed7fc0bb9333b62

mikeh has code executing on all pages that should only be on his pages that use his ckeditor instance.
and it modifies some globals


RE: 3.3.0 and custom Editor Toolbar - Timbow - 2014-02-03

Same issue here?
http://get-simple.info/forums/showthread.php?tid=5164


RE: 3.3.0 and custom Editor Toolbar - shawn_a - 2014-02-03

Shrug, sounds different.