Bug #76513

Story #69617: FormEngine bugs

diff-view not working for categories if default changes

Added by Manuel Selbach over 3 years ago. Updated about 3 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2016-06-08
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Hi,

the diff-view of a translated record shows "N/A" if there are changes made to the default language.

NA.png View (99.1 KB) Manuel Selbach, 2016-07-03 18:54

diff.png View (104 KB) Manuel Selbach, 2016-07-03 18:54

History

#1 Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48496

#2 Updated by Daniel Goerz over 3 years ago

  • Target version set to 8.2
  • PHP Version set to 7.0
  • Sprint Focus set to Stabilization Sprint

#3 Updated by Daniel Goerz over 3 years ago

How can this be reproduced?

#4 Updated by Manuel Selbach over 3 years ago

- Go to the backend with at least 2 languages
- edit a record in the default language and select a category
- copy that record into another language
- edit the copied record
- go to the categories tab
- underneath the categories tree, should be the layer "Changed in original translation"

Before the patch there will be "N/A".

After the patch the categories of the "original" language should be listed at this position.

#5 Updated by Nicole Cordes over 3 years ago

Unfortunately I can't reproduce your issue with the provided information.

What I did:

1) new record with enabled first category
2) translated that record to another language
3) edit the translated record -> tab categories -> displays the selected category and the parents one correct

Can you provided screenshots of your issue or further steps to reproduce the problem?

#6 Updated by Manuel Selbach over 3 years ago

I´m sorry, I´ve forgotten to explain the hole story.

After it has been copied, you select other categories in the "default" language.
Now the "diff-view" will be presented in the translated record if you open it to edit with "N/A" under the categories tree.

After the patch is a applied, the correct diff will be visualized.

Before:

After:

#7 Updated by Nicole Cordes over 3 years ago

Thank you for your information. Unfortunately I don't see the red box at all. Is there any setting I have to switch on? I thought differences should be displayed in the grey box.

#8 Updated by Manuel Selbach over 3 years ago

Yes, I thought so too and now I realized, that I have the bootstrap_package extension installed.
This one seems to activate this feature.

#9 Updated by Benni Mack over 3 years ago

  • Target version changed from 8.2 to 8.3

#10 Updated by Benni Mack about 3 years ago

  • Target version changed from 8.3 to 8.4

#11 Updated by Christian Kuhn about 3 years ago

  • Parent task set to #69617

#12 Updated by Christian Kuhn about 3 years ago

Ok, first an explanation of the feature itself:

the "Changed in original translation" diff view is meant to show in a translated record changes that have been done to a default language record after the translated record was created. and it has nothing to do with the bootstrap package:

Here is a flow to reproduce:

  • Create a page
  • Add a tt_content record on this page, fill a simple field like header.
  • Create a page translation
  • Translate (not copy) the tt_content record.
  • Then change the default language record, NOT the translated record, change header.
  • On opening the translated record, it will now show that the default record has been changed with a "diff" view indicating which specific parts should be considered to update the translation.

This feature is actually rather nifty ;)

The code behind works as such: On creation of the translated record the current values of the default language record are fetched, serialized and put into a db field of the translated record. If the translated record is opened, this is unserialized again and compared with the "current" values of the default record. If that is different, this diff view is shown.

The issue with "categories" is now that categories is a relation to a different table's record. So it does not store the value itself, but the number of connected records only.

The proposed patch lets the code look up the currently connected records of the translated record with the current state of the default language record. This is wrong, it should compare the former and "now" state of the default record only instead, but unfortunately the record resolution of related tables are not stored in the serialized thing at all.

Ergo: there is currently no fix available, it would mean we resolve all foreign connection for a record when the translation is created (which would be hard).

#13 Updated by Christian Kuhn about 3 years ago

  • Status changed from Under Review to Rejected

this can't be solved at the moment. closing the issue for now.

Also available in: Atom PDF