Import from tt_news with additional fields in tt_news and news (TYPO3 8 LTS) - typo3

import from tt_news in TYPO3 8 LTS with actual news and news_ttnewsimport is working fine. But we had some individual fields in tt_news and i want to import theese fields too in individuel fields in news.
So i made a new extension which extends news with individual fields. It is working fine: i can edit them in the backend and print content in the frontend.
Then i modified getImportData() in TTNewsNewsDataProviderService of news_ttnewsimport and added my new fields. The content of the individual fields of tt_news is fetched, i controlled it with a log-file. But the content was not written in the database ... I controlled the getter and setter in my configuration of news but all seems correct.
After some debugging i found that all commands which write the content in news are hardcoded in news/Classes/Domain/Service/NewsImportService.php:
$news->setAuthor($importItem['author']);
After adding my fields all works:
$news->setMyNewField($importItem['my_new_field']);
So my problem is fixed ... well some how: it seems dirty to change a class of an extension in order to handle individual fields.
Is there a correct possibility to make the import work with individual fields, without patching news?
Thanks!

In version 7 of tx_news i found the answer of my question ... i don't know wether it exists in older versions but in 7.1 it is possible to use a signal slot for this task:
link to the manual: Prehydrate slot

Related

TYPO3 - Gridelements and nested flux content elements not visible in backend

