Why are records shown in the wrong language after upgrading to TYPO3 9.5? - typo3

After upgrading an installation from TYPO3 8 to TYPO3 9.5.5 and switching language configuration to sites (no more config.*language* in TypoScript), I do get some internationalization errors, mainly records displayed in the wrong language:
For a table which has a relation to categories, I do get some records displayed in translated form for a page in default language.
Powermail (upgraded from 6.2 to 7.2) shows a similar behaviour I think: Some field labels are shown in their translated versions (and, contrary to the category relation, no labels at all are loaded in the non-default language).
I have tested settings config.sys_language_overlay to 0, 1 and hideNonTranslated and config.tx_extbase.persistence.consistentTranslationOverlayHandling to 0 without success.
After multiple days of debugging and stepping through code I still do not have any idea where the error could be or which settings I should look into; any hints in that direction would be appreciated. I am also a bit unsure about what multilingual M:M relations (for the categories) should look like in the database and how they are supposed to work in ExtBase, but the behavior on 8.x was fine.

Related

fallbackType:fallback and translations in freemode in TYPO3 11

I am confronted with the following problem:
Site definition in a TYPO3 11 LTS installation: fallbacktype:fallback
translations of content elements in connected mode are shown in the frontend
translations of content elements in free mode are NOT shown in the frontend
site definition in a TYPO3 11 LTS installation fallbacktype:free
translations of content elements in connected mode are NOT shown in the frontend
translations of content elements in free mode are shown in the frontend
What is wrong here? Of course the editors use both modes depending on their needs ... How can I get both translation modes visible in the frontend?
Thanks
Your first example is expected behaviour, because fallbackType "fallback" first loads all contents from default language and then overlays them with translations. So contents without a connection to a default language record are not respected here. https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/SiteHandling/AddLanguages.html#fallbacktype
Your second example could be a bug, since there are many open issues on forge related to language modes. Example: https://forge.typo3.org/issues/86627
If you find your problem on forge please add a commend there to get more attention to the issue.

TYPO3: Is it possible to migrate single news from 1.4.0 to 6.3.0

We are migrating a TYPO3 4.7.14 site with news 1.4.0 to TYPO3 7.6.28 with news 6.3.0.
When we started all news are migrated and are ok on the new server.
But in the time after the news migration some news are added to the old site and now they must be migrated to the new server.
How could this be done?
A t3d Export / Import don't work.
The news are containing a lot of content elements, so it would be an incredible amount of work to do it by hand.
I'd advise to make the whole migration-process new, perhaps only with the news-pages, news-plugins (content-elements saved in the table tt_content with the list_type tx_news or resembling) and news-records.
Problem is primary the update to version 6.2 of TYPO3 as the FAL (file abstraction layer) was introduced and all media-files in the news are getting lost if the corresponding update is not done properly.
Keep in mind that you've to care about one setting in file-storage records (usually for the fileadmin-folder): the checkbox that case-sensitive filenames are allowed. Else a mess is predictable and much additional work too.
If you do it like I proposed only for the news-records and related records, you've to export and import also the tables starting with sys_file, but keep in mind that you really import only then in the upper version instead overwriting the whole table, as there might be still other media-files.

TYPO3 FAL changed image not available in translation

In TYPO3 7.6, when I exchange an image in the base language I am not able to add this image in an already existing translation record.
For example: I added image pic1.jpg in English (L=0), on translating to German (L=1) pic1.jpg is available for activation. Later I remove pic1.jpg and add pic2.jpg, probably clipping or otherwise modify the relation so I have data that I want to preserve.
I'm able to delete the German translation record and add a new translation in both list view and page->languages:"Add Translation" with new image(s) and all its modifications preserved, but that is a work-around loosing all translated fields in the process.
If my memory doesn't fail me, there was a dimmed FAL record appearing in the translation media tab once it was added in the base language back in former versions of TYPO3 (6.1).
Bug? Or am I missing something?
It's a TYPO3 v7.6 core bug which exists since 2014 but it was never fixed. See bug report: https://forge.typo3.org/issues/57272
There are multiple ways to solve this issue. I had this problem too and for me it only worked with the first solution.
1. Create a ViewHelper
It's a solution from Kai Tallafus who shared his ViewHelper in the comments of the bug report 57272 (see link to bug report above).
ViewHelper: https://forge.typo3.org/attachments/download/32333/FalTranslationFixViewHelper.php
Usage of the ViewHelper in Fluid Template:
<util:falTranslationFix record="{record}" tableName="tx_myext_domain_model_foo" relationFieldName="files" as="files">
<f:if condition="{files -> f:count()} > 0">
<f:for each="{files}" as="file">
{file.properties.title}
</f:for>
</f:if>
</util:falTranslationFix>
2. Install an Extension
I found two extensions who probably will fix the bug. I recommend the first one but it doesn't work for me but maybe it will for you.
repair_translation
faltranslation (only available on bitbucket -> bitbucket.org/t3easy_de/faltranslation/src)
3. Enable sys_language_uid field for the FAL Media
There is a workaround for the translation of the FAL Media in which you enable the sys_language_uid field. When enabled the enduser can select the language for the media element. This also not worked for me but I know from a friend that in one of his project it worked. Manual (in german): www.npostnik.de/typo3/workaround-fuer-uebersetztungen-der-datensaetze-mit-fal-media/
4. Update to TYPO3 v8 LTS
When you're working on a project which could be updated to the new Version, you should consider to make an update. The Bug is fixed in the TYPO3 v8 LTS.
The viewhelper won't work for the field media in tablep-pair pages/page_labnguage_overlay. (TYPO3 8.7)
You have to seperate your translateted parts in the fluid-template. The where-clause in the query should check for 'pid' instead of 'uid'. And you have to check for a relavant entry in the media-field of the $rawRecord.

Create "multilanguage" site without redundant text in typo3

I'm not a big typo3 expert nor have I access to typoscript options at the typo3 instance I'm working with (It's a very big site and I don't have the authorization to do so). So I hope this question fits on stackoverflow (Please don't hate me if it does not, I'll happily post this on another site)
What I'm trying to achieve is:
My website has two possible translations (German and English). I see
that it's possible to switch languages during surfing through
clicking the "German"/"English"-Button
On the website are also informations about our staff (who may not be speaking german)
If one staff member doesn't speak german, I copy redundantly their english profile on the german translation mode (that it appears, because otherwise it doesn't - might be no good style, but it's better than not having them appear at all)
I'm not happy with these kind of redundancy since it means that I have to do the same action twice on the exactly same content. Does there exist a possibility in the backend of typo3 where I can set that the german translation shall be the exact same as the english content?
I hope my question is clear, thanks a lot for your help.
As you say you don't have access to typoscript templates etc, I guess you are not an integrator/developer in this project, but an editor.
Your only way to achieve an automatic "fallback" behaviour is asking the person who takes care of the site's configuration to set that up for you.
But if that's not possible, you can still use the "insert records" content element (german: "Datensatz einfügen") to avoid duplicate entries.
This content type is not in the wizard when you create a new content element. But you can create a text element and then change the type to "insert records". Now you can select another record which is then mirrored here:
You'll have a similar amount of work when setting it up, but you won't have redundant text, which is way better.
If this content type isn't available either, I would insist on the administrator enabling it for editors - it's very useful to maintain a site's content healthy.
Would be helpful to see your TypoScript configuration. Maybe theres something wrong with the sys_language_mode. Given that the sys_language_uid of english is 0 (which means its default language) and german is 1, the default behaviour should be, that german translations are shown, if available. If a translation is not available the default version of a content element is shown. However, you can change this behaviour with Typoscript:
config.sys_language_mode = content_fallback ; 5,3,1
This will set the content fallback of an content element (which is triggered if no translation exists) to sys_language_uid 5, if its not available in that language sys_language_uid 3 will be displayed etc.
Maybe your installation is set to
config.sys_language_overlay = hideNonTranslated
This will hide non-translated content-elements. Remove this entry to enable content fallback again.
You can always check the current Typoscript in the Template module via the TypoScript Object Browser. However, to really get help you need to share your TypoScript language configuration. The behaviour you describe is not the default behaviour, so its configured somewhere.

assigned categories to a news article are not correctly translated

Here I have tt_news 3.0.1 and a TYPO3 4.3.1. There are tt_news articles translated. If I look into the database (tt_news_cat_mm) than in the default language there are the categories 1,2,6,8 assigned. If I look on the translated article it only has the category 1 assigned.
In my opinion the translated article should have the same categories as the one in the default language. If I look into the backend I can only change the categories in the default language. There is no option available in the translated article.
Is that an error for the old tt_news extension?
Update:
It seems that the categories are only taken for the first translation. If you change the categories later they don't get updated in the translated version. Very annoying ...