TYPO3 and sitemap_generator - typo3

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

Related

In typo3 news typoscript, how do I set startingpoint to current page ID?

In old versions of typo3 this code worked but in latest version v11 it doesn't.The problem is that "this" value defined as "startingpoint" doesn't return current page id anymore.
lib.pageNews = USER
lib.pageNews {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = News
pluginName = Pi1
vendorName = GeorgRinger
switchableControllerActions {
News {
1 = list
}
}
settings < plugin.tx_news.settings
settings {
startingpoint = this
recursive = 99
templateLayout = 100
hidePagination = 0
#limit = 10
detailPid = 1075
list.paginate.itemsPerPage = 20
}
}
What is the "new" way to achieve this?
I tried to call that id in multiple ways like: TSFE:id, lib.currentPageId, TSFE:page|id, TSFE:page|uid, {TSFE:uid}, {TSFE:id}, getTSFE().id, .....
That is possible by using useStdWrap.
lib.pageNews {
settings {
useStdWrap = startingpoint
startingpoint {
data = TSFE:id
}
}
}
Source: https://github.com/georgringer/news/issues/542

why Typo3 website v10 show empty sitemap xml in frontend

I'm using a Typo3 website version 10 and the sitemap is not working properly,
i can see the configuration in the typoscript object browser but in the front-end www.mydomain.ch/?type=1533906435 the xml file is blanc.
Frontend screenshot:
Typoscript object browser screenshot:
seo extension is installed.
the website is multilangage.
what can be missing so that i see the sitemap ?
If this is all you have, then you are missing some key configuration. You need to specify what should be shown. So, on your TypoScript, based on the documentation, you should define what pages/extension etc must be shown. For example:
plugin.tx_seo {
config {
xmlSitemap {
sitemaps {
pages {
config {
excludedDoktypes = 137, 138
additionalWhere = AND (no_index = 0 OR no_follow = 0)
#rootPage = <optionally specify a different root page. (default: rootPageId from site configuration)>
}
}
}
}
}
}
Here is an example for the extension news as well, in case you are using it.
plugin.tx_seo.config {
xmlSitemap {
sitemaps {
news {
provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider
config {
table = tx_news_domain_model_news
additionalWhere =
sortField = sorting
lastModifiedField = tstamp
changeFreqField = sitemap_changefreq
priorityField = sitemap_priority
pid = 26
recursive = 2
url {
pageId = 25
fieldToParameterMap {
uid = tx_news_pi1[news]
}
additionalGetParameters {
tx_news_pi1.controller = News
tx_news_pi1.action = detail
}
}
}
}
}
}
}
Here the documentation as well: Documentation
i have solved the problem, i think it was the sourceopt extension installed have a bug, i have update it to the latest version, now i can see the xml sitemap working fine, thanks!

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
}
}
}
}
}

fallback for FILES in typoscript

I'm using typoscript go get the first file out of a page. This works and is out of the documentation. But the documentation doesn't tell something about a fallback if no files are found.
lib.files = FILES
lib.files {
references {
table = pages
fieldName = media
}
file =
begin = 0
maxItems = 1
renderObj = TEXT
renderObj {
value = URL: {file:current:publicUrl}
insertData = 1
}
}
A naive .if.isNull failed at the first attpent. Is there a possibilty to define a fallback if the FILES-Object is empty?
Mh,
try to make a second object and check there if lib.files is filled with data.
__
UNTESTED
lib.files = FILES
lib.files {
references {
table = pages
fieldName = media
}
file =
begin = 0
maxItems = 1
renderObj = TEXT
renderObj {
value = URL: {file:current:publicUrl}
insertData = 1
}
}
lib.fileFallback = COA
lib.fileFallback {
10 < lib.files
20 = TEXT
20 {
value = Do something
stdWrap.if.isFalse.cObject < lib.fileFallback.10
}
}
I am using this technique often to slide through pages for slideshow objects.
Let me know, if it is working.
You should check the TypoScript Reference stdWrap.ifEmpty.
In your case the code should look like this
lib.files {
# ....
stdWrap.ifEmpty.cObject = IMAGE
stdWrap.ifEmpty.cObject{
file = fileadmin/.../my_image.png
}
# ....
}
You can use every cObject you want.
Check out Content Objects (cObject)

typo3 formhandler error tx_formhandler_log

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.