broken links from news with internal link to page which is hidden in default language - typo3

I have news articles of type internal link. The article is created in the default language and is localized. In the news article the internal link points to a page which has the Hide default translation of page flag set.
Now the editors have used the news plugin with list of selected items. In the default language they picked the above mentioned articles of type internal link. Now TYPO3 generates a broken link to the page in the default language which is hidden.
Is there any way to prevent the link being generated in this setup?
Expected behaviour would be that TYPO3 / tx_news renders the link only when the target page is available.
My setup:
TYPO3 8.7.13
tx_news 6.3.0

Georg Ringer has fixed the problem: https://github.com/georgringer/news/commit/b7d49dd95f8dbc58fdec452f31b57935e5769549
The fix will be part of the next release of EXT:news.
Thx a lot to Georg for the fast fix!

Related

Typo3 10.4 How to add available language?

In the guide there is information to use create new language button:
But I don't have this button in 10.4 verions:
How to add available language?
I have read tons of pages in official guidleline, does you know better documentation for Typo3?
You need to create a record for each language that should be available in your TYPO3 installation first. To do so, go to the list module, select the root page (the most top page with page id=0) and create records there:
After that you can add the language to your site as shown in your screenshot.
I've checked the official documentation and it seems that this information is missing. I'll try to get that fixed!

TYPO3: News Detail View on Microsites

I am working with the extension news on TYPO3 9.5. I have a project with few microsites and I want to use the news there. In the microsite homesite news(list) works but when I click the link which points to a detailed view of news, this leads to 404 and it does not work.
Detailed view does not work on Microsite.
I tried configuring Starting Point without success. Do i have to configure categories?
Any idea where I can also check?
The Solution was to change TCA to "unique" (TYPO3 Core Routing) due to URL resolving.
More can you find here:
https://forge.typo3.org/issues/91397#note-12

How can I avoid duplicate content with TYPO3 v9 when having a news entry with multiple categories

I am working on a TYPO3 v10 LTS website with integration of the news extension v8.3.0. Many news are assigned to multiple categories and they are displayed on different detail pages according to their assigned categories. Now I would like to define one categories as master and use this category for the generation of canonical links to avoid duplicate content problems. On an older version of the website (TYPO3 v7 LTS) I used the solution explained here: https://www.typo3.net/forum/thematik/zeige/thema/116056/
I'm not so experienced with TYPO3 v9/v10 LTS yet, but I think that there must be a solution with routeEnhancers.
Any hints are welcome.
You need no route enhancer, just use the basic configuration of EXT:news.
one solution would be: for detail-view (show) always use one page. in this way each news will have a unique url. (problem: you can't ´return´ to the former list view with a hard link[1], as you don't know from which list you came)
2nd: configure a show-page with your news-categories: this page will be preferred for detail view (it always will be the first category) and each news will always be shown on this category detail page. (no ´return´ to the original list as above)
[1] you can't use a page as link target, but you can use javascript:history.back()

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 & tt_news - internal Link without language parameters

i have a Problem regarding TYPO3 and the extension tt_news.
I have a multilingual Site with 2 Languages, english and german. The news on the site are generatet by the extension tt_news - everything is working fine except one thing:
When i put an internal direct link in the news body, the language parameter is lost. So when the user klicks on the Link, it always comes back to the default language. How can i make TYPO3 generate the links with the selected language parameter, or how can i add them?