In the site configuration ((config|typo3conf)/sites/<sitename>/config.yaml), it is possible to configure the languages and choose a "Fallback type", e.g. "strict" or "fallback". I believe, this corresponds to the TypoScript setting config.sys_language_mode.
Now, how do the TypoScript settings and the settings in the site config.yaml work together?
On the Site handling > Add languages page, there is the following hint:
Used to older TYPO3 versions? The following TypoScript settings will be set based on config.yaml - you don’t need to have them in your TypoScript template:
config.language
config.locale_all
config.htmlTag_dir
config.htmlTag_langKey
config.sys_language_uid
config.sys_language_mode
config.sys_language_isocode
config.sys_language_isocode_default
What does this mean? The TS settings will take on the values of the yaml config, but can still be overridden with TypoScript? Which settings are used where?
What happens if you are using for example the bootstrap_package which sets config.sys_language_mode = content_fallback but you want to disable this setting so it uses what is configured in the config.yaml (for example, "strict")?
What happens if you do
config sys_language_mode >
in TypoScript? Does it use the config.yaml setting?
Why do the TypoScript settings still exist?
What is the recommended approach here, do you still need to tamper with the TS settings at all?
(My background is, I have an updated TYPO3 9 site, mostly, it works nicely, but when it comes to the language settings there are still some minor bugs on the site and I am still working on cleaning up the TypoScript settings. Also, I would like to understand this better and where the configuration is moving towards so I do not have to clean up twice.)
The settings you mentioned are all deprecated in TYPO3 Version 9 and have been removed in Version 10.
The corresponding changelog is here:
https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.0/Breaking-87193-DeprecatedFunctionalityRemoved.html
and on the long page is stated:
The following TypoScript options have been dropped:
config.concatenateJsAndCss
config.defaultGetVars
config.htmlTag_langKey
config.htmlTag_dir
config.language
config.language_alt
config.locale_all
config.sys_language_isocode
config.sys_language_isocode_default
config.sys_language_mode
config.sys_language_overlay
config.sys_language_uid
...
Related to version 9 your question might be useful as it has to be expected perhaps that some functionality might correlate. I never verified it, so I can't give an answer on it, but for Version 10 you can safely remove all those settings, for the case of any update.
Related
In my TYPO3 8.7.31 I have an error:
No TypoScript found. Did you already setup module.tx_femanager.settings.configPID in your PageTS?
As the error message says, you need to configure module.tx_femanager.settings.configPID in your Page TSConfig (not to confuse with TypoScript). This is necessary to make the TypoScript setting available also in the TYPO3 backend which is not the case by default.
As mentioned in the documentation you need to specify the page id (pid), where your main TypoScript settings (frontend) are stored. Usually you will take the root page of your installation.
To set the Page TSConfig, edit the page properties of your root page and switch to the tab Resources. There you can find a field Page TSConfig. In this field you need to put above mentioned setting.
A hint for your next question: please put more effort into your question! Let us know what you tried so far. And please do a proper formatting of your question.
The Problem can also appear, if you have set the
module.tx_femanager.settings.configPID = 1
in your root page ts
but not included the main settings (femanager) in the template.
in a site with a site definition for a foreign language
fallbackType: fallback
i need for one page branch a different bahavior. Up to TYPO3 8 i used an extension template with
config.sys_language_mode = strict
which did the job. But in TYPO3 9 with an existing site definition this entry seems not to work anymore. Accordiong to the manual
https://docs.typo3.org/m/typo3/guide-frontendlocalization/master/en-us/LocalizationModes/Index.html
it should work but it does not.
Any ideas?
Thanks!
The only possibility is a custom middleware handler. Look here for more details: Change language parameters in site configuration for some pages in a site
There is a conflict between two installed extentions in one page. I want to disable one of the extentions only for this specific Page.
Is there a way to accomplish this? Maybe somehow in Backend Templates?
On the page where you want to disable the extension you can create a template where you disable the extension by TypoScript:
plugin.tx_badextension >
tt_content.list.20.tx_badextension >
This works recursive, that means all sub-pages of the page where this snippet is included in a template are concerned too. If you want to enable the plugin on a sub-page again, you've to include there the TypoScript of the extension.
It's also possible to include the extension's TypoScript only on a few pages and not in the root-page. But the configuration is always inherited and has to be inversed if the plugin shall be activated or deactivated on sub-pages.
No, there are no way. Extensions can only disable for the complete TYPO3 installation.
EDIT:
Here is a way to disable this extension for a single pages like news page with typoscript.
// Skip tx_jhopengraphprotocol for single news view, as EXT:news adds dedicated og-properties
[globalVar = GP:tx_news_pi1|news > 0]
temp.tx_jhopengraphprotocol >
page.669 >
[global]
If you look in the setup.txt https://github.com/jonathanheilmann/ext-jh_opengraphprotocol/blob/master/Configuration/TypoScript/setup.txt
You should be able to deactivate it with
temp.tx_jhopengraphprotocol >
page.669 >
In your TypoScript for that page.
Depending on the way the extensions are included you might be able to deactivate the rendering of one extension.
Most extensions are configured in typoscript, where you can clear the corresponding part in an extension template (or TS condition) for your page.
either you deactivate the extension specific part (plugins.my_extension >)
or the inclusion in the page rendering (page.100 > if the extension was included like page.100 < plugin.my_extension)
or clear the configuration for plugins as subtree of tt_content tt_content.list.20.my_extension >
The way is dependent on your extension and might fail if the inclusion is done in other ways (e.g. hooks, signals)
I'm building several sites in a multisite TYPO3 v.8.7.1 installation and have created an extension for each site (site package) that includes the typoscript from the tx-news extension.
To rewrite the news extension url's I've added settings to the realurl.conf similar to the advanced example from the doc: https://docs.typo3.org/typo3cms/extensions/news/3.0.0/Main/Administration/Realurl/Index.html
Now, if possible I would like to migrate and sort the multisite realurl.conf settings to isolate each site's configuration in the respective site packages. Could I use the ext_localconf.php for this somehow?
And also I'm curious if it would be possible to set the fixedPostVars pageIds as TypoScript array variables in the setup or constants or the like to make these settings even more available for editing.
Thank you for your time!
We have such a solution using realurl (v2.1.0+) hooks:
https://bitbucket.org/reelworx/rx-typo3-sitesetup/src/e34b675a223f02580838fe7d5d118d7f07fd8a68/Classes/Hooks/RealUrl.php?at=master&fileviewer=file-view-default
and
https://bitbucket.org/reelworx/rx-typo3-sitesetup/src/e34b675a223f02580838fe7d5d118d7f07fd8a68/ext_localconf.php?at=master&fileviewer=file-view-default#ext_localconf.php-68
Thanks to Kleins answer and a lot of community support I've now managed to set up a solution that is working great.
First of all, when working with extension realurl rewriting, remember to delete realurl_autoconf.php and clear both typo3 and realurl cache during testing. Also check if realurl variables are applied in the typo3 Configuration Module
Solution 1, raw config
Just copy you config to ext_localconf.php
Solution 2, externalized config
This is more advanced and worked great for me. (Not sure if Kleins solution might be even better).
Create namespace class in Classes/RealUrlConf.php and include it in ext_localconf.php. Make sure to follow typo3's required conventions of filepath/namespace configuration.
Classes/RealUrlConf.php: https://pastebin.com/sg836BhJ
ext_localconf.php:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration']['coreRealUrlConf'] = 'Micke\\GenCore\\RealUrlConf->realUrlConfigurer';
If you want to use the setup just like this you can uncomment the definition and application of the pageIds in the Classes/RealUrlConf.php.
Solution 3, separate core config from site extensions
I have created a core package that is drawn as a dependency from the individual site packages in our installation. So in my case I'm settings only the configuration (without yet applying the pageIds) in the core, which is the config mentioned above. In this case without uncommenting anything.
For each individual sitepackage I then set up a similar configuration that just defines pageIds and applies the core configuration to them. In this was the pageIds are isolated in the individual site packages while most of the configuration resides in the core.
Classes/RealUrlConf.php: https://pastebin.com/A2xUvrJm
ext.localconf.php:
// Include realurl configuration with page IDs
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration'][$_EXTKEY . 'realUrlVars'] = 'Micke\\RieSitepack\\RealUrlConf->realUrlConfigurer';
Good Luck!
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.