-
Notifications
You must be signed in to change notification settings - Fork 66
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
Copy fails for a Wagtail page with no tags #134
Comments
Addendum: They copy action does result in a copied page despite the server errors, but its new title doesn't show in the Wagtail admin. |
Hi @higs4281, |
I need to do more digging, because I now find that I get the error on pages with tags, so this does seem like an implementation issue. Thanks for the quick response. I can close this until I know more. |
Hi,
I am facing exactly the same issue, with or without tags on specific page models. Here follow a textual stack trace and the visual one with more details.
Software versions:
Best regards. |
If that helps, the mots_cles = ClusterTaggableManager(
"Mots clés",
through='MotsClesTag',
blank=True,
related_name='tags',
) with class MotsClesTag(TaggedItemBase):
content_object = ParentalKey(
'SitePage', on_delete=models.CASCADE, related_name='tagged_items'
) It may be tricky to build a minimal example reproducing the bug, but if it's definitly needed I may try. |
FYI, we rather cheaply sidestepped the issue by editing our base page model to add tags and authors (another tag type for us) to the This keeps tags and author tags out of the admin request cycle, but tags and authors still get applied to the copied page. default_exclude_fields_in_copy = Page.default_exclude_fields_in_copy + [
'tags',
'authors'
] |
It seems that the stable interface is |
We've been getting server errors when pages without tags are copied.
I think I've traced the problem to contrib/taggit.py, where the passed
tags
value is a tuple consisting of an empty FakeQuerySet instance, which raises a ValueError such as this:I can get the process to complete without error by adding this check to _ClusterTaggableManager's
add
method:If this is acceptable, and isn't a known issue or something that would be better addressed elsewhere, I'd be happy to open a PR.
We are running these versions:
The text was updated successfully, but these errors were encountered: