django / code.djangoproject.com

Configuration for Django's Trac instance (code.djangoproject.com)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline display of diff code snippets looks weird

bmispelon opened this issue · comments

25009_ create_user _is_staff true raises_typeerror_multiple_values_for_keyword_argument_is_staff _ django-_2015-06-19_23 19 27

This happens when you do:

{{{#!diff
... diff goes here ...
}}}

To reproduce: Try to leave a comment or make a new ticket. The text will be displayed as above. If you click "Preview", the syntax highlighting will be corrected.

I suspect this is a Trac issue that should be fixed upstream, perhaps http://trac.edgewall.org/ticket/8005. I'll leave a comment there.

That is a issue on code.djangoproject.com. Original issue has been fixed in http://trac.edgewall.org/ticket/10674 on Trac 1.0.3.

I noticed "TypeError: jQuery.loadStyleSheet is not a function" in javascript console when puting diff text in ticket comment on code.djangoproject.com. In the code.djangoproject.com, jQuery 1.9.1 is wrongly loaded. Trac 1.0.x is using jQuery 1.7.x. After blocking ajax.googleapis.com, diff text on auto-preview in ticket comment works fine.

I see that Trac stores functions on the jQuery object so even if another copy of jQuery is loaded (regardless of the version), those customizations are lost and this error will happen.

I tried removing the loading of the second jQuery in main.js but encountered another error in the console that I'm not sure how to fix: require.js:8 Uncaught Error: Script error for: jquery(…).

Seems like this was fixed. If I had to guess, it was either the cleanup on the js libs in 43d9616 or the Trac upgrade in 9deade1.