Skip to content
Snippets Groups Projects
Commit 7dca2b7a authored by Georgi Mateev's avatar Georgi Mateev
Browse files

[BUGFIX] Jobs are displayed twice in the sitemap

parent 88ef4ed7
No related branches found
No related tags found
No related merge requests found
...@@ -149,6 +149,7 @@ class JoblistController extends ActionController { ...@@ -149,6 +149,7 @@ class JoblistController extends ActionController {
* @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException
* @throws \TYPO3\CMS\Core\Error\Http\PageNotFoundException * @throws \TYPO3\CMS\Core\Error\Http\PageNotFoundException
* @throws ImmediateResponseException * @throws ImmediateResponseException
* @throws \TYPO3\CMS\Core\Package\Exception
*/ */
public function indexAction(array $filters = [], int $jobId = NULL, int $currentPageBrowserPage = 0): void { public function indexAction(array $filters = [], int $jobId = NULL, int $currentPageBrowserPage = 0): void {
if ($filters) { if ($filters) {
......
...@@ -36,8 +36,10 @@ class SitemapService { ...@@ -36,8 +36,10 @@ class SitemapService {
// find sites where job detail plugin is added // find sites where job detail plugin is added
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('tt_content'); ->getQueryBuilderForTable('tt_content');
$databaseResource = $queryBuilder->select('pid', 'pages', 'tstamp') $databaseResource = $queryBuilder->select('tt_content.pid', 'pages', 'tt_content.tstamp')
->from('tt_content') ->from('tt_content')
->innerJoin('tt_content', 'pages', 'pages', 'pages.uid = tt_content.pid
AND pages.shortcut < 1') //TODO: or nav_hide ?
->where( ->where(
$queryBuilder->expr()->andX( $queryBuilder->expr()->andX(
$queryBuilder->expr()->eq('CType', $queryBuilder->createNamedParameter('list')), $queryBuilder->expr()->eq('CType', $queryBuilder->createNamedParameter('list')),
...@@ -46,9 +48,9 @@ class SitemapService { ...@@ -46,9 +48,9 @@ class SitemapService {
$queryBuilder->createNamedParameter(self::PLUGIN_NAME) $queryBuilder->createNamedParameter(self::PLUGIN_NAME)
), ),
$queryBuilder->expr()->orX( $queryBuilder->expr()->orX(
$queryBuilder->expr()->eq('sys_language_uid', -1), $queryBuilder->expr()->eq('tt_content.sys_language_uid', -1),
$queryBuilder->expr()->eq( $queryBuilder->expr()->eq(
'sys_language_uid', 'tt_content.sys_language_uid',
$queryBuilder->createNamedParameter($sysLanguageUid, Connection::PARAM_INT) $queryBuilder->createNamedParameter($sysLanguageUid, Connection::PARAM_INT)
) )
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment