Ticket #5141 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] tinymce should be disabled on published worksheets

Reported by: jason Owned by: jason
Priority: critical Milestone: sage-3.3
Component: notebook Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

Otherwise bad things happen.

Attachments

trac_5141-tinymce-published.patch Download (948 bytes) - added by jason 4 years ago.

Change History

comment:1 Changed 4 years ago by jason

  • Summary changed from tinymce should be disabled on published worksheets to [with patch, needs review] tinymce should be disabled on published worksheets

comment:2 Changed 4 years ago by mabshoff

  • Summary changed from [with patch, needs review] tinymce should be disabled on published worksheets to [with patch, positive review] tinymce should be disabled on published worksheets

Positive review.

Cheers,

Michael

comment:3 Changed 4 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged in Sage 3.3.alpha4.

Cheers,

Michael

comment:4 Changed 4 years ago by mabshoff

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Summary changed from [with patch, positive review] tinymce should be disabled on published worksheets to [with patch, needs work] tinymce should be disabled on published worksheets

Ooops, this did break some doctests in cell.py:

sage -t -long "devel/sage/sage/server/notebook/cell.py"     
**********************************************************************
File "/scratch/mabshoff/sage-3.3.alpha4/devel/sage/sage/server/notebook/cell.py", line 175:
    sage: C.html()
Exception raised:
    Traceback (most recent call last):
      File "/scratch/mabshoff/sage-3.3.alpha4/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/scratch/mabshoff/sage-3.3.alpha4/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/scratch/mabshoff/sage-3.3.alpha4/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_9[3]>", line 1, in <module>
        C.html()###line 175:
    sage: C.html()
      File "/scratch/mabshoff/sage-3.3.alpha4/local/lib/python2.5/site-packages/sage/server/notebook/cell.py", line 184, in html
        if JEDITABLE_TINYMCE and not self.worksheet().is_published():
    AttributeError: 'NoneType' object has no attribute 'is_published'
**********************************************************************
File "/scratch/mabshoff/sage-3.3.alpha4/devel/sage/sage/server/notebook/cell.py", line 178:
    sage: C.html(do_math_parse=True)
Exception raised:
    Traceback (most recent call last):
      File "/scratch/mabshoff/sage-3.3.alpha4/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/scratch/mabshoff/sage-3.3.alpha4/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/scratch/mabshoff/sage-3.3.alpha4/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_9[5]>", line 1, in <module>
        C.html(do_math_parse=True)###line 178:
    sage: C.html(do_math_parse=True)
      File "/scratch/mabshoff/sage-3.3.alpha4/local/lib/python2.5/site-packages/sage/server/notebook/cell.py", line 184, in html
        if JEDITABLE_TINYMCE and not self.worksheet().is_published():
    AttributeError: 'NoneType' object has no attribute 'is_published'
**********************************************************************

Shame on me for giving this a positive review :p

Reopened.

Cheers,

Michel

Changed 4 years ago by jason

comment:5 Changed 4 years ago by jason

  • Summary changed from [with patch, needs work] tinymce should be disabled on published worksheets to [with patch, needs review] tinymce should be disabled on published worksheets

patch updated to check for the existence of the .is_published() method. It should work now.

comment:6 Changed 4 years ago by jason

  • Priority changed from major to critical

comment:7 Changed 4 years ago by jason

  • Owner changed from boothby to jason
  • Status changed from reopened to new

comment:8 Changed 4 years ago by TimothyClemans

  • Summary changed from [with patch, needs review] tinymce should be disabled on published worksheets to [with patch, positive review] tinymce should be disabled on published worksheets

comment:9 Changed 4 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged in Sage 3.3.alpha5.

Cheers,

Michael

Note: See TracTickets for help on using tickets.