I have this Language-ID´s for the TYPO3 Backend:
0 = DE
1 = EN
2 = ES
3 = CN
And now i need a Fallback for the Language ES and CN to the Content EN (id=1).
How can i do this?
Thanks for help
config.sys_language_mode with content_fallback is your friend. Look here: https://docs.typo3.org/typo3cms/TyposcriptReference/8.7/Setup/Config/#sys-language-mode
Related
Before the update to TYPO3 9.5 I used the following condition syntax in setup.typoscript to enable sending an email to the sender using a checkbox in the frontend form:
[globalString = GP:tx_powermail_pi1|field|emailanabsender|0 = ]
plugin.tx_powermail.settings.setup.sender.enable = 0
[else]
plugin.tx_powermail.settings.setup.sender.enable = 1
[global]
What should the symfony condition syntax look like for this purpose?
According to my logic, the following should work, but it does not:
[traverse(request.getParsedBody(), 'tx_powermail_pi1/field/emailanabsender/0')]
plugin.tx_powermail.settings.setup.sender.enable = 1
[else]
plugin.tx_powermail.settings.setup.sender.enable = 0
[global]
Can anyone help me with this?
I got It.
The correct syntax for TYPO3 >= 9 is:
[traverse(request.getParsedBody(), 'tx_powermail_pi1/field/emailanabsender/0') == '']
plugin.tx_powermail.settings.setup.sender.enable = 0
[else]
plugin.tx_powermail.settings.setup.sender.enable = 1
[global]
The docs says: "In case the path is not found in the array, an empty string is returned."
Data from the POST request can be read with request.getParsedBody(), and
if the checkbox is unchecked, then it's missing in the POST-request.
What about this:
[traverse(request.getQueryParams(), 'tx_powermail_pi1/field/emailanansender/0') > 0]
I've been working on making my Typo3 11.5 powered site multi-language. To translate the bulk of my content elements I want to use DeepL via https://github.com/web-vision/wv_deepltranslate. While the manually translated pages are shown correctly in frontend, there is still some configuration missing as wv_deepltranslate is not working and its settings screen is showing 'No system languages found.'. The Deepl API Key and the Deepl API Url are set, the translate button is appearing when creating a translation, but pressing it only copies the content element in its original language. I have no clue what setting needs to be made to make the extension work and not show 'No system languages found.' anymore.
My relevant Typoscript setup is
config.sys_language_uid = 0
config.language = de
config.locale_all = de_DE
[globalVar = GP:L = 1]
config.sys_language_uid = 0
config.language = en
config.locale_all = en_EN
[global]
[globalVar = GP:L = 0]
config.sys_language_uid = 0
config.language = de
config.locale_all = de_DE
[global]
and the site config says
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_DE
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
languageId: 0
websiteTitle: ''
-
title: English
enabled: false
base: /en/
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: English
hreflang: en
direction: ''
fallbackType: strict
fallbacks: ''
flag: en-us-gb
languageId: 1
Edit:
Fixed the 'No system languages found.' by creating the corresponding languages in the list menu on the page root.
Try this:
config {
language = de
locale_all = de_DE.UTF-8
linkVars = L(0-1)
sys_language_uid = 0
}
[siteLanguage("locale") == "en_US.UTF-8"]
config {
language = en
locale_all = en_US.UTF-8
sys_language_uid = 1
}
[end]
Many TypoScript properties you're using are not existing anymore in TYPO3 Version 11. They have been removed in favor of the siteconfiguration.
See in the Changelog/10.0/Breaking-87193-DeprecatedFunctionalityRemoved.html.
Also like #Robert included in his answer already the conditions did change and something like [globalVar = GP:L = 1] is not understood by TYPO3 anymore. Details about the new syntax you can find in the TypoScript Reference, including a link to a more general explanation.
According to the documentation I doubt that the settings by TypoScript are required anyway, the configuration is done in a special module.
We're developing a website for a customer which is operating all over the world. So we have 72 website languages in TYPO3 (0 = en_CH, 1 = de_CH, 2 = de_DE ...), but there are only 5 "real" languages (EN, DE, FR, ES, JA).
We want it to make as easy as possible for our customer to maintain the content so we work a lot with the "Insert records" content element and "Show content from page" pages. This works fine for normal content elements. But of course not with Extbase records which we want also have only one time in a real language.
So we tried to set config.sys_language_mode = content_fallback;1,0 as example for all german website versions (de_CH, de_DE). We also have the fallback settings in the sites config. Of course the Extbase records are all translated already in the 5 real languages.
Screenshot from the Backend
Typoscript
Swiss - German
[siteLanguage("languageId") == '1']
config {
htmlTag_setParams = lang="de-CH"
language = de
locale_all = de_CH
sys_language_uid = 1
sys_language_overlay = 1
}
[global]
Germany - German
[siteLanguage("languageId") == '2']
config {
htmlTag_setParams = lang="de-DE"
language = de
locale_all = de_DE
sys_language_uid = 2
sys_language_mode = content_fallback;1,0
sys_language_overlay = 1
}
[global]
Sites configuration
-
title: 'Switzerland (CH), German (Default)'
enabled: true
languageId: '1'
base: /ch-de/
typo3Language: de
locale: de_CH
iso-639-1: de
navigationTitle: ''
hreflang: de-CH
direction: ''
fallbackType: fallback
fallbacks: '0'
flag: ch
-
title: 'Germany (DE), German'
enabled: true
languageId: '2'
base: /de-de/
typo3Language: de
locale: de_DE
iso-639-1: de
navigationTitle: ''
hreflang: de-DE
direction: ''
fallbackType: fallback
fallbacks: '1,0'
flag: de
I expect that with these settings, the fallback should work but the output is always in english (0 = en_CH). We have TYPO3 9.5.8 installed.
You can reproduce the problem with the second link. There should be the same content as you see with the first link.
https://www.jakob.com/ch-de/produkte
https://www.jakob.com/de-de/produkte
EDIT: You can't reproduce the problem right now with these 2 links.
EDIT: This might be a problem related to this bug (marked as solved but see below).
https://forge.typo3.org/issues/86762
In the comments, some people still have the problem.
https://forge.typo3.org/issues/86762#note-40
https://forge.typo3.org/issues/86762#note-55
If you need more informations, please tell me.
Any help is very welcome!
I get a conflict in EXT:realUrl because of a page with the same name in both domains.
domain.com/contact.html
mobile.domain.com/contact.html
I got this setup:
The realurl configuration in PHP both with their own rootpage_id:
['EXTCONF']['realurl']['_DEFAULT']
['EXTCONF']['realurl']['mobile.domain.com']
TypoScript:
config.baseURL = http://mobile.domain.com/
config.tx_realurl_enable = 1
config.typolinkCheckRootline = 1
config.typolinkEnableLinksAcrossDomains = 1
config.typolinkLinkAccessRestrictedPages = NONE
config.prefixLocalAnchors = all
config.content_from_pid_allowOutsideDomain = 1
Is there something missing in my configuration?
What could I do to solve the conflict?
When you have following steps
Step 1
$TYPO3_CONF_VARS['EXTCONF']['realurl']['mobile.example.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['mobile.example.com']['pagePath']['rootpage_id'] = 999;
Step 2
Add Domain Entries on the rootpages
Step 3
Add setup condition
[globalString = IENV:HTTP_HOST=www.example.com]
config.baseURL = http://www.example.com/
[end]
Step 4
Clear all caches (realUrl caches inkl.)
Greetings
I'm getting the following error while trying a wildcard(*) enabled search in Sphinx 2.0.6
index products: syntax error, unexpected $undefined near '*'
My search term is iphone 4s*
It's using the products index as defined below.
index users
{
enable_star = 1
docinfo = extern
morphology = stem_en
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
ignore_chars = U+0021..U+002F,U+003A..U+003F,U+0060
charset_type = utf-8
html_strip = 0
source = gdgt_user
path = /var/lib/sphinxsearch/data/gdgt/users
min_infix_len = 3
min_word_len = 3
}
index products : users
{
enable_star = 1
min_infix_len = 1
min_word_len = 1
source = gdgt_products
path = /var/lib/sphinxsearch/data/gdgt/products
}
I am using the php api that can be found in the source tar ball.
I am able to see the error when using search CLI.
search -c app/config/sphinx.compiled.conf -i products -e "ipho*"
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file 'app/config/sphinx.compiled.conf'...
index 'products': search error: .
My php code looks like
$client = new SphinxClient();
$client->SetServer($serverIp, $serverPort);
$client->SetMaxQueryTime(5000);
$client->SetSortMode(SPH_SORT_RELEVANCE);
$client->SetMatchMode(SPH_MATCH_EXTENDED);
$res = $client->query('ipho*', 'products');
var_dump($res, $client->getLastError(), $client->getLastWarning());
The issue is that star(*) for wildcard is also in your ignore_chars (U+002A).
Update it to:
ignore_chars = U+0021..U+0029,U+002B..U+002F,U+003A..U+003F,U+0060