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

Add migration to fix urls on TranslationContext model #12075

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

jhonatan-lopes
Copy link
Contributor

@jhonatan-lopes jhonatan-lopes commented Mar 19, 2024

Description

Fixes cases where editors couldn't edit translations because wagtail-localize was trying to get URL on linkbutton blocks, which doesn't exist anymore.

The remnants were found on the TranslationContext model, which saves the field's path on field and field_path. Because this had explicit references to URL that weren't migrated, it caused the KeyError.

Link to sample test page: http://localhost:8000/cms/pages/27553/edit/
Related PRs/issues:

Checklist

Tests

  • Is the code I'm adding covered by tests?

Changes in Models:

  • Did I update or add new fake data?
  • Did I squash my migration?
  • Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?

Documentation:

  • Is my code documented?
  • Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

┆Issue is synchronized with this Jira Story

Copy link
Collaborator

@robdivincenzo robdivincenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀, thanks @jhonatan-lopes !

@jhonatan-lopes jhonatan-lopes merged commit e765e6c into main Mar 19, 2024
6 checks passed
@jhonatan-lopes jhonatan-lopes deleted the bugfix/TP367/fix-translation-context-migration branch March 19, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants