﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18420	JavaScript crashes in django admin for translation inlines in some circumstances	maciej.maciaszek@…	nobody	"This issue is close to #10651.

I use here FeinCMS but I'm sure it's Django bug not Feincms bug.

Models of my app integrated as ''Aplication Content'' look like:


{{{
class Plant(models.Model, TranslatedObjectMixin):

    class Meta:
        verbose_name = _('Performance')


class PlantTranslation(Translation(Plant)):
    title = models.CharField(max_length=255, verbose_name=_('Performance Title'))
    slug = models.SlugField()
    description = models.TextField(max_length=2000)

    class Meta:
        verbose_name = _('Peformance Translation')

    def __unicode__(self):
        return '%s' % (self.title,)

}}}


'''admin.py'''

{{{


class PlantAdmin(admin.ModelAdmin):
    inlines = [admin_translationinline(PlantTranslation)]
}}}



As you can see in ''django admin'' I only have inline forms for each ''translation'' because translated object itself doesn't have any fields.

JavaScript crashes at ''django/contrib/admin/templates/admin/change_form.html'' on '''line 70'''.

It renders this line as:


{{{
<script type=""text/javascript"">document.getElementById("""").focus();</script>
}}}

so I get an JS error. It would be nice that JS check first if there's existing field which it can focus on."	Uncategorized	closed	contrib.admin	1.4	Normal	fixed	javascript		Unreviewed	0	0	0	0	0	0
