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

String segments resests after synchronizing translations #838

Open
Azadron228 opened this issue Dec 13, 2024 · 0 comments
Open

String segments resests after synchronizing translations #838

Azadron228 opened this issue Dec 13, 2024 · 0 comments

Comments

@Azadron228
Copy link

I am encountering an issue where some string segments reset after synchronizing and publishing translations. Specifically:

Only certain pages are affected, and within those pages, only some strings reset.
The resetting string segments are being re-inserted into the wagtail_localize_stringsegments table after synchronization.
Other pages and string segments of same page model work as expected without issues.

Environment:

wagtail-localize: 1.8
Django: 4.0.7
Wagtail: 5.2
Database: MySQL

This is how i created page

class ChairMemberPage(SitemapMixin, Page):
    parent_page_types = [ChairPage]

    photo = models.ForeignKey(
        "wagtailimages.Image",
        null=True,
        on_delete=models.SET_NULL,
        related_name="+",
        verbose_name="Фото",
    )
    position = models.CharField(max_length=100, verbose_name="Должность")
    email = models.EmailField(verbose_name="Электронная почта")
    subjects = RichTextField(verbose_name="Основные преподаваемые дисциплины")
    education = RichTextField(verbose_name="Образование")

    info = StreamField(
        [("paragraph", blocks.RichTextBlock(label="Параграф с доп. информацией"))],
        verbose_name="Дополнительная информация",
        blank=True,
        null=True,
        use_json_field=True,
    )

    content_panels = Page.content_panels + [
        FieldPanel("photo"),
        FieldPanel("position"),
        FieldPanel("email"),
        FieldPanel("subjects"),
        FieldPanel("education"),
        FieldPanel("info"),
    ]

    search_fields = Page.search_fields + [
        index.SearchField("position"),
        index.SearchField("email"),
        index.SearchField("subjects"),
        index.SearchField("education"),
        index.SearchField("info"),
    ]

    class Meta:
        verbose_name = "Сотрудник кафедры"
        verbose_name_plural = "Сотрудники кафедры"
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

No branches or pull requests

1 participant