[Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

View: New views
7 Messages — Rating Filter:   Alert me  

[Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
----------------------------------+-----------------------------------------
 Reporter:  danielr               |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  django.contrib.admin  |     Version:  1.1      
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  1                     |  
----------------------------------+-----------------------------------------
 The combination of Firefox 3.5 with TinyMCE on an admin add/edit screen
 which contains a date or time field causes the calendar/clock icons not to
 appear, and spurious 404/500 errors to appear in logs.

 I have reproduced this on Mac and Linux (Ubuntu), and more reports are
 here:[[BR]]
 http://groups.google.com/group/django-
 users/browse_thread/thread/14beb2d0cab45257 [[BR]]
 http://groups.google.com/group/django-
 users/browse_thread/thread/be50deac49247f80

 The cause appears to be the way `DateTimeShortcuts.js` works out the value
 of `admin_media_prefix`, by searching for its own name in the list of
 scripts returned by `document.getElementsByTagName('script')`. TinyMCE
 dynamically injects various scripts into the page, and some issue with
 Firefox 3.5 causes the it to no longer return the full list of scripts in
 the DOM. Therefore, `DateTimeShortcuts.js` is not found, and the script
 incorrectly uses a blank value as the media prefix, leading to it
 requesting the icons via a relative path from the current page - eg
 `/admin/app/model/1234/img/admin/icon_calendar.gif` - which causes a
 `ValueError: invalid literal for int() with base 10` in Django.

 Although this is clearly a bug in Firefox and/or TinyMCE, I think it's
 worth fixing in Django anyway as the way `DateTimeShortcuts` works out
 `admin_media_prefix` is quite crufty, and using TinyMCE in the admin is
 fairly popular. The proposed patch simply defines a global
 `admin_media_prefix` variable in the change_form template, and
 `DateTimeShortcuts.js` uses that if defined (it still falls back to the
 old method otherwise). Having `admin_media_prefix` available to all
 scripts would seem like a good idea in any case.

--
Ticket URL: <http://code.djangoproject.com/ticket/11967>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
-------------------------------------------+--------------------------------
          Reporter:  danielr               |         Owner:  nobody
            Status:  new                   |     Milestone:        
         Component:  django.contrib.admin  |       Version:  1.1  
        Resolution:                        |      Keywords:        
             Stage:  Unreviewed            |     Has_patch:  1    
        Needs_docs:  0                     |   Needs_tests:  0    
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by anonymous):

 * cc: smulloni@... (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

--
Ticket URL: <http://code.djangoproject.com/ticket/11967#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
-------------------------------------------+--------------------------------
          Reporter:  danielr               |         Owner:  nobody
            Status:  new                   |     Milestone:        
         Component:  django.contrib.admin  |       Version:  1.1  
        Resolution:                        |      Keywords:        
             Stage:  Unreviewed            |     Has_patch:  1    
        Needs_docs:  0                     |   Needs_tests:  0    
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by lakin@...):

 This is driving me nuts too.  It wouldn't be so bad if this was a 404, but
 combined with #11191 and #3785 it generates a ton of 500 errors. :/

 Any chance this will be in 1.0.5 or 1.1.2?

--
Ticket URL: <http://code.djangoproject.com/ticket/11967#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
-------------------------------------------+--------------------------------
          Reporter:  danielr               |         Owner:  jacob
            Status:  assigned              |     Milestone:  1.2  
         Component:  django.contrib.admin  |       Version:  1.1  
        Resolution:                        |      Keywords:      
             Stage:  Accepted              |     Has_patch:  1    
        Needs_docs:  0                     |   Needs_tests:  0    
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by jacob):

  * owner:  nobody => jacob
  * status:  new => assigned
  * stage:  Unreviewed => Accepted
  * milestone:  => 1.2

--
Ticket URL: <http://code.djangoproject.com/ticket/11967#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
-------------------------------------------+--------------------------------
          Reporter:  danielr               |         Owner:  jacob
            Status:  assigned              |     Milestone:  1.2  
         Component:  django.contrib.admin  |       Version:  1.1  
        Resolution:                        |      Keywords:      
             Stage:  Accepted              |     Has_patch:  1    
        Needs_docs:  0                     |   Needs_tests:  0    
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by olau):

 There was a bug in that patch. admin_media_prefix is used as a variable
 with {{ admin_media_prefix }} instead of as a tag {% admin_media_prefix
 %}. Here's a fixed patch.

--
Ticket URL: <http://code.djangoproject.com/ticket/11967#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
-------------------------------------------+--------------------------------
          Reporter:  danielr               |         Owner:  jacob
            Status:  assigned              |     Milestone:  1.2  
         Component:  django.contrib.admin  |       Version:  1.1  
        Resolution:                        |      Keywords:      
             Stage:  Accepted              |     Has_patch:  1    
        Needs_docs:  0                     |   Needs_tests:  0    
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by olau):

 * cc: olau@... (added)

--
Ticket URL: <http://code.djangoproject.com/ticket/11967#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@...
To unsubscribe from this group, send email to django-updates+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: [Django] #11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin

by noreply-71 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

#11967: [patch] Firefox 3.5/TinyMCE collision breaks DateTimeShortcuts.js in admin
-------------------------------------------+--------------------------------
          Reporter:  danielr               |         Owner:  jacob
            Status:  assigned              |     Milestone:  1.2  
         Component:  django.contrib.admin  |       Version:  1.1  
        Resolution:                        |      Keywords:      
             Stage:  Accepted              |     Has_patch:  1    
        Needs_docs:  0                     |   Needs_tests:  0    
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by justinlilly):

 * cc: justin@... (added)

--
Ticket URL: <http://code.djangoproject.com/ticket/11967#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to django-updates@....
For more options, visit this group at http://groups.google.com/group/django-updates?hl=.