typo3 formhandler error tx_formhandler_log - forms

I tried to implement a new form which creates a tt_addressrecord. But everytime when I submit the form it shows an error that the table tx_formhandler_log does not exist. But I use the standart ts. Here my ts for my form:
plugin.Tx_Formhandler.settings.predef.newsletter {
disableWrapInBaseClass = 1
# Common configuration
debug = 1
name = Newsletter
addErrorAnchors = 1
1.templateFile = TEXT
1.templateFile.value = typo3conf/templates/main/plugins/formhandler/newsletter.form.html
langFile.1 = typo3conf/templates/main/plugins/formhandler/locallang.xml
formValuesPrefix = notifiers
disableWrapInBaseClass = 1
isErrorMarker.default = error
isErrorMarker {
global = error
}
errorListTemplate {
totalWrap >
singleWrap = <p> | </p>
}
finishers {
1.class = Tx_Finisher_DB
1.config {
table = tt_address
key = uid
fields {
email.mapping = email
email.ifIsEmpty = 1
pid.ifIsEmpty = 109
hidden.ifIsEmpty = 1
module_sys_dmail_html.ifIsEmpty = 1
}
}
2.class = Tx_Formhandler_Finisher_Mail
2.config {
checkBinaryCrLf = message
admin {
templateFile = TEXT
templateFile.value = typo3conf/templates/main/plugins/formhandler/newsletter.email.admin.html
sender_email = email
to_email = {newsletter.mail.address.admin}
replyto_email = email
replyto_name = email
subject = TEXT
subject.value = {newsletter.subject.admin}
}
}
3.class = Finisher_Redirect
3.config {
redirectPage = 1
additionalParams {
success = 1
}
}
}
}

A Database Compare could be helpful for your issue:
Go to the Install Tool -> Important Actions and click on Database Compare. This compares your current database to the configuration files and you can automatically fix missing tables or fields.
In older TYPO3 versions (< 6.2) you'll find this in menu item Database Analyser in the Install Tool.

Related

How do I generate multiple news XML sitemaps using sys_category

Version:
TYPO3 10.4.18, News 8.5.2
Problem:
I need to generate multiple XML sitemaps, where all news originate from a single folder ID. They need to link to different news detail pages, based on different categories.
According to the documentation I need to use the extended sitemap GeorgRinger\News\Seo\NewsXmlSitemapDataProvider, it also states the following:
Single-view page for news from this category of a sys_category you need to use a custom provider.
It also states:
To enable the category detail page handling, checkout the setting useCategorySinglePid = 1 in the following full example:
plugin.tx_seo {
config {
xmlSitemap {
sitemaps {
news {
provider = GeorgRinger\News\Seo\NewsXmlSitemapDataProvider
config {
excludedTypes = 1,2
additionalWhere =
## enable these two lines to generate a Google News sitemap
# template = EXT:news/Resources/Private/Templates/News/GoogleNews.xml
# googleNews = 1
sortField = datetime
lastModifiedField = tstamp
pid = 84
recursive = 2
url {
pageId = 116
useCategorySinglePid = 1
hrDate = 0
hrDate {
day = j
month = n
year = Y
}
fieldToParameterMap {
uid = tx_news_pi1[news]
}
additionalGetParameters {
tx_news_pi1.controller = News
tx_news_pi1.action = detail
}
useCacheHash = 1
}
}
}
}
}
}
}
In the code above I can see that in pid Newsitems are stored, pageId is where the detail page is. useCategorySinglePid enables the category detail page handling. So how and where do I define what specific category should be shown in the sitemap? Do I have to define this using additionalWhere? The way the documentation tries to explain what needs to be done is rather confusing. Any help is greatly appreciated.
I had this same problem. I tried to find a solution but with no success.
At the end I have something like this:
additionalWhere = uid IN (SELECT uid_foreign FROM sys_category_record_mm WHERE uid_local=14)
Where uid_local is uid of category. Resolved with help from Kurt, thank you.
plugin.tx_seo.config {
xmlSitemap {
sitemaps {
innovationen {
provider = GeorgRinger\News\Seo\NewsXmlSitemapDataProvider
config {
additionalWhere = uid IN (SELECT uid_foreign FROM sys_category_record_mm WHERE uid_local=11)
sortField = sorting
lastModifiedField = tstamp
pid = 156
recursive = 2
url {
pageId = 157
useCategorySinglePid = 1
fieldToParameterMap {
uid = tx_news_pi1[news]
}
additionalGetParameters {
tx_news_pi1.controller = News
tx_news_pi1.action = detail
}
useCacheHash = 0
}
}
}
trends {
provider = GeorgRinger\News\Seo\NewsXmlSitemapDataProvider
config {
additionalWhere = uid IN (SELECT uid_foreign FROM sys_category_record_mm WHERE uid_local=12)
sortField = sorting
lastModifiedField = tstamp
pid = 156
recursive = 2
url {
pageId = 160
useCategorySinglePid = 1
fieldToParameterMap {
uid = tx_news_pi1[news]
}
additionalGetParameters {
tx_news_pi1.controller = News
tx_news_pi1.action = detail
}
useCacheHash = 0
}
}
}
}
}

TYPO3 and sitemap_generator

I use TYPO3 7.6.10 and sitemap_generator 1.0
I see the sitemap.xml and it generates the map but there are not the categories and tags like "categoy/nameofcategory".
How can I solve it?
The code in template is:
plugin.tx_sitemapgenerator {
urlEntries {
pages = 1
pages {
rootPageId = 1
allowedDoktypes = 1
additionalWhere = doktype!=6
}
}
}
plugin.tx_sitemapgenerator {
urlEntries {
news = 1
news {
active = 1
table = tx_news_domain_model_news
additionalWhere = pid!=0
orderBy = title DESC
limit = 0,1000
lastmod = tstamp
url = TEXT
url {
typolink.parameter = 161
typolink.additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}
typolink.additionalParams.insertData = 1
typolink.useCacheHash = 1
typolink.returnLast = url
typolink.forceAbsoluteUrl = 1
}
}
}
}
A sitemap for google doesn't contain such stuff as tags and description, so there is no need for the extension to deliver that stuff. Check the specs of creating a sitemap here. Google build a sitemap

TYPO3 Gridelement nesting not working

I've created a extension based on bootstrap_grids, but cannot nest the grid elements. I understand that "allowed = *" should do the job, but the ce don't show up in nested elements.
tx_gridelements {
setup {
section {
title = LLL:EXT:h_grid/Resources/Private/Language/locallang_db.xlf:section.title
description = LLL:EXT:h_grid/Resources/Private/Language/locallang_db.xlf:section.description
icon = EXT:h_grid/Resources/Public/Icons/gridlayout_section.gif
frame = 3
topLevelLayout = 0
config {
colCount = 1
rowCount = 1
rows.1 {
columns {
1 {
name = LLL:EXT:h_grid/Resources/Private/Language/locallang_db.xlf:celayout.leftColumn
colPos = 101
allowed = *
allowedGridTypes = *
}
}
}
}
}
....
Did I miss something?
Try leaving out the lines
allowed = *
allowedGridTypes = *
when you're not actually excluding any elements.

Typo3 mbl_newsevent post date to URL

I got an event glossary at my site and the user needs to register for that events with powermail. I post the event title to the URL and then the title gets inserted into a input field at my powermail form. But now I need the date of the event, too.
This is my code so far:
plugin.tt_news.mbl_newsevent{
registrationLink_typolink {
additionalParams.cObject = COA
additionalParams.cObject {
10 = TEXT
10 {
value = &tx_powermail_pi1[veranstaltung]={field:title}
insertData = 1
}
20 = TEXT
20 {
value = {field:tx_mblnewsevent_from}
insertData = 1
stdWrap.date = d.m.Y
stdWrap.outerWrap = &tx_powermail_pi1[datum]=|
}
}
}
output is (URL): http://preview.eloum.de/anmeldung-infotag/?tx_powermail_pi1%5Bveranstaltung%5D=Infotag%20eBusiness-Lotse%20Oberschwaben-Ulm%2028.03.2014&tx_powermail_pi1%5Bdatum%5D=01.01.1970
why 01.01.1970?
the timestamp is correct without that stdWrap.date = d.m.Y
EDIT: got it!
My solutioN:
plugin.tt_news.mbl_newsevent{
registrationLink_typolink {
additionalParams.cObject = COA
additionalParams.cObject {
10 = TEXT
10 {
value = &tx_powermail_pi1[veranstaltung]={field:title}
insertData = 1
}
20 = TEXT
20 {
field = tx_mblnewsevent_from
insertData = 1
date = d.m.Y
wrap = &tx_powermail_pi1[datum]=|
}
}
}}
Can you try
registrationLink_typolink {
...
additionalParams= &tx_powermail_pi1[veranstaltung]={field:title}&tx_powermail_pi1[datum]={field:datetime}
additionalParams.insertData = 1
}
... here's another try. I haven't tested it and I'll have to leave it there. So maybe you have to make some modifications. The general idea is that, as you can't say $date = makereadabledate($timestamp); and then use that in your template (as TS isn't a real programming language), you build the value you want to pass to additionalParams as a so called "cObject". In there, you can parse and wrap it. In the end, you would pass your string for further use to additionalParams. Hope you can make it work!
registrationLink_typolink {
...
additionalParams.cObject = COA
additionalParams.cObject {
10 = TEXT
10 {
value = &tx_powermail_pi1[veranstaltung]={field:title}
insertData = 1
}
20 = TEXT
20 {
value = {field.datetime} // or use "data"
insertData = 1
stdWrap.date = d.m.Y
stdWrap.outerWrap = &tx_powermail_pi1[datum]=|
// outerWrap: maybe not even necessary, the idea is not to interfere with the created string
// cf. http://blog.bartlweb.net/2011/02/die-reihenfolge-der-wichtigsten-wraps-in-typo3/
}
}
}

typoscript issue with LOAD_REGISTER and if condition to fill a list

What I'm trying to do is quite complex and an Extbase extension is involved...
Step by step, what I'm trying to do:
An Extbase plugin decides, if certain navigation elements should be marked.
This plugin has one action for each navigation element.
The returned value (0 or 1) from each action in TS is stored on the stack (LOAD_REGISTER).
A list of page UIDs is build by checking against the stored values (0,1).
The navigation COA is modified using this list of page UIDs.
Here is the typoscript code I'm using:
// load information, if pages lack info, into register
10 = LOAD_REGISTER
10 {
lacksAnfahrt {
cObject = USER_INT
cObject {
userFunc = tx_extbase_core_bootstrap->run
pluginName = Pa_klinik_data_edit
extensionName = Hplusinfo
controller = SpitalInfoPA
switchableControllerActions {
SpitalInfoPA {
1 = completeAnfahrt
}
}
}
}
lacksAktivitaeten < .lacksAnfahrt
lacksAktivitaeten.cObject.switchableControllerActions.SpitalInfoPA.1 = completeAktivitaeten
lacksBildergalerie < .lacksAnfahrt
lacksBildergalerie.cObject.switchableControllerActions.SpitalInfoPA.1 = completeBildergalerie
// build a list of PIDs that are going to be marked in navigation
lackPIDs.cObject = COA
lackPIDs.cObject {
10 = TEXT
10 {
value = {$config.PIDLists.anfahrt},
if {
value = 1
equals.data = register:lacksAnfahrt
}
}
20 < .10
20.value = {$config.PIDLists.bildergalerie},
20.if.equals.data = register:lacksBildergalerie
30 < .10
30.value = {$config.PIDLists.aktivitaeten},
30.if.equals.data = register:lacksAktivitaeten
// don't let the comma separated list end with a comma
99 = TEXT
99.value = 0
} // lackPIDs
} // REGISTER
// mark incomplete pages with a red exclamation mark
20 { // = HMENU
1 { // = TMENU
NO { // = 1
stdWrap.wrap = |<span class="warning lacksInfo">!</span>
stdWrap.wrap.if {
value.data = register:lackPIDs
isInList.field = uid
}
}
}
}
If i print out register:lacksBildergalerie and all the others, their values are correct (0 or 1).
But the lackPIDslist always empty (except of the 0 at the end)... There must be something wrong with the middle part:
10 {
value = {$nav.PIDLists.anfahrt},
if {
value = 1
equals.data = register:lacksAnfahrt
}
}
This evaluation seams to return false in any case.
I also tried with different if function like:
10 {
value = {$nav.PIDLists.anfahrt},
if {
isTrue.data = register:lacksAnfahrt
}
}
But this doesn't solve the problem.
Just overlooked that the other registers are using USER_INT as well