Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5231

lightbox for editing group doesn't work in safari 4.05

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Minor
    • None
    • 2.3.1
    • Office
    • None
    • mac osx 10.6.3, safari 4.0.5, xwiki 2.3.1 (XEM version)
    • lightbox
    • Unknown

    Description

      when i go to the administration area (XWikiPreferences), then select "Groups" and then select the "edit(pencil)" icon from the table next a group, the lightbox that appears says "the environment prevents the table to load data" and the members of the group do not populate the table (also the suggestions for adding users do not appear when something is typed)

      yes, i tried the suggestions regarding loading the appropriate pages from the XAR, etc.--to no avail

      after using the web inspector and poking around for a long time, here is what i found out

      first, when the lightbox loads, there are two console messages that say "SyntaxError: Parse error" and then point to a line in XWikiPreferences, but clicking on that doesn't resolve anything

      secondly, when typing into the "add user to group" field, there is an error: "TypeError: Result of expression 'window.createSuggest' [undefined] is not a function."

      after many circuitous paths, i finally tracked this down to an issue with the info that is being injected into the lightbox.

      when i look at the elements in the web inspector (i.e., the DOM model) and navigate down to div:lb-align>div:lb>div:lb-content>script[0&1], the scripts are not what are expected. they look like:

      "//"
      " 0) ? page.substring(dp + 1, p) : page.substring(0, p); var name = page.substring(p + 1); tr.insert(new Element("td").update(" ")); $('groupusers-inaccessible-docs').removeClassName('hidden'); } return tr; } ,

      { "maxPages":10 ,"limit":15 }

      ); } //]]> "

      and

      "//"
      "< 1) start = 1; editgrouptable.getRows(start, end, start, end); } } }); } } //create new ajax suggest suggesturl = "/xwiki/bin/view/XWiki/XWikiAdminGroup" + "?xpage=uorgsuggest" + "&" + "classname=XWiki.XWikiUsers" + "&" + "wiki=local"; window.createSuggest = function(input, uorg) { if(suggesturl.indexOf("&" + "uorg=") > 0) suggesturl = suggesturl.substring(0, suggesturl.indexOf("&" + "uorg=")); if(uorg == "user") suggesturl += "&" + "uorg=user" + "&"; else suggesturl += "&" + "uorg=group" + "&"; //clear the errors $('errMsg').innerHTML = ""; return new ajaxSuggest(input,

      { script: suggesturl, varname:'input' }

      ); } // ]]> "

      --which are only parts of the javascript that should be there.

      stepping through the code, it appears that when line 47 of lightbox.js is executed

      }I[E].innerHTML=K[E].innerHTML;

      that the right-hand side contains the proper javascript, but after the assignment, the left-hand side contains the erroneous versions shown above.

      it is almost as if there is some interpretation of the HTML during the assignment, as a matter of fact, if one changes the line to

      }I[E].innerHTML=K[E].innerHTML.escapeHTML();

      it then works properly in safari, but then breaks elsewhere.

      i know all the rants about innerHTML vs DOM, etc--not trying to say which way this should go, but wanted to report what i had tracked down

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            haleden Hal Eden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: