Forums / Developer / Online editor "undefined" error

Online editor "undefined" error

Author Message

Trevor Clowry

Wednesday 29 April 2009 4:54:36 am

I just upgraded from ezpublish 3.4 to 3.10.1 and the upgrades seem to be working mostly fine. I cannot upgrade the website any further as the server it is on is running PHP4.

I am have a problem with the online editor when i try to insert a link. If i add text to the OE, highlight it and click the add link button and add the details in the pop up window - the text of the link is always "undefined". This happens no matter how i try to add a link.
The only way that i can do it is manually add the code.

I have searched the forums without finding any reference and have done a bit of debugging and research and it seems that the problem lies here.

In the file /layout/set/dialog/ezdhtml/insertlink/

    // display other attributes
    if ( customAttributes != -1 )
    {
        var attributeArray = customAttributes.split("attribute_separation");
        var attributes = new Array();
        for ( var i=0;i<attributeArray.length;i++ )
        {

Firebug is telling me that the customAttributes has no values

It also shows this:

displayAttributes("link", undefined)    insertlink (line 56)
Init()                                               insertlink (line 300)
onload(load)

So i presume the displayAttribute function is being passed "undefined" into it.
I have tried tirelessly to try and figure out why and how but can't seem to find out.

I don't have the option of upgrading to version 4, so I am in a bit unsure what to do next.
If anyone could help i would be extremely greatful.I could also provide access to the site if someone would like to test it out.