Extension versions:
Flux: Fluid Integration - 9.3.2
Gridelements - 8.6.3
During an upgrade from 6.2 to 8.7.32, a website uses gridelements extension and Flux. We have some gridcontainers created with the gridelements extension and flux (CE's) nested inside these. Now the content elements are created but they don't get set properly inside the gridelement containers. Unless I create the flux elements outside the gridelement and then drag in inside.
In the database I can see that the fields are not properly assigned when created inside the gridelement:
Don't mind the typo, "Created outside parent container"
So that element with 0|0 on tx_gridelements_container and tx_gridelements_columns respectivly is not displayed in the backend and only visible in the list mode.
Now, this is strange because I checked the data types on the database and it seems alright. I had other similar pages that I've upgraded as well and no one had this issue after migrating to 8.7.32, since this issue only occurred in 6.2.x versions.
The allowed elements are set to all, as well as in the other TYPO3 where this issue is not occurring. Does anyone know what could I try to fix this? I'm running out of options and I couldn't find much at TYPO3 Slack, stack overflow and similars.
Are the necessary fields displayed in the editing form of those Flux elements?
To make Gridelements and their children work properly, you will need the Gridelements backend-layout, container and column fields defined for those elements. Otherwise they will get their default values, which is 0 in case of Gridelements.

TYPO3 9.5.15 with gridelements and t3sbootstrap not working

I have a new TYPO3 9.5.15 installation and added gridelements 9.5.0 and t3sbootstrap 4.4.5 to make content elements with 3 columns in a own 1 column backendlayout which is defined in PageTsConfig.
In older TYPO3 versions, this is working fine (i.e TYPO3 7) but in TYPO3 9 I get the following error in FE:
Tried resolving a template file for controller action "Standard->three_columns" in format ".html", but none of the paths contained the expected template file (Standard/Three_columns.html). The following paths were checked:
xxx/typo3/sysext/fluid_styled_content/Resources/Private/Templates/, xxx/typo3conf/ext/gridelements/Resources/Private/Templates/, xxx/typo3conf/ext/t3sbootstrap/Resources/Private/Templates/Content/, xxx/typo3conf/ext/t3sbootstrap/Resources/Private/Templates/, ,
I've double checked and can confirm, that both, gridelements and t3sbootstrap are included in the roottemplate of the website.
As far as I found out, the templates are available in xxx/typo3conf/ext/t3sbootstrap/Resources/Private/Templates/Gridelements/
but are called ThreeColumns.html
Has anyone an idee what causes the error and how to resolve it?
Thanks in advance
At a first look it seems that there are 2 problems with your combination here:
The message "Standard->three_columns" points to a wrong static template, so I guess you included the new DataProcessing static of Gridelements, while t3sbootstrap depends on the old Plugin and USER based static.
The root path xxx/typo3conf/ext/t3sbootstrap/Resources/Private/Templates/Gridelements/ is missing in your setup.
At a second look it might even be enough to change the Gridelements static, since t3sbootstrap takes care of the root path based on that setup.

TYPO3 files in impexp

When I export a t3d from one system (TYPO3 6.2) and import it in a second system (TYPO3 8.7) the content images changes. I've expected the image is also transferred from one system to the other, but TYPO3 seems to just say "the imported content element has sys_file with UID 123, so I still use this file", but this UID references to a totally dfferent image in the second TYPO3 system.
The images from standard content elements are not exported, if option „[ALL tables]“ or options „sys_file*“ are choosed for „Use static relations for tables“. Don’t select these options and your export will contain the images.
Also see forge.typo3.org/issues/82047. Thanks to Christian Kuhn for working this out.

Manage hierarchy / enforce priority of TS-templates

Well, there is actually another guy with exact the same problem. But until today, they didn't come up with a solution, that's why I'm asking it once again.
My entire TS is included by an extension in TYPO3 7.6.8. This works fine except with indexed_search. The TS inside my resources EXT get overwritten by the indexed_search default TS.
This is the order of the TS inside the Template-Analyzer:
SYS: TYPO3_CONF_VARS:FE:defaultTypoScript
EXT:fluid_styled_content/Configuration/TypoScript/...
... a bunch of other third party extensions ...
EXT:indexed_search/Configuration/TypoScript
EXT:templates_ext/Resources/Private/TypoScript
extbase
fluid
extensionmanager
belog
beuser
felogin
indexed_search
sys_note
realurl
So #7 is the extension which includes all my TS but it gets overwritten by #14. The only way to configure the indexed_search is inside the setup of the page template (which comes after all those above). But I want to avoid that to keep things clean.
Is there a way to prioritize a certain TS so that it doesn't get overwritten?
Open the TypoScript record, switch to the tab "Includes", at the bottom you will find the field Static Template Files from TYPO3 Extensions:. Select the value Include before all static templates if root flag is set.
Try putting the TS from your template extension inside the root page Setup field like this (adjust the path if necessary, your example says Resources/Private/TypoScript?):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_ext/Configuration/TypoScript/setup.ts">
This should make sure that it is included AFTER all the other includes (I assume you included those via the includes tab?)

TYPO3 news (tx_news) ordering of records not working

I'm running TYPO3 V6 and the latest version of tx_news (not tt_news) and when I attempt to change the order of sorting for the LIST display, the settings in the plugin are not overriding the Typoscript settings. There doesn't seem to be a way to change to sort order of articles in the list view. I am aware that flagging a news record as "top news" will float it to the top of the list, but none of my records have that flag set.
Has anyone else had this problem?
I got the same problem: My listview always showed the oldest news on the top. I've been searching for a solution for hours. As i wanted to start to change the extension files manually, I found the "setup.txt" in the configuration folder. From there I copied the following code into my Typoscript. The problem is solved now.
plugin.tx_news{
settings{
overrideFlexformSettingsIfEmpty = cropMaxCharacters,dateField,timeRestriction,orderBy,orderDirection,backPid,listPid,startingpoint,recursive
orderBy = datetime
orderDirection = desc
orderByRespectTopNews = 0
orderByAllowed = sorting,author,uid,title,teaser,author,tstamp,crdate,datetime,categories.title
list{
paginate {
itemsPerPage=4
insertBelow=TRUE
lessPages=TRUE
#forcedNumberOfLinks=3
pagesBefore=1
pagesAfter=1
}
}
}
}
You can ignore the pagination lines. Important is the orderby stuff.
Typo3 Version: 4.7 (not my fault :D )
News System Version: 2.3
Found the solution to this one - basically I had been loading the TS setup code from an external file, which was overriding the default TS setup from the Typoscript template setup field, or rather, it wasn't. I duplicated the TS code in the Typoscript template and the external file and finally it is being recognised and the fields can be sorted.