issues in loading ckeditor in xataface 2
Archived from the Xataface Users forum.
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.
- WampServer Version 2.1 with Apache 2.2.17, PHP 5.3.4 and MYSQL 5.1.53
- xataface 2 and ckeditor 0.3 (latest trunk from the svn)
- 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
- below is my index file
- Code: Select all
<?php require_once 'xataface/dataface-public-api.php'; df_init(__FILE__, 'xataface')->display(); ?>
- below is the content of my fields.ini file for the table
- Code: Select all
[txt] widget:label = "Question" widget:type=ckeditor
- datatype of txt file is text
- 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
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
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
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:
- Turning on Debug mode for the JavascriptTool (not recommended on production as this kills performance).
or - Updating to the latest ckeditor module in SVN (http://weblite.ca/svn/dataface/modules/ckeditor/trunk
or - Copying the file http://weblite.ca/svn/dataface/modules/ … keditor.js over your existing ckeditor/js/ckeditor.js file.
-Steve
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 — 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
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.
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.
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?
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 — Fri Nov 09, 2012 2:15 pm
just changed it to
- Code: Select all
df_init(__FILE__, "xataface");
and now it’s working normally.
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 — 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 — 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
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.
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.
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 — 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 — 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
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.
lemon dexter — Mon Nov 12, 2012 3:55 pm
Thanks guys!
This did it for me. I’d never got HTML reports running using v2, despite following all of Steve’s instruction and suggestions - until now.
Ckeditor has been a bit flaky - working for some installations but not others, despite seemingly identical installations, but once I got ckeditor working, inspired by the last post, htmlreports only started working when I put g2 last in the module list - which I’d never have thought of!
All now working - except the schema browser widget at the moment won’t work with g2. So I can create and edit with g2 disabled, and run live with g2. Good enough for now, at least to play around!
Thanks again.
shannah — Tue Nov 13, 2012 9:27 am
Can you elaborate on “the schema browser won’t work”? Does the button appear at all? Do you get a PHP or Javascript error?
shannah — Tue Nov 13, 2012 9:45 am
I have added this to the issue tracker.
http://bugs.weblite.ca/view.php?id=1175
lemon dexter — Tue Nov 13, 2012 3:48 pm
With g2 loaded, the insert field button in the ckeditor toolbar is there, but nothing happens except some js errors in console:
On entering edit:
One Info/Warning: Use of attributes’ specified attribute is deprecated. It always returns true. This shows an extract:
…H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(va…
and refers to: http://xxxxxxx/xataface/modules/g2/js/j … 3.2.min.js (line 12)
TypeError: $.vakata.context.cnt.delegate is not a function. This shows an extract: …#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { backgr…
and refers to: http://xxxxxx/index.php?-action=js&–id … bd4043bc97 (line 543)
And on pressing the Insert Field button:
TypeError: $(el).children().detach is not a function. This shows an extract: …(el).children().detach();$.each(this.getComponent().getChildComponents(),functio…
and refers to: http://xxxxxx/index.php?-action=js&–id … bd4043bc97 (line 650)
The first (info) warning occurs with g2 disabled. But that’s about it - all else works fine.
Hope this helps!
lemon dexter — Wed Nov 14, 2012 3:20 am
OK, I think I found the problem (and probably need to apologise!).
I’ve got a dashboard which uses a jquery accordian menu, which requires pulling in some extra javascript. Looks like this was screwing things up and I’m delighted to say everything seems to be working if it’s disabled. I would however be grateful for any tips for getting the javascript to happily co-exist - I’ve got lots of tables which need grouping and are difficult to navigate using the tabs. The menu requires:
jquery-1.3.2.min.js
jquery-ui-1.7.2.min.js
Many thanks again for all your help.
shannah — Wed Nov 14, 2012 10:04 am
With the g2 module, Xataface includes its own copies of jquery as part of the default template. You are likely overriding these newer versions with your older version. You should be able to just remove your
shannah — Wed Nov 14, 2012 10:04 am
With the g2 module, Xataface includes its own copies of jquery as part of the default template. You are likely overriding these newer versions with your older version. You should be able to just remove your