Video relations not working for tx_news on TYPO3 7.6 - typo3

I have been developing a site with TYPO3 6.2.15 and using the extension tx_news to show, well, news. Setting "Use FAL relations instead of news media elements" to "FAL + Multimedia" I could create relations with YouTube files, and they were shown in the frontend, both detail and list (if they have "Show in preview views" checked) page. The problem now is that after updating to TYPO3 7.6.2 they don't show up anymore. Gone, they appear in the backend if you edit a news record, but not in the frontend.
I know, in the documentation it says that the integration of audio and video is still to be done:
https://docs.typo3.org/typo3cms/extensions/news/stable/singlehtml/#video-audio-file
but it worked with TYPO3 6.2, so I assume it should work too with 7.6 too. The tx_news version I am using is 4.0.0.
Has anybody had the same issue and knows how to solve it?

The CE media element was removed in TYPO3 7LTS. In order to keep the old behaviour there is a system extension "mediace". I would install and configure it (f.e. add the static typoscript).

The custom media rendering has been removed in the master (upcoming 5.0.0) in favor of FAL. The best solution is to use
<f:for each="{newsItem.falMedia}" as="mediaElement">
<f:media file="{mediaElement}" class="img-responsive" />
</:for>
as this uses the renderers of FAL which can be of course also be extended by custom solutions.

Related

Typolinks target not working after upgrade to typo3 8.7.20

after upgrading from Typo3 7.6.30 to 8.7.20 my typolinks are not working correctly. The resulting links in the website have _blank as target.
No matter if the links are internal links or external links.
maybe something lets TYPO3 think you always have external URLs.
what is your domain definition, absRefPrefix, baseURL?
have you a clean https-handling?

How to create Fluid Extension Provider in TYPO3 v9 (2018)

We're currently struggling at creating Extension Provider with FluidPowered Typo3. This tutorial is outdated an we can't find any solution how to make Fluid Extension Provider from scratch. Also the 'builder' extension is not compatible with Typo3 versions higher than 8.5.
https://fluidtypo3.org/documentation/templating-manual/templating/provider-extension/generating-extensions.html
Is there any possibility to create Fluid Powered Extension Provider with Typo3 v. 9? Where are informations about custom extension provider files structure, controllers etc. ? The last post on Fluid website is from 2017.
You might want to look at this page instead: FluidTemplate documentation
And yes its short, but everything I could write is at that page. ;)

How to get rendered links of a HTML element in TYPO3 7.6

IN TYPO3 versions before 7.6 it was possible to render links inside the content element HTML by using the TypoScript
tt_content.html.parseFunc.tags.link < lib.parseFunc.tags.link
This does not work anymore since 7.6. How can it be solved?
If you use fluid_styled_content, override the HTML.html and want to use forms and have the Typo3 link tags <link>text</link> converted to html links, you will have to use this (at least this worked for me, both custom html forms were working and links were converted):
<f:format.htmlentitiesDecode>
<f:format.html parseFuncTSPath="lib.parseFunc">
{data.bodytext}
</f:format.html>
</f:format.htmlentitiesDecode>
There are a couple of possible solutions for this question.
1.) Use fluid_styled_content.
I guess that now fluid_styled_content instead of css_styled_content is used. Therefore the used TypoScript does not work anymore. A valid solution would be to switch back to css_styled_content. However that is the old ancient way and for newer projects you shouldn't do this.
2.) Override the template of fluid_styled_content.
If you open the template of fluid_styled_content and the HTML element, found at typo3/sysext/fluid_styled_content/Resources/Private/Templates/Html.html you will see
<f:format.raw>{data.bodytext}</f:format.raw>
this must be changed to
<f:format.html>{data.bodytext}</f:format.html>
Overriding is described in the docs, see https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/7.6/Configuration/OverridingFluidTemplates/Index.html

TYPO3 8.7 tx-news showinpreview field not visible

I'm about to upgrade a page from TYPO3 6.2.30 to 8.7.0 but I can't find a way to use the "showinpreview" field in tx-news.
In the old tx-news 3.2.8 Version the Override sys_file_reference.php is called from /typo3conf/ext/news/Configuration/TCA/tx_news_domain_model_media.php
But in tx-news 5.3.3. I can only find the Override file.
In BE I only see News > Relations > Media File > Title and Description.
If I Change "showinpreview" in Table sys_file_reference to "1" the preview Picture Display in the FE.
I know that since 4.1.0 - 2016/01/27 the relation "tx_news_domain_model_media" will be removed. But is there any way to activate preview Images from the backend?
Thanks for any hints and for your great work!
There seems to be a different way to use "imagePallettes" in TYPO3 8. The problem has already been solved in Github Master. https://github.com/georgringer/news
For display preview image in news list see attached image. you can do like this News > Relations > Media File > check "Show in list views".

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.