I have a vCard-solution that worked fine with TYPO3 version 8 and realURL but doesn't work with TYPO3 9.5.
vCard is triggered with an URL like:
mywebsite.de/de/vcard.html?staffid=123&type=5000
Configuration:
1) staffid=123 loads the values of staff member with ID 123 into the vCard:
[globalVar = GP:staffid=123]
VCARD_name = vcard-schneider-martin.vcf
N_name = N:Schneider;Martin;;;Martin Schneider
[...]
[global]
2) in order to load the special PAGE type the TypoScript is:
vCard = PAGE
vCard {
typeNum = 5000
config {
disableAllHeaderCode = 1
additionalHeaders = Content-Type:text/x-vcard|Content-Disposition: attachment; filename="{$VCARD_name}"
[...]
}
}
How does the routeEnhancers (of config.yaml) has to be configured in order to make TYPO3 9.5 starting the vCard PAGE object with typeNum=5000 and render the vCard for the team member with the current value of GP variable "staffid" (from the URL)?
Thanks!
I use this configuration for sitemap.xml with pageType 1533906435 and backslash für pageType 0 (section map of my config):
routeEnhancers:
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
sitemap.xml: 1533906435
see also:
https://usetypo3.com/xml-sitemap-in-typo3.html
How can I show Exception in Debug Mode (Install -> Presets) in FE?
I'm using LTS 7.6.29
My TYPO3 configuration is
1 BE/debug
1 FE/debug
* SYS/devIPmask
1 SYS/displayErrors
file SYS/enableDeprecationLog
1 SYS/sqlDebug
0 SYS/systemLogLevel
1 SYS/clearCacheSystem
config.contentObjectExceptionHandler = 0
PHP.ini
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
You've to use this setting in TypoScript to show Error-Messages in Frontend:
config {
contentObjectExceptionHandler = 0
}
In the file LocalConfiguration.php you've to set following values, it's explained how to set them by using the installtool:
SYS
Try, to disable the TYPO3 exception handlers in general:
System > Install > "All Configuration"
Filter by (search-field): exceptionhandler
Set empty values:
[SYS][productionExceptionHandler] =
[SYS][debugExceptionHandler] =
[SYS][errorHandler] =
After debugging set exception handling to the default values:
[SYS][productionExceptionHandler] =
TYPO3\CMS\Core\Error\ProductionExceptionHandler
[SYS][debugExceptionHandler] = TYPO3\CMS\Core\Error\DebugExceptionHandler
[SYS][errorHandler] = TYPO3\CMS\Core\Error\ErrorHandler
After changing the settings you've to delete the file typo3temp/autoload/autoload_classmap.php that the changed settings are applied to the system. The file will be new created but with a bit different content.
You can delete the file too in installtool by deleting the autoload-information.
Most is explained here: https://docs.typo3.org/typo3cms/extensions/launch/Administrators/03_Errorhandling/09_OopsAnErrorOccured/Index.html
I am trying to create a template which can be reused in TYPO3. I want to offer it as a free extension for the community. Currently I am following the standards specified in youtube video series https://www.youtube.com/watch?v=HtBmim7pc0o and https://www.sitepackagebuilder.com/ ) and https://github.com/benjaminkott/bootstrap_package.
I need to 'MASK' the template but cannot get access to relevant Tutorials. Can anybody help me out?
Thanks in advance.
Regards
In bootstrap_package/Configuration/TypoScript/constants.typoscript you see:
page.fluidtemplate {
# cat=bootstrap package: advanced/100/100; type=string; label=Layout Root Path: Path to layouts
layoutRootPath = EXT:bootstrap_package/Resources/Private/Layouts/Page/
# cat=bootstrap package: advanced/100/110; type=string; label=Partial Root Path: Path to partials
partialRootPath = EXT:bootstrap_package/Resources/Private/Partials/Page/
# cat=bootstrap package: advanced/100/120; type=string; label=Template Root Path: Path to templates
templateRootPath = EXT:bootstrap_package/Resources/Private/Templates/Page/
}
Or:
###############
### FELOGIN ###
###############
styles.content.loginform {
templateFile = EXT:bootstrap_package/Resources/Private/Templates/FrontendLogin/FrontendLogin.html
}
This part tells the templates are loaded from those paths. To override (you say mask i believe) place a copy (which you are going to edit) inside a folder and put in your constants file:
page.fluidtemplate {
layoutRootPath = fileadmin/folder/folder/Layouts
partialRootPath = fileadmin/folder/folder/Partials
templateRootPath = fileadmin/folder/folder/Templates
}
Or:
styles.content.loginform {
templateFile = fileadmin/folder/folder/yourcopyofthefile.html
}
So you can override single templates and entire template folders. Copy the files from an extensions "Resources/Templates" or "Resources/Partials" etc.
Constants can be edited with a constants file set in the backend at Your Root Template (default root template) > Edit > General > Constants field and use :
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/folder/folder/typoscript/constants.ts">
Or directly in that field use the code for your override.
Hopefully it helps you further.
I try to automaticly set the language in my typo3 6.2 One-Tree Page.
To my setup, I use RealURL to add the langauge to the URL, I use the default Lparameter. I DON'T use ISO codes for the languages, but I use static_info_tables to set the ISO Code. For the language switch I try to use the extention rlmp_language_detection but it does not work.
My language config (typo3name, Official ISO Code - selected with static_info_tables, ID - used for Lparameter)
default, -, 0
en-jp, en, 1
en-us, en, 2
jp-jp, ja, 3
My Typoscript for the plugin:
plugin.tx_rlmplanguagedetection_pi1 {
useOneTreeMethod = 1
defaultLang = en
}
My Typoscript for langauges:
config {
sys_language_uid = 0
language = en
locale_all = en-eu
}
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
language = en
locale_all = en-us
}
[global]
[globalVar = GP:L = 2]
config {
sys_language_uid = 2
language = en
locale_all = en-jp
}
[global]
[globalVar = GP:L = 3]
config {
sys_language_uid = 3
language = jp
locale_all = jp-jp
}
[global]
To test it I set my first langauge to japanese and when I request the rootpage this is in my request-header:
Accept-Language:ja,de-DE;q=0.8,de;q=0.6,en-US;q=0.4,en;q=0.2
http://mybrowserinfo.com/ say:
Language:Japanese
System Language:Not detectable with this browser
User Language:de
But no L Parameter is set at all, so I get the default language.
I've had same problems:
How i made it works step by step:
1 Step:
install static_info_tables be careful it should be in DB utf-8 charsetin latin1 (in my case) don't work
2 Step:
istall rlmp_language_detection
3 Step:
check if on you server installed php-geoip php module, if not install Ext: ml_geoip or any way install it.
4 Step
include static templates in your TS template
5 Step
Pls don't forget to choose ISO code of toy lang in base line pages tree
6 Step
TS settings - add this after all lang configuration
plugin.tx_rlmplanguagedetection_pi1 {
# this mean that you hav ejust one tree pages for all lang, for multi trees look manual
useOneTreeMethod = 1
#important - this your website sys_language default
defaultLang = ru
# use -1 when you wont to test redirect, after change to 0
cookieLifetime = -1
# you defind which method will be used for redirect browser or ip, better testing just with one
testOrder = browser,ip
# we can config aliases like "code = lang1, lang2"
languageAliases >
languageAliases {
ua = uk,en
en = en
ru = ru,en
}
#we can country codes dependencies "country code = lang"
countryCodeToLanguageCode >
countryCodeToLanguageCode {
ua = uk
us = en
gb = en
nz = en
au = en
ie = en
ca = en
by = ru
}
#this just limit input params array
limitToLanguages = ru,uk,en
}
# ok just after all we include ext to page, on ts begining you shoud to have "page = PAGE" just check
page.1007 = < plugin.tx_rlmplanguagedetection_pi1
I'd suggest using .htaccess to redirect the browser acceptance language. This saves you loading up the whole TYPO3 instance just to do a redirect.
Depending on weather you use realurl it would look something like this:
RewriteCond %{HTTP:Accept-Language} ^en-us [NC]
RewriteRule ^$ /en-us/ [L,R=307]
RewriteCond %{HTTP:Accept-Language} ^ja [NC]
RewriteRule ^$ /jp/ [L,R=307]
RewriteCond %{HTTP:Accept-Language} ^en-gb [NC]
RewriteRule ^$ /en-eu/ [L,R=307]
I don't know how to target en-jp though.
On our websites we use the 307 as status code, so the browser will always look for the initial page (in case the structure changes), also it doesn't affect SEO.
I started working on a multilangual Zend Framework application and I've been stucked on something I hate:
The locale is not working like expected.
There's the .ini config:
; Locale
resources.locale.default = "fr"
resources.locale.force = false
resources.locale.cache = "locale"
resources.locale.registry_key = "Zend_Locale"
; Translate
resources.translate.adapter = Ini
resources.translate.content = APPLICATION_PATH "/../data/locales"
resources.translate.scan = Zend_Translate::LOCALE_DIRECTORY
resources.translate.options.tag = "Zend_Translate"
resources.translate.options.logUntranslated = true
resources.translate.options.disableNotices = false
resources.translate.options.logMessage = "Untranslated message within '%locale%': %message%"
resources.translate.options.logPriority = 5
resources.translate.options.registry_key = "Zend_Translate"
resources.translate.cache = "languages"
resources.translate.locale = "auto"
My filename are:
/locales/en.ini
/locales/fr.ini
When I do a simple $this->translate('COPYRIGHT');, it always return the french translation. Even if my computer is in english. I tried adding force = true to the locale and changing it to en_US but without success.