Moodle

Uneditable resources in HTML Editor

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Not a bug
  • Affects Version/s: 1.6
  • Fix Version/s: None
  • Component/s: HTML Editor
  • Labels:
    None
  • Environment:
    All
  • Affected Branches:
    MOODLE_16_STABLE

Description

If the resource text is special, in HTML Editor Toggle Source button is not working. In this situation after you submit the updated resource it DOESN'T CHANGE in the database, when it's title changes (so HTML part is kept old). So student may change his answer to assignment, but his answer will not change - really confusing.

My browser is Firefox-1.07

To reproduce:

1. create new resource,

2. Go to source mode

3. copy and paste the code from http://onlineuniversity.ru/bug.txt

(it is not the simplest code which caused a bug)

4. save the resource

5. edit the resouce (in HTML editor)

6. it's uneditable, Switch to source doen't work, add qwerty to the beginning and save - resource will not change

I am eager to help you with fixing the bug,

Best wishes,

Grigory Rubtsov.

Activity

Hide
Dan Marsden added a comment -

cannot reproduce - bug.txt no longer exists - feel free to reopen if you have further information on how to reproduce this issue.

thanks,

Dan

Show
Dan Marsden added a comment - cannot reproduce - bug.txt no longer exists - feel free to reopen if you have further information on how to reproduce this issue. thanks, Dan
Hide
Grigory Rubtsov added a comment -

Dear Dan,

Sorry for missing file. It's now on place.

http://onlineuniversity.ru/bug.txt

I don't know how to reopen a bug. Do I have to clone in this case?

Sincerely yours,
Grigory Rubtsov

Show
Grigory Rubtsov added a comment - Dear Dan, Sorry for missing file. It's now on place. http://onlineuniversity.ru/bug.txt I don't know how to reopen a bug. Do I have to clone in this case? Sincerely yours, Grigory Rubtsov
Hide
Dan Marsden added a comment -

Martin did it for you!

Have you tried upgrading Firefox?

thanks,

Dan

Show
Dan Marsden added a comment - Martin did it for you! Have you tried upgrading Firefox? thanks, Dan
Hide
Grigory Rubtsov added a comment -

I have tried on FIrefox 1.5.0.5 on linux, the browser hangs after performing the operations above.

Show
Grigory Rubtsov added a comment - I have tried on FIrefox 1.5.0.5 on linux, the browser hangs after performing the operations above.
Hide
Dan Marsden added a comment -

attaching HTML in linked file

Show
Dan Marsden added a comment - attaching HTML in linked file
Hide
Dan Marsden added a comment -

haven't looked into the exact code that is throwing the error, but the code you are trying to paste isn't quite right - have a look at the check.zip file for a list of errors with the html - try fixing some of this up - the problem may be in the list somewhere there.

  • if you are able to reproduce this with a smaller code block that would be great!

thanks,

Show
Dan Marsden added a comment - haven't looked into the exact code that is throwing the error, but the code you are trying to paste isn't quite right - have a look at the check.zip file for a list of errors with the html - try fixing some of this up - the problem may be in the list somewhere there.
  • if you are able to reproduce this with a smaller code block that would be great!
thanks,
Hide
Dan Marsden added a comment -

flagging this as "not a bug" - the html being pasted into the html editor does not validate - has several tags that start but don't seem to finish, and some that end that don't seem to start. - unless we add an html validator to the html editor there's not much that can be done about this!

Show
Dan Marsden added a comment - flagging this as "not a bug" - the html being pasted into the html editor does not validate - has several tags that start but don't seem to finish, and some that end that don't seem to start. - unless we add an html validator to the html editor there's not much that can be done about this!
Hide
Christopher Leiste added a comment -

Hi,

we just had a similar problem with Moodle 1.7.1+ (2006101010). One of our users tried to copy and paste parts of an HTML page (code generated by Moodle) for a forum post. After that, switching to source code view was not possible any longer and further modifications were not saved. I checked the code - every opened tag was closed later.
The reason was a glossary link in the text which produced very bad HTML code. It was something like:

