FCKeditor and embedded HTML content

Author Message

Lydie Soler

Monday 11 July 2005 8:05:15 am

Sorry can you tell me the file name I need to change?
The extension I have installed are :
ezpaypal,dyn_menu,fckeditor
so I don't understand what I have to change...

Do you have any idea why apache says it can't find the file?

Geraint Edwards

Monday 11 July 2005 11:09:01 am

Assuming you can see the hmtl file (it will look blank but do a "view source" to make sure you have got it).

"editform" is the name of the <form> used in the xmlarea editor - which is why I suggested you made sure you disabled that extension. If you do not have the xmlarea extension installed I'm not sure what to suggest- since you can't disable it if its not installed! This is not a name that is used in FCKeditor which suggests the problem is with a clash with another extension.

Can you try accessing the edit page with Debug=enabled in TemplateSettings so that you can see which template overrides are being used.

Keep at it since the results are rather neat (in my opinion).

Lydie Soler

Tuesday 12 July 2005 5:17:45 am

well here are some precisions...
I can access the html file with the folowing URL:

http://metarisk2/metarisk2/extension/fckeditor/FCKeditor/editor/fckeditor.html

(note that there is not the index.php or the name of my site...)

this URL doesn't work:
http://metarisk2/metarisk2/index.php/site_unite_metarisk/extension/fckeditor/FCKeditor/editor/fckeditor.html

I am still looking at the debug output trying to see something weird. But isn't this URL path the problem?
What do yuo think about it? And what may I have to change???

Thanks a lot for your help! I really appreciate ;)

Geraint Edwards

Tuesday 12 July 2005 6:06:15 am

Can I check that I understand your setup. Your domain is metarisk2 (clearly internal to your network) and your siteaccess is also metarisk2?

If this is the case then fckeditor.html should be requested from http://metarisk2/metarisk2/extension/fckeditor/FCKeditor/editor/fckeditor.html without any index.php. This is consistent with what you can see in the browser but is also the URL that you couldn't access earier?

Do you still see the file not found message when you are trying to edit? Assuming you're running apache can you look at your access-log to see what files are being requested and whether they are being delivered. You'll also be able to spot any strange requests.

Or are you now only having problems with "editform". I am pretty convinced that this is nothing to do with the fckeditor other than an unidentified clash with something else that is installed. What are the relevant templates being requested when you do an edit?

Lydie Soler

Tuesday 12 July 2005 6:07:10 am

in your fckeditor.php, you use:
$oFCKeditor->BasePath = '/extension/fckeditor/FCKeditor/' ;

Maybe I should try and change this path...

Lydie Soler

Tuesday 12 July 2005 6:36:56 am

well the URL I can see (typing it directly in my browser is : http://metarisk2/metarisk2/extension/fckeditor/FCKeditor/ as you said, I can see the source page)

So I have replaced your path in the php file by this URL and now I can see the whole fckeditor and it seems to work ;)

Do you have any idea why I have to put the whole path... Maybe I have something wrong with my installation...
I don't have anymore the problem in the javascript... Don't know why.....

Here is the error I have in the apache log file with your original URL in the php file:

10.75.2.21 - - [12/Jul/2005:11:07:38 +0200] "GET /extension/fckeditor/FCKeditor/editor/fckeditor.html?InstanceName=fckContentObjectAttribute_data_text_1027&Toolbar=Default HTTP/1.1" 404 325 "http://metarisk2/metarisk2/index.php/site_unite_metarisk_admin/content/edit/228/15/fre-FR" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"

Lydie Soler

Tuesday 12 July 2005 6:38:20 am

it also work with the following url (in the php file):

/metarisk2/extension/fckeditor/FCKeditor/

Geraint Edwards

Tuesday 12 July 2005 6:47:31 am

Well done for getting to the heart of it!!

The coding of extension is working on the assumption that ezpublish is installed in the "DocRoot" - I suspect you may have it installed in a subdirectory.

In the short term, I'll add a note to the installation instructions and think of a longer term "proper" solution.

Geraint

p.s. Hope it was worth the effort!

Lydie Soler

Tuesday 12 July 2005 7:06:08 am

Oh yes it was worth the effort!!! But with your help it was not so much work in the end ;)
the lack of WYSIWYG was a big problem for my users (not familiar with HTML)

So first THANKS a lot for your NICE extension and your help! I really recommend people to install it.
And your right, I have installed ezPublish in a subdirectory.

Geraint Edwards

Tuesday 12 July 2005 7:25:50 am

Lydie

Would you mind doing one quick check of a possible fix (that works in my non-subdirectory setup) please:

Can you change the offending line in fckeditor.php from

	$oFCKeditor->BasePath = '/extension/fckeditor/FCKeditor/' ;

to

		$oFCKeditor = new FCKeditor("fck".$id) ;
		include_once( 'lib/ezutils/classes/ezextension.php' );
		$extensionDirectory = eZExtension::baseDirectory();

		include_once( 'lib/ezutils/classes/ezsys.php');
		eZSys::init( eZINI::instance() );

		$oFCKeditor->BasePath	= eZSys::wwwDir() . "/" . $extensionDirectory . "/fckeditor/FCKeditor/" ;

Thanks

Geraint

Lydie Soler

Tuesday 12 July 2005 7:50:34 am

Waouh! your the boss!
It works!

Thanks!!

Sébastien Claudel

Friday 15 July 2005 6:59:04 am

Hi,

I have to replace all textarea with FCKeditor.
I want to have only this editor for my users.

Someone have an idea how to do this ??

Thanks

darta

Geraint Edwards

Friday 15 July 2005 9:47:57 am

I assume you don't want to use fckeditor in the admin area but you do elsewhere.

A quick thought suggests moving the "override" template extension/fckeditor/design/standard/templates/content/datatype/edit/ezxmltext.tp

from the extension and into the appropriate siteaccess. Will try it next week to see if it works.

Geraint

Sébastien Claudel

Monday 18 July 2005 1:18:43 am

i want to use the editor in the admin interface but i don't want to have 2 fields (fckeditor + textarea). I want to replace all textarea and to have only fckeditor for input. I want to remove the both "copy" buttons. thanks for your help.

Gabriel Ambuehl

Monday 18 July 2005 2:48:44 am

Is it possible that FCKEditor only works for the first instance on a page? For example, the default article class has two text boxes and while I get the editor menu for both, only the upper one actually does anything if I try to format text...

Visit http://triligon.org

Geraint Edwards

Monday 18 July 2005 3:37:44 am

I tested moving extension/fckeditor/design/standard/templates/content/datatype/edit/ezxmltext.tpl into the template overrides for a site design.

This allows you to only enable FCKeditor for one or more siteaccess e.g. admin only or everywhere apart from admin.

Geraint Edwards

Monday 18 July 2005 3:41:21 am

Sébastien

I show both textarea and FCKeditor to leave the option of having XML as opposed to HTML in certain circumstances (and also for testing purposes)

It would not be too involved to add a new ini choice to allow showing both or just FCKeditor. I'll implement this when I get a chance.

Geraint Edwards

Monday 18 July 2005 3:42:08 am

Gabriel

I've not seen this behaviour - what type of content where you editing when this problem occured?

Sébastien Claudel

Monday 18 July 2005 4:30:04 am

thanks for your answer.

Gabriel Ambuehl

Monday 18 July 2005 5:53:45 am

That behavior now stopped (without me doing anything, really) might have been some Javascript oddity or whatever.

Now, there's another gripe I have: using <literal> breaks the PDF export rather badly: PDF export threats <literal class="html"> really as a literal and the effect is that you see 1:1 the HTML you typed in the field :(

Visit http://triligon.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.