Closed campegg closed 1 year ago
I'm afraid I haven't been able to reproduce this yet - this renders fine for me.
4.0.0 changed the default value of allow_outgoing_webmentions
to make it configurable - can you confirm that you ran makemigrations
and migrate
after upgrading? I've just tried doing this and it rendered fine with or without running migrations but it's the only relevant thing I can think of that changed.
Can you view source in your browser and confirm that the checkbox isn't somehow hidden by css?
I'm all out of ideas after that but I'd at least like to cross those off the list.
Thanks!
Thanks for taking a look! I have run makemigrations
and migrate
. This is what I see when I view source; the checkbox is definitely not there:
Since it was the only other change I made, I also tried setting the value of WEBMENTIONS_ALLOW_OUTGOING_DEFAULT
in my settings file to both True
and False
, as well as removing it completely, but that didn't have any effect (not that I really expected it to).
Good to rule those out, thanks. I'll dig around some more...
The only way I've found for the checkbox not to render is if the field is misspelled in the template (e.g. {{ form.misspelled__allow_outgoing_webmentions }}
).
That doesn't appear to be the case for you, and I don't see why it would have been affected by the update, but can you please try adding {{ form }}
to your template to see what that renders?
That works! (At least, the checkbox renders.)
Edit: there seems to be an additional hidden field in there (initial-allow_outgoing_webmentions
) that I've not seen before; guessing that's from setting WEBMENTIONS_ALLOW_OUTGOING_DEFAULT
?
OK, so I deleted the local dev version of my site, set up a new virtual environment, re-cloned my site repo and tried again. And guess what? It worked. So I did the same on my live site and it worked there, too. I'm guessing it was a problem on my part, not an issue with the package. Sorry for the runaround!
Weird! No problem, glad you got it sorted out.
Aside/TIL: The hidden initial-
field is used to check whether a field has changed when submitting a form - it's a core Django thing.
I am using custom forms on my site, but after upgrading from v3.1.0 to v4.0.0, the
allow_outgoing_webmentions
checkbox does not display. The form views look like this:And the template looks like this:
This is what I see: