Support » Fixing WordPress » 4.2.3 upgrade problem

  • Hi
    Code working fine last night and this morning. Returned this evening after notification of upgrade and code seems to be corrupting. In the visual editor it looks like this

    if (xmlhttp.readyState==4) {
          if ( xmlhttp.status==200)
             {
               document.getElementById("droptargethere").innerHTML=xmlhttp.responseText;
               var svg = document.getElementById("droptargethere").childNodes;
               for(var i = 0; i < svg.length; i++) {
                 var element = svg[i];
                 if (element.localName == "div") {
                   var rect = element.offsetTop;
                   var retID = element.id;
                   updTable (retID , rect , "/HagueWine/wp-admin/custom/");
                 }
               }
             }

    When I try and execute if I inspect code I get this

    if (xmlhttp.readyState==4) {
          if ( xmlhttp.status==200)
             {
               document.getElementById("droptargethere").innerHTML=xmlhttp.responseText;
               var svg = document.getElementById("droptargethere").childNodes;
               for(var i = 0; i < svg.length; i++) {               var element = svg[i];               if (element.localName == "div") {                 var rect = element.offsetTop;                 var retID = element.id;                 updTable (retID , rect , "/HagueWine/wp-admin/custom/");               }             }           }

    Somehow it seems to lose line breaks.
    Due to demonstrate this to client tomorrow.
    Anyone got any ideas.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tonywalsh

    (@tonywalsh)

    For completeness this is how it appears in the database

    ` if ( xmlhttp.status==200)
    {
    document.getElementById(“droptargethere”).innerHTML=xmlhttp.responseText;
    var svg = document.getElementById(“droptargethere”).childNodes;
    for(var i = 0; i < svg.length; i++) {
    var element = svg[i];
    if (element.localName == “div”) {
    var rect = element.offsetTop;
    var retID = element.id;
    updTable (retID , rect , “/HagueWine/wp-admin/custom/”);
    }
    }
    }

    Thread Starter tonywalsh

    (@tonywalsh)

    Further investigation it is the for loop which seems to cause the problem.
    Any ideas why this might be, it was working okay.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘4.2.3 upgrade problem’ is closed to new replies.