Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'fn' of undefined #106

Open
suzanneloures opened this issue Jan 12, 2020 · 4 comments · May be fixed by #127
Open

Uncaught TypeError: Cannot read property 'fn' of undefined #106

suzanneloures opened this issue Jan 12, 2020 · 4 comments · May be fixed by #127

Comments

@suzanneloures
Copy link

adding another line doesn't work autocomplete_fields. I'm using NestedTabularInline

@OskarPersson
Copy link
Owner

Can you provide an example that produces this error?

@jevhen-ponomarenko
Copy link

jevhen-ponomarenko commented May 7, 2021

i have the same problem, it seems that jQuery is not loaded in inlines-nested.js
Screenshot 2021-05-07 at 22 45 27

"Add" button not displayed for Unsettled artists

Error from the console:

Uncaught TypeError: $ is undefined
    <anonymous> https://.../static/admin/js/inlines-nested.js:24
    <anonymous> https://.../static/admin/js/inlines-nested.js:474

This doesn't happen when DEBUG=True

@leibowitz leibowitz linked a pull request Jun 3, 2021 that will close this issue
@categulario
Copy link

@OskarPersson I can reproduce the error with just the following using django 4.2 and nested_inline 0.4.6 on python 3.11:

# models.py
from django.db import models


class Fish(models.Model):
    title = models.CharField(max_length=255)
# admin.py
from django.contrib import admin
from nested_inline.admin import NestedModelAdmin
from django.db import models

from .models import Fish


@admin.register(Fish)
class FishAdmin(NestedModelAdmin):
    model = Fish

set everything up then visit http://localhost:8000/admin/sample/fish/ (not even the create page) and see the browser's console (tested in firefox and chrome).

@categulario
Copy link

the proposed fix in #127 does fix it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants