CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 CCS 5.1 broke CKEditor (Resolved)

Print topic Send  topic

Author Message
pbarkley

Posts: 37
Posted: 09/16/2013, 8:54 AM

Has anyone else run into this? I've been trying to get this resolved with CCS tech support, and after two weeks it's still not working. Although I've been known to make some boneheaded mistakes in using CCS, ahem, I'm pretty sure this error is from CCS. Either that or somehow they're not taking into consideration the way I'm using CCS, which I think is pretty standard. I'm using Artisteer (latest) and the export plugin (latest), and now CCS 5.1.

I had a project in CCS 5.0 that was working fine with a number of screens that used CKEditor to let the users edit html for some user-editable pages in their website. Life was good.

Then, because of a problem I was having with menus, support asked me to upgrade Artisteer, the Artisteer export plugin for CCS, and CCS itself to 5.1. I did that and it immediately broke all the CKEditor screens. I just have a text area now showing the html contents instead of the editor firing. I created two new projects since then in 5.1, and they also will not fire CKEditor. Obviously I know how to attach CKEditor to a text area, so that's not the problem. There is SOMETHING in 5.1 (or the combination of 5.1 and Artisteer) that broke this and Yes support hasn't come up with the answer yet. I need to get this working again, so I'm hoping someone else, smarter than I am, has already figured this out.

If this is working fine for you in 5.1, I'd be interested in whether you're using Artisteer for your designs.

The suggestion today from support was that I was missing jquery-ui.css (located in Designs/<design name>/Images. Unfortunately, I had this file in every case, so this was not the answer and it will be another few days before I get the next answer. They're trying, but I need to get this resolved.

Obviously one solution is to roll this back to 5.0, but 5.1 has some nice new features and I'd rather not do that. Also, I'm not sure what really bad and unexpected things might happen if I do that--seems to me it's like pushing the hands of a grandfather clock backwards! :-)

Thanks for any suggestions!
View profile  Send private message
cvboucher

Posts: 191
Posted: 09/16/2013, 11:57 AM

I'm using CCS 5.1 with Artisteer designs. I was having an issue with {page:pathToRoot] not getting translated into a directory path. So Instead of using the built in support for ckeditor I did the following. Note, I have the ckeditor directory in my webapp directory and not at the website root.

1. Create an includable page with the following in the html and then include this page in the Head section of the page you want to use ckeditor.
<script type="text/javascript" src="{page:pathToRoot}ckeditor/ckeditor.js"></script>
2. Set the class of the memo field to ckeditor. You can set this under the Format tab of the properties.

One advantage of this method is I can set properties globally for all ckeditors in my app. For instance, I wanted all of them to be 850 px wide so I added the following to the includable page.
<script>CKEDITOR.config.width = 850 </script>

HTH,
Craig
View profile  Send private message
pbarkley

Posts: 37
Posted: 09/16/2013, 4:29 PM

Craig, thanks for the reply. I understand your issue with putting your ckeditor directory elsewhere. However, mine is in the "correct" location, i.e., the folder is immediately off the root of the project at the same level as the Designs, js, and Styles folders. However, based on the behavior, it really does seem like CCS is unable to find it.

While I did not try your method of using an includable file, I did specifically insert the pathToRoot information in the html for the test page, and that didn't help.

I also found your comment interesting about setting the class of the memo field to ckeditor; I did that as well with no change. That seemed like a probable cause since mine wasn't set to anything, but there was no change.

If I hadn't had this working before upgrading to 5.1, I would just assume this was all a result of my own lack of understanding, but I can't get this working in new projects, either. Yes support claims that it works just fine for them, so I think there's something different about the way it works under slightly different circumstances. I don't think I've done anything unusual, so hearing that other people have had issues with this as well was helpful. I'm at a loss for how to debug this further. Thanks for the reply.

Regards,
Paul
View profile  Send private message
cvboucher

Posts: 191
Posted: 09/16/2013, 6:57 PM

I think we have our ckeditor folders in the same place. I usually place my web applications in a folder off the root.

Here is a link to the original post which can explain it better then I can.

http://forums.yessoftware.com/posts.php?post_id=114219

Craig
View profile  Send private message
pbarkley

Posts: 37
Posted: 09/16/2013, 8:35 PM

Thanks Craig. I see you first tackled this issue last April, and the original post was from 2011. I basically compared each item, and it appears that I'm following this:

(1) Upload the latest CK Editor Version to the root of your webserver

A: Did that of course. It's been working all along.

(2) Create a Record and make sure the field you want to use for the CK Editor is a TEXT AREA. Open the page and switch to HTML View

A: Did that. Definitely a text area.

(3) Add the following script line between the <head></head>
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>

A: Already had that line inserted by CCS 5.1 as part of the now 280 freaking lines in the <head> section just for a test page. The only difference was the path was "ckeditor/ckeditor.js", just like all the other "js/jquery/ui/etc. statements. I did try the go up and back down approach of "../" on the front end just for fun, and it didn't work, either.

I noted that in the Attach CKEditor code, there is this line with pathToRoot:

var Panel1Panel2wodtest1TextArea1_CK_BasePath = "{page:pathToRoot}ckeditor/";

However, when the code is generated and the page runs, there is no path, because it's at the root where it belongs:

var Panel1Panel2wodtest1TextArea1_CK_BasePath = "ckeditor/";

That also seems OK to me although I know you were wary of the path, and in truth this seems like that kind of error to me, too.

(4) Add the CK Editor Class to the Text Area. It should look as follows:
<textarea class="ckeditor" id="TextareaID" rows="3" cols="50" name="{Work_Desc_Name}">{Work_Desc}</textarea></td>

A: Yep, other than a very long winded name and a different order, it's the same:
<textarea id="Panel1Panel2wodtest1TextArea1" class="ckeditor" cols="50" rows="3" name="{TextArea1_Name}">{TextArea1}</textarea>

Still not working, but these were some good ideas to kick around, thanks.

This is particularly vexing because CCS support is saying it works fine, so clearly there is SOMETHING not the same here. Since I'm letting CCS generate everything, and ckeditor is built into the system, unless I've set something different, I wouldn't expect to see these errors. And yes, I've checked and in the settings, the "CKeditor Base Path" is set to the default "ckeditor" as it always has been, and I'm pretty sure that based on where ckeditor is now and always has been, this is also correct.

Paul
View profile  Send private message
pbarkley

Posts: 37
Posted: 10/09/2013, 7:34 AM

Yes support issued a patch for this that fixes the problem, and I assume future versions will correct this, so I've marked this resolved.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.