eZ Community » Forums » Developer » SJSD WYSIWYG editor based on...
expandshrink

SJSD WYSIWYG editor based on FCKEditor for ezxmltext

SJSD WYSIWYG editor based on FCKEditor for ezxmltext

Wednesday 12 April 2006 5:56:35 pm - 236 replies

This thread is for the project SJSD (contribute: http://ez.no/community/contribs/a...d_real_fckeditor_xmltext_integration )

Please ask your questions in this thread rather in the contribution section.
If you do not expect replys, please add comment in the contribute section happy.gif Emoticon

<b>HOWTO DEBUG this extension</b>
As the nature of this project, there are two main sources of bugs: javascript running in client side and the server side php scripts

DEBUG Javascript:
*Firefox (at least 1.5) comes with a javascript console, and it can give precise information about where and why some commands in the javascripts fail.

*IE: without Microsoft script editor/debugger, the error message is basically useless. One of them is recommanded (Microsoft script debugger is free for downloading).

DEBUG PHP:
When using the editor, there are two buttons at the end of the toolbar: the first one will show the current html source of the editor. The second one is more interesting: onloading, it will communicate with ez publish server to get the converted xml from the current html source. There will be a button "Output" after the xml is displayed, it will ask the server to convert the xml back to html, and show it in the window. After this, a ok button will appear, which can be used to set the new generated html back to the sjsd editor.

<b>BEFORE REPORT BUGS</b>
Please check bugs and "feature requests" sections in our homepage: http://sf.net/projects/scim
if it is not there, you can file one (the prefered method), or state it here

Modified on Tuesday 11 January 2011 9:59:40 am by Nicolas Pastorino

Wednesday 10 May 2006 7:18:41 pm

I just downloaded FCKEditor this week, so I assume it is the latest version. I am using the Firefox browser (or I wouldn't be able to use FireBug!).

Anyway I will try to reinstall FCKEditor, and post the results here...

Wednesday 10 May 2006 7:30:13 pm

I reinstalled FCKEditor, but without result. The same error message appears.

The the reason be the fact that I run eZ Publish through CGI instead of using mod_php?

Wednesday 10 May 2006 7:49:41 pm

ah, I see

ez does not play well with cgi, if your apache is not 2.x, then SJSD (and eZ) would not work as expected (PathInfo in apache 1.x with cgi is not possible, so SJSD would not work properly)

Wednesday 10 May 2006 10:08:52 pm

to liu:

I did clear the server and the client cache several times but no effect. My site is on eZ 3.7.4 and I use utf-8 encoding. I tried it both in Mozilla and IE, the problem is the same.

Is this the same config you used, and did you try to input exactly the same characters as I did? Could you try copy-paste the text from this page:

http://tinyurl.com/zltmw

(the text that begins with RIJEKA - )

...and see what happens? How is your data stored in the database?

Thanks.

Wednesday 10 May 2006 10:56:19 pm

I copied that (I have no idea how to input them, copy is the only method I understand anyway), and works fine

As I said, I use eZ 3.8

Thursday 11 May 2006 11:25:28 am

Hm, maybe I should use eZ 3.8. Is your site in utf8?

Thursday 11 May 2006 4:49:00 pm

yes.

in fact, fckeditor only works well with utf-8

Saturday 13 May 2006 7:36:32 pm

I just noticed that my site wasn't in utf-8. So now I changed it to utf-8, and upgraded to the newest eZ version, and it all works OK. I think that utf-8 is of what matters.

Anyway, sjsd looks like a great extension, great work!

Monday 15 May 2006 8:13:47 pm

I'm using sjsd (version 132 from svn) in a VH environment with the suggested rewrite rules, eZ publish 3.8 and utf8.
The extension is working well but when I try to add an object I have this error:

Returned value is not in valid JSON format

Using Firefox javascript debugger I discovered the error was on row 70 of the file

extensions/sjsd/fcksjsd/lib/fckxml.js

oFCKXml.JSON = eval('(' + oXmlHttp.responseText + ')') ;

Any suggestion?

Thanks

roberto

Monday 15 May 2006 10:08:52 pm

does your user have access to SJSD module?

do you use admin?

do you use CGI? in this case, you need a patch for eZ, which I will publish in my blog in due time

what would be really helpful is the ajax response content from the server, you can get it in firefox

please look through this thread before you ask, this is already asked several times

Modified on Monday 15 May 2006 10:22:24 pm by liu spider

Tuesday 16 May 2006 12:54:20 am

I have the same problem like Jeroen Sangers

"Returned value is not in valid JSON format"

I'm not using CGI, I'm using admin, the access is OK... but still I see this message
when trying to add image to article.

Do you have any idea how to solve this problem?

Tuesday 16 May 2006 3:33:19 am

tell me what's the ajax response from server, so I can see what's wrong

Tuesday 16 May 2006 9:09:18 am

to liu (problems adding objects):

no cgi
admin user

after pressing the "Insert Object" button I had these http-responses (through firebug):

GET .../sjsd/xmlhttp/GetObjectPropertyOptionsList
{"Error":0,"Sizes":["reference","small","medium","large","rss","original"],"Classes":[]}

GET .../sjsd/xmlhttp/GetRelationList?oid=61&ov=19
empty

and then the popup error

"Returned value is not in valid JSON format:"

thanks

roberto

Modified on Tuesday 16 May 2006 9:18:50 am by Roberto Antoniazzi

Thursday 18 May 2006 4:33:59 am

FCKeditor 2.3 support in SJSD:
have a look here:
http://liucougar.scim-im.org/blog/

to Roberto Antoniazzi:
uhm, what about editing another object in eZ?

Thursday 18 May 2006 9:35:13 am

I try to install SJSD but after clean the cache and edit an article I can see a "enable editor" button but after press the button I can't see the editor and the string over button is changed in "disable editor".

Thursday 18 May 2006 9:47:41 am

Hi Daniele,

What version did you install ? from this website or from the pusvn server ?

Have a look at extension/sjsd/settings/sjsd.ini

What is your seeting ?

[General]
#if AlwaysEnabled is true, you don't have the buttons to activate/desactivate the editor.
AlwaysEnabled=true
#AlwaysEnabled=false

Thursday 18 May 2006 10:02:57 am

I use ezpublish 3.8.0 and I downloaded the SJSD 0.3.1 version from suorceforge.net.
This is my sjsd.ini:

[CustomTagSettings]
# specify a html tag that will represent the custom tag in sjsd.
# you can use any html tag except PRE.
# if you don't specify one a div or span will be used
# (depending on wether the tag's set as
# inline in content.ini) with id="custom_<tagname>".
# change how these are displayed in:
# extension/sjsd/design/standard/javascript/pagestyle.js

StartTags[strike]=strike
EndTags[strike]=strike

StartTags[underline]=u
EndTags[underline]=u

StartTags[sub]=sub
EndTags[sub]=sub

StartTags[sup]=sup
EndTags[sup]=sup

StartTags[quote]=blockquote
EndTags[quote]=blockquote

# don't add an endtag if it's not necessary.

# StartTags[example]=img src="url"

StartTags[hr]=hr

# attributes definition for custom tags

TagHasCustomAttributes[]=factbox

[CustomTagAttributes_factbox]
AttributeNames[]=title
AttributeIsRequired[]=true
#AttributeNames[]=another_attr
#AttributeIsRequired[]=false

Modified on Thursday 18 May 2006 10:03:28 am by Daniele Nocentini

Thursday 18 May 2006 12:16:44 pm

Concerning the "Returned value not in JSON format" when getting list of related object in add object dialog. When i choose to relate for example a folder, everything is ok. When i choose to relate an image, it doesn't work. The following line can be observed in apache log just after that:

==> /var/log/apache/error.log <==
[Thu May 18 12:11:32 2006] [notice] child pid 24660 exit signal Segmentation fault (11)

Any hints?

Thanks for great extension.

UPDATE: i'm running 3.8.0 release, will try svn stable 3.8.0

UPDATE: after cleaning all caches blunk.gif Emoticon it looks it doesn't help (upgrade to svn stable 3.8)

UPDATE: aargh, recursion in sjsd/modules/sjsd/hmlhttp.php. see next post

Modified on Sunday 21 May 2006 5:25:44 pm by Petr Mifek

Thursday 18 May 2006 4:32:59 pm

to daniele nocentini:
did you clear your server side cache?

to Petr Mifek:
Please write the exact procedure to reproduce your problem in SJSD

Sunday 21 May 2006 5:40:00 pm

I wish i could reproduce it, or better, how to avoid it. It manifests in all your SJSD releases and svn's from 0.3.0. Maybe it was connected with 3.7.6 to 3.8.0 upgrade. (3.8.1 aka latest trunk doesn't help). I'm really sorry not to know what triggered it on mine installation. I hardly remeber, that it >was< working somday, but maybe it >wasn't< working with images.

So, what i've found:

in sjsd/modules/sjsd/xmlhttp.php there was an recursion in 'GetRelationList' "function". There is already one notice and unset to avoid recursion while getting related image by you:

//ContentObjectAttribute has to be unset, it leads to recursion
unset($content->ContentObjectAttribute);

I must extend it this way:

//ContentObjectAttribute has to be unset, it leads to recursion
unset($content->ContentObjectAttribute);
unset($objectattr->DataTypeCustom);

in order to avoid recursion. It works, but i've no time to figure out what exactly was happening.

If anybody wants, I can send you the (part) of var_dump() of the recursed structure. The DataTypeCustom attribute of the ezcontentobject contains some DOM structure with references to parents, childrens etc, which (according to php's var_dump recursion detection) makes the recursion.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from