issues in loading ckeditor in xataface 2

A place for users and developers of the Xataface to discuss and receive support.

issues in loading ckeditor in xataface 2

Postby xeonfx » Wed Nov 07, 2012 1:57 pm

Hi All,

I am new to xataface, and i am amazed by the power of xataface, great work by Steve and team!!.

I am trying to create a administration system for my college and I am stuck at loading ckeditor in xataface 2.

I can see the ckeditor class and code in when i check the source of the page, but the editor never loads. I think I might be missing certain configuration or something might not be turned on, on my server.

Below is my setup, please advice on the missing piece.
1. WampServer Version 2.1 with Apache 2.2.17, PHP 5.3.4 and MYSQL 5.1.53
2. xataface 2 and ckeditor 0.3 (latest trunk from the svn)
3. I have placed the ckeditor folder under modules folder and updated my conf.ini file with
Code: Select all
modules_ckeditor=modules/ckeditor/ckeditor.php
4. below is my index file
Code: Select all
<?php
require_once 'xataface/dataface-public-api.php';
df_init(__FILE__, 'xataface')->display();
?>
5. below is the content of my fields.ini file for the table
Code: Select all
[txt]
widget:label = "Question"
widget:type=ckeditor
6. datatype of txt file is text
7. below is the extract from the source of the page
Code: Select all
<textarea class="xf-ckeditor" data-xf-ckeditor-base-path="/df_funde/xataface/modules/ckeditor/lib/ckeditor/" data-xf-ckeditor-config="[]" name="txt" data-xf-field="txt"></textarea>


Any tips on debugging this issue would be much appreciated.
Thanks in advance for help!
Regards,
XeonnFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby shannah » Wed Nov 07, 2012 2:15 pm

Your setup should work.. Although, I haven't tried it in the xataface modules directory in a while. Try creating a modules directory in your application folder, and move the ckeditor module in there, and see if that makes a difference.

Also check your PHP/Apache error log to see if it offers any clues.

_Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: issues in loading ckeditor in xataface 2

Postby xeonfx » Wed Nov 07, 2012 3:09 pm

Steve,
Thanks for quick reply.

I moved the modules folder under the application folder also disabled all other modules. I can see txt field as textarea but is not loaded as ckeditor. Tried in firefox, IE and chrome. Changed the field name, field type in database as well. But no luck.

I don't see any error message in apache/php logs :(

Any tips on debugging, is there any php/apache extension to be enabled?

Regards,
XeonFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby shannah » Wed Nov 07, 2012 3:30 pm

OK. Thanks,

I updated CKeditor to the latest recently, and forgot that it has some problems with the JavascriptTool's minification step if I don't make some modifications.

You can fix this issue by:

1. Turning on Debug mode for the JavascriptTool (not recommended on production as this kills performance).
or
2. Updating to the latest ckeditor module in SVN (http://weblite.ca/svn/dataface/modules/ckeditor/trunk
or
3. Copying the file http://weblite.ca/svn/dataface/modules/ ... keditor.js over your existing ckeditor/js/ckeditor.js file.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: issues in loading ckeditor in xataface 2

Postby xeonfx » Wed Nov 07, 2012 8:59 pm

Steve,

Copying the recent code didn't help, I will try to turn on the debug mode as directed by you. Thanks for help.

Regards,
XeonFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby xeonfx » Wed Nov 07, 2012 9:50 pm

Steve,

I uncommented line number 81 in widget.php under modules/ckeditor folder, and ckeditor loads now.
Code: Select all
$jt->import('ckeditor.js');


Please advice if this is the right solution or the line should be commented out.

Regards,
XeonFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby shannah » Thu Nov 08, 2012 8:54 am

I'm surprised that works. The changed file should work though.. It is possible that it was using the cached version. Try clearing out the contents of your templates_c directory (this is where compiled javascripts are cached), and then clear our the browser cache, then try reloading. It should work.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: issues in loading ckeditor in xataface 2

Postby auphi » Fri Nov 09, 2012 1:44 pm

I was having a similar problem as xeonfx, only difference in setup being that I am using xampp server. It hasn't been a big deal for me (yet), but this thread prompted me to go ahead and play around with it a bit.

I was specifying ckeditor as the widget type, but was just seeing a regular textarea box for the field. I went ahead and updated to the lasted copy out of svn as mentioned, and this caused the widget to just disappear (blank space). Cleared out my templates_c directory and cache, nothing different. Checked my apache logs and found:

Code: Select all
[Fri Nov 09 15:11:49 2012] [error] [client 127.0.0.1] File does not exist: C:/Work/xampp/htdocs/xataface/modules/ckeditor

This is notable as it is not the directory I have been keeping xataface in. I've been using C:/Work/xampp/htdocs/[project_name]/xataface/, which hasn't been a problem until now. I initially started with xataface in the htdocs directory, but moved it months ago, and I haven't noticed anything else being broken.

As a test, I copied my xataface directory to the htdocs directory, and now it's working. I haven't dug into module's code yet, but maybe that will be a clue.

I notice that xeonfx also has

Code: Select all
require_once "xataface/dataface-public-api.php";

in his index.php file, instead of ../ or the full path... so I'm assuming that maybe it's a similar situation. Although, uncommenting line 81 in widget.php didn't work for me.
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm

Re: issues in loading ckeditor in xataface 2

Postby shannah » Fri Nov 09, 2012 2:04 pm

What do you have as the 2nd parameter for your df_init() call in your index.php file?
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: issues in loading ckeditor in xataface 2

Postby auphi » Fri Nov 09, 2012 2:10 pm

My index file looks like

Code: Select all
require_once "xataface/dataface-public-api.php";
df_init(__FILE__, "/xataface");
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm

Re: issues in loading ckeditor in xataface 2

Postby auphi » Fri Nov 09, 2012 2:15 pm

just changed it to

Code: Select all
df_init(__FILE__, "xataface");


and now it's working normally.
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm

Re: issues in loading ckeditor in xataface 2

Postby xeonfx » Fri Nov 09, 2012 2:17 pm

Steve, you rock!

My bad i should have cleared the browsing history and tried. Clearing the browser cache worked.

Regards,
XeonFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby xeonfx » Sat Nov 10, 2012 5:52 am

Hi Steve,

Facing similar issue now in HTML reports modules. ckeditor loads fine everywhere else, but fails to load in HTML reports page.
Below is the error message I get when HTML reports page
Code: Select all
Could not find script ckeditor.js
( ! ) Fatal error: Uncaught exception 'Exception' with message 'Server-side Javascript directive failed in script "xataface/modules/htmlreports/reports_form.js"' in C:\wamp\www\xataface\Dataface\JavascriptTool.php on line 565
( ! ) Exception: Server-side Javascript directive failed in script "xataface/modules/htmlreports/reports_form.js" in C:\wamp\www\xataface\Dataface\JavascriptTool.php on line 565


Any clue?

Regards,
XeonFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby xeonfx » Sat Nov 10, 2012 6:01 am

When I switch off g2 module the ckeditor loads perfectly in html report page. but it fails to load when g2 module is loaded. I cleared the cache multiple times, but that didn't help.

Regards,
XeonFX
xeonfx
 
Posts: 7
Joined: Wed Nov 07, 2012 1:32 pm

Re: issues in loading ckeditor in xataface 2

Postby shannah » Sat Nov 10, 2012 1:45 pm

Try changing the order in which the ckeditor and htmlreports and g2 modules are included in the conf.ini file. I'm not sure if this makes a difference, but it might. It should work with g2. I have a couple apps running with this configuration.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Next

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved