terminal42 / contao-DC_Multilingual

A multilingual DC driver storing the translations in the same table for Contao Open Source CMS
17 stars 8 forks source link

Copying tl_news with tl_content results in double translations for the copied tl_content record #67

Closed Defcon0 closed 1 year ago

Defcon0 commented 4 years ago

Hello,

I think this is related to https://github.com/terminal42/contao-DC_Multilingual/issues/14.

Steps to reproduce:

  1. Create a tl_news (DC_Multilingual)
  2. Create a language record for the news
  3. Create a tl_content (DC_Multilingual) which is a child of the news created before
  4. Create a language record for the content element
  5. Copy the news

Result:

The langPid column is not updated and is still pointing to the copied, original tl_news record which is causing the translation to appear doubled in the frontend.

It seems to be the following line:

https://github.com/terminal42/contao-DC_Multilingual/blob/master/src/Driver.php#L682

Thanks in advance for digging into it!

Bye Defcon0

rabauss commented 2 years ago

@Defcon0 why don't you start a PR with https://github.com/heimrichhannot/contao-DC_Multilingual/commit/2e4ca75ef54769427dbbe4a8da484754c8180c0f ?

Defcon0 commented 2 years ago

In fact, we switched to core means (multiple archives for multiple languages) and a new bundle of ours for entities without parent (tl_member vs. tl_news for example): https://github.com/heimrichhannot/contao-multilingual-fields-bundle

Hence, I personally won't finish the PR to be honest. Can't speak for the rest of heimrichhannot though. If desired, I can close this issue and the PR.

aschempp commented 1 year ago

I don't think changing the core tl_news and tl_content tables to DC_Multilingual is a supported use case, I'm therefore closing this issue.