weekly outline turns to garbage

weekly outline turns to garbage

by Robert Reynolds -
Number of replies: 7
Every once in a while, the weekly outline frames fill up with garbage (www/2/3 www/2/3 etc).  if I reload, it stays.  If click on a link and come back, it usually clears up.  Very disconcerting.  Anyone with similar experiences?
Average of ratings: -
In reply to Robert Reynolds

Re: weekly outline turns to garbage

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Can you post a screenshot?
In reply to Martin Dougiamas

Re: weekly outline turns to garbage

by Robert Reynolds -

That was a while ago; since upgrading to 1.1.1, this screen garbage has returned with a vengeance.  attaching a file showing what it looks like

In reply to Robert Reynolds

Re: weekly outline turns to garbage

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You're the only person I've ever heard of with this ...  I'm guessing it's related to this function in lib/weblib.php

function convert_urls_into_links(&$text) {

/// Given some text, it converts any URLs it finds into HTML links.


/// Make lone URLs into links.   eg http://moodle.com/

    $text = eregi_replace("(:space:|^|\(|\[)(:alnum:+)://([^[:space:]]*)([[:alnum:]#?/&=])",

                          "\\1<a href=\"\\2://\\3\\4\" target=\"newpage\">\\2://\\3\\4</a>", $text);


/// eg www.moodle.com

    $text = eregi_replace("(:space:|^|\(|\[)www\.([^[:space:]]*)([[:alnum:]#?/&=])",

                          "\\1<a href=\"http://www.\\2\\3\" target=\"newpage\">www.\\2\\3</a>", $text);

}



What does yours look like?  How did you get the Moodle files onto your server?
In reply to Martin Dougiamas

Re: weekly outline turns to garbage

by Robert Reynolds -

Very interesting.  I've checked the regex on my server visually character by character three times now and it looks like these are identical.  I downloaded the zip file of 1.1.1 onto my windows 98 pc and then uploaded it to the linux server I'm using via a program called WinSCP3.  Haven't yet found any visible corruption in any of the zipped files.

Something must be going on, however, because I'm also getting lots of time outs on the main site page, and the error message always says its at line 650 in weblib.php, which is the end of this function.  Should I check the code byte by byte?

In reply to Martin Dougiamas

Re: weekly outline turns to garbage

by Robert Reynolds -
As a temporary solution, I've commented out the convert_urls from the text_to_html function and this got rid of the time outs and garbage.  I wonder if this is a mbstring problem?  I'm using a server which is mostly used for Chinese language materials...  Is this possible?  If so, what configure settings should I check?
In reply to Robert Reynolds

Re: weekly outline turns to garbage

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
That might be a reason, I suppose, but there are lots of Chinese Moodle sites that are not having this problem. If you work this out please get back and let us know!
In reply to Martin Dougiamas

Re: weekly outline turns to garbage

by Robert Reynolds -

This is fairly bizarre stuff.  It turns out that in the weekly outline content box, a left angle bracket is getting spit out for every character printed in the box, i. e. instead of printing 

 < a title="edit summary" href=

 it prints

<  << <a <  <t <i <t <l <e <= <" <E <d <i <t <  <s <u <m <m <a <r <y <" <  <h <r <e <f <=

It also does this for the course descriptions on the site's home page.

After some experimenting, however, I have found that it does not do this when the language is set to Chinese (simplified or traditional) or Japanese.  If the language is set to anything else, it spits out a extra left bracket in these two places.

My sysop (a friend) saw this and said "strange!"  What do you all say?