Bug #87689
closedDifferent behavior with different database drivers
100%
Description
I found a bug in the EXT:seo. When I use the database-driver pdo_mysql all resulted fields will be strings. I found this error while I was trying to make a sitemap.xml with more sitemaps (for an own extension e.g.).
So I debugged in RecordsXmlSitemapDataProvider->generateItems and there were all fields strings (uid, pid, tstamp, crdate, etc.).
When I change the database-driver to mysqli everything works fine and all said fields have the right types (here int)
The type/default value for uid, pid, tstamp, crdate, etc. fields in the tx_products_domain_model_product table is integer.
The TypoScript for the Sitemap:
plugin.tx_seo { config { xmlSitemap { sitemaps { products { provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider config { table = tx_products_domain_model_product sortField = title lastModifiedField = tstamp pid = 2 recursive = 2 url { pageId = 4 fieldToParameterMap { uid = tx_products_products[product] } additionalGetParameters { tx_products_products.controller = Product tx_products_products.action = show } useCacheHash = 1 } } } } } } }
The Sitemap-Config:
routeEnhancers: PageTypeSuffix: type: PageType map: sitemap.xml: 1533906435
When I use pdo_mysql, I'll become an error-message: TypeError: Return value of TYPO3\CMS\Seo\XmlSitemap\AbstractXmlSitemapDataProvider::getLastModified() must be of the type integer, string returned.
Debug with pdo_mysql driver:
Debug with mysqli driver:
P.S. I discussed that problem with Richard Haeser before. He said, that I should assign this ticket to him.
Files
Updated by Gerrit Code Review almost 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59682
Updated by Gerrit Code Review almost 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59682
Updated by Gerrit Code Review almost 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59682
Updated by Gerrit Code Review almost 6 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59687
Updated by Richard Haeser almost 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c939678b40b576eff5dbfe2d79dcaaaf5c47e157.