wagtail-localize
wagtail-localize copied to clipboard
Linked pages via join tables showing only the id of the linked page when in translation
When we are translating a page, we observed that some linked pages display as only their id. You can't see the title of the linked page, and you can't change which page is linked in the translation. This may be connected to https://github.com/wagtail/wagtail-localize/issues/445, which describes similar behavior when linking to images from a streamfield block.
Here's a specific example. We have a HomePage model, linked to a NewsDetailPage via a join table as seen here:
class HomePage(Page):
# ... FIELDS UNRELATED TO THE ISSUE ...
content_panels = Page.content_panels + [
# ... A BUNCH OF OTHER PANELS ...
MultiFieldPanel(
[
FieldPanel("news_heading"),
HelpPanel(content="<label>Featured news:</label>"),
InlinePanel(
"home_page_featured_news", max_num=3, min_num=1, label="Page"
),
],
heading="News Section",
classname="collapsible",
)
# ... A BUNCH OF OTHER PANELS ...
]
class HomePageFeaturedNews(Orderable, TranslatableMixin):
home_page = ParentalKey(HomePage, related_name="home_page_featured_news")
news_detail_page = models.ForeignKey(
"wagtailcore.Page",
null=True,
blank=False,
on_delete=models.CASCADE,
related_name="+",
)
panels = [
PageChooserPanel("news_detail_page", NewsDetailPage),
]
class Meta(TranslatableMixin.Meta):
verbose_name = "Homepage Featured News"
In the resulting translation page, we see the id of related content, but can't change it and also don't see any titles of the pages involved.
Hey @davidbrewer This should be possible with Wagtail 3.0+ and wagtail-localize 1.2.1 (just released)
Will close this as it was fixed in #480