TYPO3 8.7 tx-news showinpreview field not visible - typo3

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".

Related

TYPO3 tt_news - show hidden news

on TYPO3 with the tt_news extension, my contributors would like to previews news before publishing ; Problem : impossible to get a preview if the news is hidden. Our website is big and we can't display the news before to finish it, even for preview for a few seconds.
According to this documentation :
If a preview of hidden records needs to be allowed too, the checkbox
“Allow hidden records” needs to be checked in the plugin.
No way to find this checkbox.
Do you have any solution ?
According to the tt_news documentation, you have to set the following Page TSconfig:
tx_ttnews.singlePid = 37
where 37 is the UID of the page containing the single view plugin.
Apparently this functionality is currently broken:
https://forge.typo3.org/issues/67304
https://forge.typo3.org/issues/75768
The second issue on forge.typo3.org provides a possible solution which should work in general with all records of any extension (TYPO3 v7 and above!). Again, Page TSconfig (no TypoScript):
TCEMAIN.preview {
tt_news {
previewPageId = 37
useDefaultLanguageRecord = 0
fieldToParameterMap {
uid = tx_ttnews[tt_news]
}
}
}
I successfully tested this in TYPO3 v7. One major drawback – as already noted in your question – is that this does not work with hidden records.
Previewing hidden records result in the error message
no news_id given
Edit: As Bernd suggested, you could make use of categories to hide drafts of news records and use the preview solution above:
If you already use news categories: Set the category mode in the list view plugin(s) of tt_news to hide news records which do not own the desired categories. Let the editors assign the categories only if the content is ready.
Otherwise: use a new category preview – as Bernd suggested – and hide records with this category in the list view plugin.
The latter is a bit more risky to use for editors, as they could forget to set this temporary category. Nonetheless, you as an integrator could use the TSconfig TCAdefaults to automatically assign this preview category to all new records. The editors would only have to remove the category when the news record is completed.
Another possible workaround could be to save drafts in a separate folder which is not used by the list view plugin of tt_news. Then you also could use the preview solution above.
If that's not the right way of working for you or your editors, you could try using the workspaces extension which ships with the TYPO3 core.
a clean solution would be the usage of workspaces. but not all extension support it.
so another option would be to simulate workspaces:
build a page where your news can be seen and secure it with a login. so if only the new records should be shown you might create a 'preview' category, which is shown only on the special preview page.

TYPO3: tx_news add system category selection to a link

I'd need custom buttons (with image) for the various categories, and I'm trying to figure out if I can add the selection to the link for a header or in the RTE with the wizard.
So I link to the list page that should display only the entries tagged with the specific system category that was clicked, like with a category-menu directly as plugin -> category menu
In TYPO3 8 the linkHandler configuration has been improved alot. It allows you to define your own tabs in the link wizards for selecting any records. You may use this function to sys_categories inside the linkwizard and then configure the url to make it work with tx_news.
Check out the new feature here: https://usetypo3.com/linkhandler.html
EDIT: I guess this feature was already available in TYPO3 7 LTS but I'm not sure its not inside the documentation... not even in the docs of 8 LTS...

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.

Video relations not working for tx_news on TYPO3 7.6

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.

tt_news - How to add comments in tt_news single view?

I setup my own tt_news template and currently try to use the "comments" plugin. After installing and import the standard plugin constants it should show the comments automaticly (so I've read it). But no. Nothing.
How do I get the comments into my tt_news single template?
you also have to insert the comments plugin on the news single page, below the news plugin with single view.
Here you can read about this in the extension manual:
comments manual in TER
Regards
Patrick