-
Notifications
You must be signed in to change notification settings - Fork 126
Notes for Integrators
- How do I set 'L' to the default language value without using it in the URL?
- My record titles are not unique. How do I use them in aliases?
- My URLs still look like /index.php?id=12345. What's the problem?
- My URLs look like /46/. What's the problem?
- RealURL does not work!
- I found a bug...
There are two ways people use languages with RealURL. Assuming that main language is German and secondary is French, here are two possible scenarios.
First scenario is when default language is omitted from URL. Example URLs will look like:
- German: /ernaehrung/rezepte/rezeptsuche/
- French: /fr/alimentation/recettes/recherche-de-recettes/
Second case id when default segment also present:
- German: /de/ernaehrung/rezepte/rezeptsuche/
- French: /fr/alimentation/recettes/recherche-de-recettes/
Selection is up to the integrator and its customer. RealURL allows both.
For the first case you configure RealURL as follows.
'preVars' => array(
0 => array(
'GETvar' => 'L',
'valueMap' => array(
'fr' => 1,
),
'noMatch' => 'bypass',
),
),
config {
sys_language_uid = 0
language = de
}
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
language = fr
}
[global]
For the second case configuration is different:
'preVars' => array(
0 => array(
'GETvar' => 'L',
'valueMap' => array(
'de' => 0,
'fr' => 1,
),
),
),
config {
sys_language_uid = 0
language = de
defaultGetVars {
L = 0
}
}
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
language = fr
}
[global]
You should use both RealURL and TypoScript for that. RealURL configuration will look like:
array(
'GETvar' => 'L',
'valueMap' => array(
'fr' => 1,
'it' => 2,
),
'noMatch' => 'bypass',
),
TypoScript will look like:
config {
language = de
sys_language_uid = 0
}
[globalVar = GP:L = 1]
config {
language = fr
sys_language_uid = 1
}
[globalVar = GP:L = 2]
config {
language = it
sys_language_uid = 2
}
[global]
RealURL appends numbers in such cases. However if you clear caches, URLs may change because numbers are appended on "first come – first served" basis. If you want to ensure unique URLs, use uid as a part of the alias:
array(
'GETvar' => 'tx_myext_plugin[uid]',
'lookUpMap' => array(
...
'alias_field' => 'CONCAT(title, '-', uid),
...
)
)
You forgot to enable RealURl in TypoScript using
config.tx_realurl_enable = 1
This does not happen with RealURL 2.x anymore. Upgrade from version 1.x to 2.x.
It does. Please, check you configuration and ask questions in TYPO3 mailing lists.
I can add very little to this classic writing...
The first thing you do is you ask in the TYPO3 mailing lists. If nobody else has this problem, than you have to double check that you do everything correctly (configuration, root page flags, database up to date, etc). Only than you write it in the bug tracker and put as many details as you can.