Scripting error/running slow

Scripting error/running slow

by Lei Zhang -
Number of replies: 3
I'm having a trouble to update a web page resource using HTMLArea editor.
The webpage content itself has more than 60+ hyperlinks! Someone has copy and paste a lot of his stuff from MS word, so I did "Clear Word HTML" for this page, and add some new content. But it would runs really slow, and eventually i will get an error message as the following pic shows.

Does HTMLArea editor has limits on number of hyperlinks? or different fonts causing trouble?


Attachment moodle_error.jpg
Average of ratings: -
In reply to Lei Zhang

Re: Scripting error/running slow

by Mauno Korpelainen -

I don't think the problem is the number of links but it is usually the length of text (MS Word) or browser running out of memory or allowed script running time. All browsers and also databases may crash if text that you are saving to a field (VARCHAR, TEXT, MEDIUMTEXT or even LONGTEXT) is long enough.

At least old Wiki has had problems with large content from word and sometimes you even need to clean content from database (from correct table and field)

A better way is to upload Word documents to course files and use links to files or save large content to several pages (wiki)

Average of ratings: Useful (1)
In reply to Mauno Korpelainen

Re: Scripting error/running slow

by Lei Zhang -
Thanks, it seems save to several pages solved the problem.

If there is a limit of content user can type/paste into editor, then at least somewhere should tell them how many character they left.
In reply to Lei Zhang

Re: Scripting error/running slow

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Lei,

because I have some inside knowledge.....your particular issue is due to a massive amount of empty tags at the start of the block - as a result of many copy/pastes from word. - you'll find 95%-99% of the content in those resources is invalid html tags from word.. - switch to code view and remove all that invalid text.

you will also find those pages really slow to load.......

there are some regular offenders @ Lincoln....

smile

Dan
Average of ratings: Useful (1)