﻿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
30459	"If a StackedInline has fieldsets with the ""collapsed"" class, the ""Show"" link doesn't work on inline forms added with the ""Add another [inline object]"" link"	Antonis Christofides	Carlton Gibson	"I attach a screenshot with explanations, which is the easiest way to get a grip of this problem.

Steps to reproduce the problem illustrated in the screenshot:

1. Create a {{{myblog}}} django project and a {{{blog}}} app.

2. Specify this {{{models.py}}} in the {{{blog}}} app:
{{{
from django.db import models

class BlogPost(models.Model):
    content = models.TextField()


class Author(models.Model):
    blog_post = models.ForeignKey(BlogPost, on_delete=models.CASCADE)
    name = models.CharField(max_length=100)
    birthday = models.DateField(blank=True)
}}}

3. Specify this {{{admin.py}}}:
{{{
from django.contrib import admin

from . import models


class AuthorInline(admin.StackedInline):
    model = models.Author
    extra = 1
    fieldsets = [
        (""Essential"", {""fields"": (""name"",), ""classes"": (""collapse"",)}),
        (""Advanced"", {""fields"": (""birthday"",), ""classes"": (""collapse"",)}),
    ]


@admin.register(models.BlogPost)
class BlogPostAdmin(admin.ModelAdmin):
    inlines = [AuthorInline]
}}}

4. Add the {{{blog}}} app to {{{INSTALLED_APPS}}}, makemigrations, migrate, createsuperuser, runserver.

5. Visit /admin/, login, go to ""Blog posts"", click on ""Add new blog post"", then click on ""Add new Author"".

Result: The ""Show"" links on the new Author form don't work. See the screenshot for more information."	Bug	closed	contrib.admin	2.2	Release blocker	fixed			Ready for checkin	1	0	0	0	0	1
