I got a website to move to our server and I have successfully moved it.But I have noticed some strange thing.Site doesn't render Danish characters (only special characters).When when I try to save using htmlarea in admin section and I can save Lorem Ipsum with any issue.But special danish characters are seems saving to database but when I open htmlarea it shows nothing.
Seems me there should be some configuration or settings to do.I tried to change character set but didnt work.Then whole db and table change to Utf8.No luck.
Anyone is having an idea to fix this?
please mentioned the place and page name as I am totally newbie to typo3
Thanks
More info regarding typo3 ond utf8 you can find there - http://wiki.typo3.org/UTF-8_support (TYPO3 UTF-8 support). Which TYPO3 version you have?
I think you have to modify your page typoscript configuration.
set htmlSpecialChars = 0 at the time of both entryHTMLparser_db and exitHTMLparser_db.
Use below page typoscript configuration. Might be your problem will be solved.
mod.SHARED {
defaultLanguageFlag = de
defaultLanguageLabel = Deutsch
}
# Classes. Do not forget to define them in the CSS class
RTE.classes {
# lists
checklist {
name = Checkliste
}
# tables
table {
name = Normale Tabelle
}
table-condensed {
name = Verkürzte Tabelle
}
table-bordered {
name = Tabelle mit Rahmen
}
table-styled {
name = Tabelle mit anderem Design
}
table-striped {
name = Tabelle mit Streifen
}
table-hover {
name = Tabelle mit Hover-Effekt
}
# aligns
align-justify {
name = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyfull
}
align-left {
name = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyleft
value = text-align: left;
}
align-center {
name = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifycenter
value = text-align: center;
}
align-right {
name = LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyright
value = text-align: right;
}
csc-frame-frame1 {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:frame-frame1
value = background-color: #EDEBF1; border: 1px solid #333333;
}
csc-frame-frame2 {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:frame-frame2
value = background-color: #F5FFAA; border: 1px solid #333333;
}
important {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:important
value = color: #8A0020;
}
name-of-person {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:name-of-person
value = color: #10007B;
}
detail {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:detail
value = color: #186900;
}
component-items {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:component-items
value = color: #186900;
}
action-items {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:action-items
value = color: #8A0020;
}
component-items-ordered {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:component-items
value = color: #186900;
}
action-items-ordered {
name = LLL:EXT:rtehtmlarea/res/contentcss/locallang.xml:action-items
value = color: #8A0020;
}
style1 {
name = Stil 1
}
htmlCode {
name = HTML Code
}
phpCode {
name = PHP Code
}
}
RTE.classesAnchor {
externalLink {
class = external-link
type = url
titleText = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:external_link_titleText
}
externalLinkInNewWindow {
class = external-link-new-window
type = url
titleText = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:external_link_new_window_titleText
}
internalLink {
class = internal-link
type = page
titleText = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:internal_link_titleText
}
internalLinkInNewWindow {
class = internal-link-new-window
type = page
titleText = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:internal_link_new_window_titleText
}
download {
class = download
type = file
titleText = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:download_titleText
}
mail {
class = mail
type = mail
titleText = LLL:EXT:rtehtmlarea/res/accessibilityicons/locallang.xml:mail_titleText
}
more-link {
class = more-link
type = page
titleText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:more_link_titleText
altText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:more_link_altText
}
button-link {
class = btn
type = page
titleText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:more_link_titleText
altText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:more_link_altText
}
next-link {
class = ym-button ym-next
type = page
titleText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:next_link_titleText
altText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:next_link_altText
}
back-link {
class = back-link
type = page
titleText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:back_link_titleText
altText = LLL:EXT:fluxtemplate/Resources/Private/Language/locallang.xml:back_link_altText
}
}
RTE.default {
showButtons = *
## Enable the image button
showButtons := addToList(image)
defaultContentLanguage = de
// Make possible to read classes from the contentCSS CSS file
buttons.textstyle.tags.span.allowedClasses >
buttons.textstyle.tags.REInlineTags >
buttons.textstyle.REInlineTags >
buttons.blockstyle.tags.table.allowedClasses >
buttons.blockstyle.tags.p.allowedClasses >
buttons.blockstyle.tags.div.allowedClasses = align-left, align-center, align-right
buttons.blockstyle.tags.div.allowedClasses := addToList(csc-frame-frame1, csc-frame-frame2)
buttons.blockstyle.tags.table.allowedClasses = csc-frame-frame1, csc-frame-frame2
buttons.blockstyle.tags.td.allowedClasses = align-left, align-center, align-right
buttons.textstyle.tags.span.allowedClasses = important, name-of-person, detail
contentCSS = typo3conf/ext/fluxtemplate/Resources/Public/CSS/rte.css
buttons.formatblock.prefixLabelWithTag = 1
buttons.link.relAttribute.enabled = 1
buttons.link.queryParametersSelector.enabled = 1
buttons.link.properties.class.allowedClasses = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
buttons.link.page.properties.class.default = internal-link
buttons.link.url.properties.class.default = external-link-new-window
buttons.link.file.properties.class.default = download
buttons.link.mail.properties.class.default = mail
buttons.image.properties.class.allowedClasses = img-responsive
// Disable contextual menu
contextMenu.disabled = 1
// Display status bar
showStatusBar = 1
//More toolbar options
keepButtonGroupTogether = 1
// Use CSS formatting when possible
useCSS = 1
// Make rtehtmlarea resizable
rteResize = 1
proc {
allowedClasses = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
allowedClasses := addToList(detail,align-left, align-center, align-right, align-justify, csc-frame-frame1, csc-frame-frame2, component-items, action-items, component-items-ordered, action-items-ordered, important, name-of-person, indent, img-responsive)
allowedClasses < RTE.default.classesCharacter
# auskommentieren, damit klassen eingelesen werden können
#allowedClasses := addToList( dimmed,highlight,box,info,success,warning,error,float-left,float-right,center,align-left,align-center,align-right,align-justify,style1 )
## TAGS ALLOWED OUTSIDE P & DIV
allowTagsOutside := addToList( pre, img )
allowTags := addToList( pre )
// Tags allowed in Typolists
allowTagsInTypolists = br,font,b,i,u,a,img,span
// Keep unknown tags
dontRemoveUnknownTags_db = 1
// Allow tables
preserveTables = 1
entryHTMLparser_db = 1
entryHTMLparser_db {
// Tags allowed
allowTags < RTE.default.proc.allowTags
// Tags denied
denyTags >
// HTML special characters
htmlSpecialChars = 0
// Allow IMG tags
tags.img >
// Additionnal attributes for P & DIV
tags.div.allowedAttribs = class,style,align
tags.p.allowedAttribs = class,style,align
// Tags to remove
removeTags = center, font, o:p, sdfield, strike, u
// Keep non matched tags
keepNonMatchedTags = protect
}
// HTML parser
HTMLparser_db {
// Strip attributes
noAttrib = br
// XHTML compliance
xhtml_cleaning = 1
}
// Exit HTML parser
exitHTMLparser_db = 1
exitHTMLparser_db {
// Remap bold and italic
tags.b.remap = strong
tags.i.remap = em
// Keep non matched tags
keepNonMatchedTags = 1
// HTML special character
htmlSpecialChars = 0
}
}
}
RTE.default.FE < RTE.default
RTE.default.FE.showButtons < RTE.default.showButtons
RTE.default.FE.proc.allowTagsOutside < RTE.default.proc.allowTagsOutside
RTE.default.FE.proc.entryHTMLparser_db.tags.img >
// PageTSConfig
TCEFORM.tt_content.header_layout.altLabels {
0 = H1 (Default)
1 = H1
2 = H2
3 = H3
4 = H4
5 = H5
}
I also have same problem in my another project.
First set default_charset to utf8 in your php.ini file.
or you can manuaaly set it with below PHP code:
ini_set('default_charset', 'utf8');
Related
I need to be able to search by the News Tags property.
This typoscript is working fine, but when I input a tag (exact same string) from a News into Solr's search box I don't get any results.
According to "lorenz" in this answer I neede to add my dynamic fields (I believe) to "plugin.tx_solr.query.fields" but this poor documentation doesn't help me.
I added the following to that typoscript but when I use the searchbox to look for exactly the name of my tag I get no results.
(plugin.tx_solr.query.fields = tags_stringM)
Does anybody have any code that I can use as an example?
plugin.tx_solr{
search {
initializeWithEmptyQuery = 1
showResultsOfInitialEmptyQuery = 1
showEmptyFacets = 1
faceting = 1
faceting {
facets {
mediatype {
label = Facet dos
field = categorytitle_stringS
}
}
}
}
index.queue {
custom_news = 1
custom_news {
table = tx_news_domain_model_news
fields {
abstract = teaser
author = author
authorEmail_stringS = author_email
title = title
datetime_stringS = TEXT
datetime_stringS {
field = datetime
date = d.m.Y H:i
}
titlehr_stringS = TEXT
titlehr_stringS {
field = title_hr
}
teaser_stringS = TEXT
teaser_stringS {
field = teaser
}
datetime_dateS = TEXT
datetime_dateS {
field = datetime
date = Y-m-d\TH:i:s\Z
}
content = SOLR_CONTENT
content {
cObject = COA
cObject {
10 = TEXT
10 {
field = bodytext
noTrimWrap = || |
}
20 = TEXT
20 {
field = tags_stringM
noTrimWrap = || |
}
}
}
categorytitle_stringS = SOLR_RELATION
categorytitle_stringS {
localField = categories
multiValue = 1
}
categoryuid_stringS = SOLR_RELATION
categoryuid_stringS {
localField = categories
foreignLabelField = uid
multiValue = 1
}
keywords = SOLR_MULTIVALUE
keywords {
field = keywords
}
tags_stringM = SOLR_RELATION
tags_stringM {
localField = tags
label = Tags
multiValue = 1
}
tagshr_stringM = SOLR_RELATION
tagshr_stringM {
localField = tags
label = Tags hr
foreignLabelField = title_hr
multiValue = 1
}
mediatypehr_intS = TEXT
mediatypehr_intS {
field = media_type_hr
}
mediatypede_intS = TEXT
mediatypede_intS {
field = media_type_de
}
image_stringS = FILES
image_stringS {
references {
table = tx_news_domain_model_news
uid.field = uid
fieldName = fal_media
}
begin = 0
maxItems = 1
renderObj = IMG_RESOURCE
renderObj {
file.import.data = file:current:publicUrl
file.maxW = 330
#wrap = |
}
}
url = CASE
url {
key.field = type
# Internal
1 = TEXT
1 {
if.isTrue.field = internalurl
typolink.parameter.field = internalurl
typolink.useCacheHash = 1
typolink.returnLast = url
}
# External
2 = TEXT
2 {
if.isTrue.field = externalurl
field = externalurl
}
default = TEXT
default {
typolink.parameter = {$plugin.tx_news.settings.detailPid}
typolink.additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}&L={field:__solr_index_language}
typolink.additionalParams.insertData = 1
typolink.useCacheHash = 1
typolink.returnLast = url
}
}
}
attachments = 1
attachments {
fields = fal_related_files
fileExtensions = *
}
}
}
}
plugin.tx_solr.logging.indexing.queue.news = 1
Aside from defining the fields for indexing you also need to declare these fields as relevant for search. (and with a weight how important they are for searching)
One possible solution could be like in this part of typoscript:
plugin {
tx_solr {
search {
query {
queryFields := addToList(categorytitle_stringS^2.0,keywords2.0,tags_stringM^2.0, tagshr_stringM^2.0)
}
}
}
}
see manual
I use the following TS from documentation (apache-solr-for-typo3) for a simple facet
plugin.tx_solr.search {
faceting = 1
faceting {
facets {
contentType {
label = Content Type
field = type
}
}
}
}
The result is e.g.
sys_file_metadata (691)
tt_address (341)
tx_news_domain_model_news (180)
pages (153)
tx_events2_domain_model_event (2)
How can I rename e.g. tt_address to Personen and the other titles for better readability?
Here is my configuration for tt_address
plugin.tx_solr.index.queue {
tt_address = 1
tt_address {
table = tt_address
lable = Personen
additionalWhereClause = first_name NOT LIKE ''
fields {
abstract = position
description = description
title = name
personen_stringS = Personen
content = SOLR_CONTENT
content {
field = title
}
url = TEXT
url {
typolink.parameter.field = detail
typolink.returnLast = url
typolink.useCacheHash = 0
}
}
}
}
TYPO3 10.4.18., solr 11.0.4
It's not at the queuing where you set the label.
plugin {
tx_solr {
search {
faceting = 1
faceting {
facets {
# contentType {
# label = Content Type
# field = type
# }
contentType {
label = Filter
field = type
renderingInstruction = CASE
renderingInstruction {
key.field = optionValue
pages = TEXT
pages.value = Internetseiten
tx_solr_file = TEXT
tx_solr_file.value = Dateien
tx_news_domain_model_news = TEXT
tx_news_domain_model_news.value = Nachrichten
tt_address = TEXT
tt_address.value = Adressen
}
}
:
I setup a TYPO3 v.9 website with solr.
And for some reason, the Pages indexer not working. So I used the custom TS configuration bellow, to work around and to force Pages indexing. With this custom TS, pages was indexed, BUT the links to a Page from the "Search results" is not working.
This is my custom TS :
#TS added to force page indexing
plugin.tx_solr.index.queue {
snar_pages = 1
snar_pages {
table = pages
fields {
title = title
content = SOLR_CONTENT
content {
cObject = COA
cObject {
10 = TEXT
10 {
field = bodytext
noTrimWrap = || |
}
}
}
url = CASE
url {
key.field = type
# Internal
1 = TEXT
1 {
if.isTrue.field = internalurl
typolink.parameter.field = internalurl
typolink.useCacheHash = 1
typolink.returnLast = url
}
# External
2 = TEXT
2 {
if.isTrue.field = externalurl
field = externalurl
}
default = TEXT
default {
typolink.parameter = {link}
typolink.additionalParams >
typolink.useCacheHash = 1
typolink.returnLast = url
}
}
}
}
is there an error in my TS that prevents the links to the pages from working ?
hmm i think you missed something to setup too for indexing pages. The DataFrontendHelper
see the docs
edited:
plugin.tx_solr {
index {
queue {
pages {
indexer {
frontendDataHelper {
host = {$plugin.tx_solr.indexer.frontendDataHandler.host}
scheme = {$plugin.tx_solr.indexer.frontendDataHandler.scheme}
}
}
}
}
}
}
Changing my TS as follows, and this fixed my problem :
url = CASE
url {
key.field = doktype
default = TEXT
default {
field = title
typolink.parameter.field = uid
typolink.returnLast = url
}
PS : pages need to be re-indexed for good results.
I have a curious page structure, colPos = 0 of the subpages is used as content for its parent ... these pages have animations that need code in the parent page footer so I added the field tx_add_animation_code in table tt_content and this code needs to be collected.
setup.txt:
# footer script
page.footerData {
# collect subpages
5 = LOAD_REGISTER
5 {
pageIds.cObject = CONTENT
pageIds.cObject {
table = pages
select {
pidInList = this
recursive = 0
selectFields = uid
where = {#no_search}=0
}
renderObj = TEXT
renderObj {
field = uid
required = 1
wrap = |,
}
}
}
# open javascript
10 = TEXT
10.value (
<script type="text/javascript">
)
# test id collection
25 = TEXT
25 {
data = register:pageIds
noTrimWrap (
|
/* subpage Ids: | */
|
)
}
# collect animation code from CE's on subpages
20 = CONTENT
20 {
table = tt_content
select {
pidInList.data = register:pageIds
# THIS LINE BREAKS FUNCTIONALITY
where = {#colPos}=0
}
renderObj = COA
renderObj {
10 = TEXT
10.stdWrap.field = tx_add_animation_code
}
if {
value = pagets__homepage,pagets__onepage
isInList.data = TSFE:page|backend_layout
}
}
# close javascript
30 = TEXT
30.value (
</script>
)
90 = RESTORE_REGISTER
}
where = {#colPos}=0 breaks the functionality, and if I do not include it, of course, the field is collected from all the content elements ...
what is the issue ?
Please make sure that there are really some Content Elements on the Subpages having colPos=0. Please note that some extensions like gridelements or other multicol extensions will set the colPos of their childelements to something negative like -67 so they won't match the select-statement anymore.
After the TYPO3 (6.1.7) website of a customer has gone online, the Formhandler forms do not work correctly anymore. They do send an email, but it seems that they do not execute the Finisher_DB for writing into the database anymore.
The TypoScript settings look like this:
plugin.Tx_Formhandler.settings {
debug = 0
# GENERAL CONFIGURATION
name = Default
addErrorAnchors = 1
formValuesPrefix = formhandler
fillValueMarkersBeforeLangMarkers = 1
# ERRORS LAYOUT
singleErrorTemplate {
totalWrap = <div>|</div>
singleWrap = <span class="error">|</span><br />
}
errorListTemplate {
totalWrap = <ul>|</ul>
singleWrap = <li class="error">|</li>
}
validators {
1.class = Tx_Formhandler_Validator_Default
1.config {
fieldConf {
wish.errorCheck.1 = required
alternative.errorCheck.1 = required
firstname.errorCheck.1 = required
surname.errorCheck.1 = required
nationality.errorCheck.1 = required
dateofbirth.errorCheck.1 = required
phone.errorCheck.1 = required
email.errorCheck.1 = required
street.errorCheck.1 = required
zip.errorCheck.1 = required
city.errorCheck.1 = required
country.errorCheck.1 = required
}
}
}
# Finishers configuration
finishers {
1.class = Tx_Formhandler_Finisher_Mail
1.config {
checkBinaryCrLf = registrationMessagePlain, registrationMessageHtml
limitMailsToUser = 10
admin {
}
user {
}
}
2.class = Tx_Formhandler_Finisher_DB
2.config{
table = tx_chilifhregistration
key = uid
fields {
timeslot = Sommerplatz
timeslot_july.mapping = timeslotSummerJuly
timeslot_august.mapping = timeslotSummerAugust
timeslot_september.mapping = timeslotSummerSeptember
wish.mapping = wish
wishcategory11.mapping = wishCategory11
wishcategory19.mapping = wishCategory19
wishcategory22.mapping = wishCategory22
wishcategorydb.mapping = wishCategoryDb
alternative.mapping = alternative
alternativecategory11.mapping = alternativeCategory11
alternativecategory19.mapping = alternativeCategory19
alternativecategory22.mapping = alternativeCategory22
alternativecategorydb.mapping = alternativeCategoryDb
salutation.mapping = salutation
firstname.mapping = firstname
surname.mapping = surname
nationality.mapping = nationality
dateofbirth.mapping = dateofbirth
phone.mapping = phone
email.mapping = email
street.mapping = street
zip.mapping = zip
city.mapping = city
country.mapping = country
salutation2.mapping = salutation2
firstname2.mapping = firstname2
surname2.mapping = surname2
nationality2.mapping = nationality2
dateofbirth2.mapping = dateofbirth2
phone2.mapping = phone2
email2.mapping = email2
street2.mapping = street2
zip2.mapping = zip2
city2.mapping = city2
country2.mapping = country2
}
}
}
}
What could be the problem?
You should better use the predef-definition-style for forms. This will save you trouble with multiple forms and is a cleaner implementation.
plugin.Tx_Formhandler.settings.predef.yourformularname { ...config... }
You can find a bunch of examples on the offical site/examples
I assume that your admin and user mail-config is only empty because you won´t post any customerinformation?
Did the form work if you fill in every single field?
In my own usecases all field i map with the finisher are required, maybe you should set a ...IfEmpty-option for non-require fields.
Here are the available ifEmpty-options.