<a onclick="function onclick(event) { return openpopup(...) }" href="..." title="..." class="..." target="...">

I think the "onclick" parameter is the problem. I also saw such code in your bug.txt. The HTML editor doesn't seem to like javascript code. After deleting the glossary link, everything worked fine again. If you have direct database access, deleting the "onclick" part should also work. Maybe that helps for you, too.

Best regards,
Chris L.

Show
Christopher Leiste added a comment - Hi, we just had a similar problem with Moodle 1.7.1+ (2006101010). One of our users tried to copy and paste parts of an HTML page (code generated by Moodle) for a forum post. After that, switching to source code view was not possible any longer and further modifications were not saved. I checked the code - every opened tag was closed later. The reason was a glossary link in the text which produced very bad HTML code. It was something like: <a onclick="function onclick(event) { return openpopup(...) }" href="..." title="..." class="..." target="..."> I think the "onclick" parameter is the problem. I also saw such code in your bug.txt. The HTML editor doesn't seem to like javascript code. After deleting the glossary link, everything worked fine again. If you have direct database access, deleting the "onclick" part should also work. Maybe that helps for you, too. Best regards, Chris L.
Hide
Grigory Rubtsov added a comment -

I reconfirm the bug:

1. Open WYSIWYG
2. swicth to Source mode
3. paste exactly the following:
<a onclick="function onclick(event) { return openpopup(...) }" href="..." title="..." class="..." target="..."></a>
4. switch back to WYSIWYG mode
5. can't switch to WYSIWYG mode anymore

Please reopen a bug.

Show
Grigory Rubtsov added a comment - I reconfirm the bug: 1. Open WYSIWYG 2. swicth to Source mode 3. paste exactly the following: <a onclick="function onclick(event) { return openpopup(...) }" href="..." title="..." class="..." target="..."></a> 4. switch back to WYSIWYG mode 5. can't switch to WYSIWYG mode anymore Please reopen a bug.
Hide
Dan Marsden added a comment -

Hi guys - try enabling the "tidy" filter on your site - it takes all user entered content and turns it into valid XHTML see here for more details:
http://docs.moodle.org/en/admin/filters

(note - you must have a few things installed to make use of the tidy filter - make sure you read the relavent docs.)

Dan

Show
Dan Marsden added a comment - Hi guys - try enabling the "tidy" filter on your site - it takes all user entered content and turns it into valid XHTML see here for more details: http://docs.moodle.org/en/admin/filters (note - you must have a few things installed to make use of the tidy filter - make sure you read the relavent docs.) Dan
Hide
Grigory Rubtsov added a comment -

Dear Dan,

The issue is not related to filter. In fact we have tidy filter active. The filter only changes the display of the resource to the user, where the bug appears when someone edit the resource via a WYSIWYG.

I consider the bug as serios due to the following:
A. It may happen when students or teacher copy and paste smth from the web to the WYSIWYG
B. The student or teacher answer in this case is not saved
C. There is no clear escape strategy in this case - student may think he had sent the assignment but it was not saved - this leads to phone call overburden for administrator (and he can't help)

Please reopen.

Best wishes,
Grigory

Show
Grigory Rubtsov added a comment - Dear Dan, The issue is not related to filter. In fact we have tidy filter active. The filter only changes the display of the resource to the user, where the bug appears when someone edit the resource via a WYSIWYG. I consider the bug as serios due to the following: A. It may happen when students or teacher copy and paste smth from the web to the WYSIWYG B. The student or teacher answer in this case is not saved C. There is no clear escape strategy in this case - student may think he had sent the assignment but it was not saved - this leads to phone call overburden for administrator (and he can't help) Please reopen. Best wishes, Grigory
Hide
Mauno Korpelainen added a comment -

I opened a new bug report:
http://tracker.moodle.org/browse/MDL-9963

Show
Mauno Korpelainen added a comment - I opened a new bug report: http://tracker.moodle.org/browse/MDL-9963

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: