Error with uploader Solved

User's avatar
Danny P.
12:45 Oct 13, 2014
Hi, I have gone through everything in your site to try to find the problem but I am officially giving up and now I turn to you.
I have purchased the CKEditor Big Add-ons Pack and have installed the following add ons
-- doksoft_font_awesome (all good but no creating bitmaps)
-- doksoft_image (uploader & drag/drop not working)
-- doksoft_file (uploader & drag/drop not working)
-- doksoft_gallery (uploader & drag/drop not working)
-- doksoft_button (all good)
-- doksoft_youtube (error on search)
-- doksoft_maps (all good)
-- doksoft_table (all good)
-- doksoft_html (all good)
-- doksoft_alert (all good)

I have CKEditor running on a Zencart 1.5 site and the normal editor seem to be running fine.

I installed this zencart plugin www.zen-cart.com/downloads.php?do=file&id=1098 which is basically the editor in a editors folder in zencart and I updated it with the latest CKEditor (I was also having the same problem with the original CKEditor Plugin for Zen Cart).

It was only possible to upload on file to this forum so I upload all screen shots to Dropbox (see below)
https://www.dropbox.com/sh/ytil4ebl91d1vyg/AAB-1i7qxNbYvTtcgEQhOaRPa?dl=0

Here you can see my configuration files for CKEditor & the Uploader (I have tried web urls and base urls)

There are 3 error messages all pointing to the same thing, these error messages are for
-- doksoft_image
-- doksoft_file
-- doksoft_gallery

Also you can see what is happening when the popups are ahown (there is no uploader)

Then the last screen shot is from the Youtube plugin.

Please let me know if you require anything else to help me solve this problem.
Support team avatar
JS+
16:04 Oct 13, 2014
Hello,

1. YouTube plugin: you need to get YouTube API key and specify it for DOKSoft YouTube plugin. YouTube denies requests from clients without API key.
See this page to know how to specify it in 'config.js': doksoft.com/soft/ckeditor-youtube/index.html

2. You toolbar configuration seems to be incorrect. Seems that 'config.js' not affects to CKEditor. As I guess you have configured toolbar somewhere in Zencard. The same way uses Drupal, its ok, but you need to check Zencart's documentation to check where should you to place YouTube's configuration. This problem may affect and to Font Awesome's path to bitmap generator, and to uploader's URL too.

3. Problems with image/file upload plugins. It seems that there is some problem with loading plugins' files from the server. Maybe Zencart has some special URL mapping mechanism, sorry I do not familar with this CMS. But I can try to debug this behaviour: could you send me to support@ e-mail with credentials to access your CKEditor? I will check it. If this is unable to do by security reasons, you need stard debugging from seing Network tab of Chrome's debugger to see are there any error responses there.
User's avatar
Danny P.
23:47 Oct 13, 2014
Thanks, I got the Youtube plugin working no worries.

I have sent you an email on support@ (your domain) with access details.

As far as the 'Zencart plugin for CKEditor' it consists of the core files in the 'ckeditor' dir and a language file with one line and a ckeditor.php file sits in the zencart admin to load the editor, the code for that php file is as follows.
<?php
/**
 * @package admin
 * @copyright Copyright 2009-2014 Zen Cart Development Team
 * @copyright Portions Copyright 2010 Kuroi Web Design
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Original: ckeditor.php 277 2010-05-22 14:09:32Z kuroi $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}

$var = zen_get_languages();
$jsLanguageLookupArray = "var lang = new Array;\n";
foreach ($var as $key)
{
  $jsLanguageLookupArray .= "  lang[" . $key['id'] . "] = '" . $key['code'] . "';\n";
}
?>
<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">if (typeof jQuery == 'undefined') google.load("jquery", "1");</script>
<script type="text/javascript" src="../<?php echo DIR_WS_EDITORS ?>ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
$(document).ready(function() {
  <?php echo $jsLanguageLookupArray ?>
  $('textarea').each(function()	{
    if ($(this).attr('class') == 'editorHook' || ($(this).attr('name') != 'message' && $(this).attr('class') != 'noEditor'))
    {
      index = $(this).attr('name').match(/\d+/);
      if (index == null) index = <?php echo $_SESSION['languages_id'] ?>;
      CKEDITOR.replace($(this).attr('name'),
        {
          coreStyles_underline : { element : 'u' },
          width : 760,
          language: lang[index]
        });
    }
  });
});
//--></script>
Support team avatar
JS+
12:58 Oct 15, 2014
Hello,

I have checked you website. Now Image/File/Gallery plugins works fine. Here is the list what I have done:

1. There really was a problem in file upload plugins appears only on your configuration. I have fixed this and updated installed plugins on your website (I will send update archive on your e-mail in 1 hour too).
If you are interested in technical details: Zencart uses brackets for CKEditor field's ID; this causes a error that plugins were not able to use this ID in a couple of places as internal identifier or use JQuery expression without escaping this ID. We need to use it to support multiple CKEditor instances on the page.

2. You were wrong with doksoft_uploader_url. This might be URL, not path. I have changed your:
/home/.../editors/ckeditor/plugins/doksoft_uploader/uploader.php
to
/editors/ckeditor/plugins/doksoft_uploader/uploader.php
...and successfully uploaded first file to your webserver (no article's changes were saved)
User's avatar
Danny P.
01:42 Oct 16, 2014
Thank you, I am extremly grateful for your support with this and for looking into the problem so promptly. My client will be happy he can now easily add images etc to his product descriptions.

One thing I have realised is that there is no way to browse the folder on the server where the files are uploaded to, so if I wanted to simply insert an image already on the server how do I do that.
Support team avatar
JS+
10:11 Oct 16, 2014
Hello, currently the plugins does not support browsing the server. The plugins let you only to insert images but allow do it with ease in opposite to powerful but sometimes not comfortable CKFinder.
If you need to replace image with another one you of course can integrate with standard 'Image' dialog in the CKEditor. Set this variable:
config.filebrowserImageUploadUrl = '/url/to/your/uploader.php?type=Images';

Some later we will write manual for integrating with it (but the most you need to know about it is just this config line).
User's avatar
Danny P.
11:31 Oct 16, 2014
Thanks for the reply, I will hang out for the day you make a 'Browse Server Images' plugin. I will be first inline to buy it.