blog icon indicating copy to clipboard operation
blog copied to clipboard

Blog posts are not synchronised between localised versions of authors

Open jschlier opened this issue 3 years ago • 1 comments

Bug Report

Prerequisites

  • [ ❌] Can you reproduce the problem on TYPO3 v9.5 LTS -- haven't tried
  • [✅] Can you reproduce the problem on TYPO3 v10.4 LTS
  • [✅] Can you reproduce the problem on TYPO3 v11.x
  • [✅] Did you perform a cursory search to see if your bug or feature is already reported?

Description

Getting an author using the AuthorRepository includes their posts in the $posts attribute. This works fine and as expected until you translate an author. Getting a translated author by uid does not include any of their posts.

Steps to Reproduce

  1. Add an author and translate them
  2. Add a new blogpost, translate it and link it to the author
  3. Get the author by using AuthorRepository->findByUid() in the translated language

Expected behavior: the author object should contain all blog posts of (at least - depending on the configuration) the current language

Actual behavior: only the default language author object contains all blog posts, the translated author object contains none

Looking at the table tx_blog_post_author_mm I can see that translated and non-translated blog posts are linked to the author. When creating the blog post and selecting the author the default language uid is used for both mm records of the default language post and the translated one.

Opening the author record and saving it fixes the relations to use the translated author uid with the translated blog post uid. I suspect that this is either a misconfiguration or maybe not completely configured TCA from the blog post side or indeed a TYPO3 core bug.

Versions

t3g/blog dev-master ed56de5 -- the newest commit on master at the time of writing typo3/cms-core v11.5.3 -- newest release at the time of writing

jschlier avatar Nov 24 '21 15:11 jschlier

This is a general issue in TYPO3 with language handling of bidirectional MM relations. See #92777 for your described problem and #90430 for the main ticket.

sebkln avatar Jan 19 '23 15:01 sebkln