Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ke_search:indexing: hidden_content specified twice #450

Open
infabo opened this issue Aug 14, 2023 · 4 comments
Open

ke_search:indexing: hidden_content specified twice #450

infabo opened this issue Aug 14, 2023 · 4 comments

Comments

@infabo
Copy link
Contributor

infabo commented Aug 14, 2023

An exception occurred while executing 'PREPARE insertStmt FROM "
			INSERT INTO tx_kesearch_index
			(pid, title, type, targetpid, content, tags, params, abstract, language, starttime, endtime, fe_group, tstamp, crdate, breadcrumb, sortdate, orig_uid, orig_pid, directory, hash, hidden_content, breadcrumb, sortdate, orig_uid, orig_pid, directory, hash, hidden_content)
			VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
		"':

Column 'hidden_content' specified twice

https://github.com/tpwd/ke_search/blob/v5.0.2/Classes/Indexer/IndexerRunner.php#L460

TYPO3 11.5.30
ke_search 5.0.2

@AstCommodore
Copy link

Hello folks,

the error message related to the column seems to be random:

An exception occurred while executing 'PREPARE insertStmt FROM "       
         			INSERT INTO tx_kesearch_index                                          
         			(pid, title, type, targetpid, content, tags, params, abstract,         
         language, starttime, endtime, fe_group, tstamp, crdate, sortdate,      
         orig_uid, orig_pid, directory, hash, hidden_content, sortdate,         
         orig_uid, orig_pid, directory, hash, hidden_content)                   
         			VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,     
         ?, ?, ?, ?, ?, ?)                                                      
         		"':                                                                    
                                                                                
         Column 'sortdate' specified twice  

TYPO3 11.5.28
ke_search 4.6.6
PHP 8.1.21
MySQL 8.0.25

@christianbltr
Copy link
Collaborator

Unfortunately I could not reproduce the error.

It seems that the "additionalFields" have been registered twice, which I could only enforce by duplicating the lines

    // use hooks for generation of sortdate values
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerAdditionalFields'][] =
        \Tpwd\KeSearch\Hooks\AdditionalFields::class;

in ext_localconf.php of ke_search.

Do you have some custom code which extends ke_search and maybe adds that lines by accident?

BTW: Please use https://github.com/tpwd/ke_search/issues for further issues because this issue tracker is not used anymore.

@infabo
Copy link
Contributor Author

infabo commented Sep 15, 2023

I have one single occurrence in my project inside ext_localconf.php of my site package.

    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyPagesIndexEntry'][] = \MMC\SitePackage\Hooks\KeSearchHooks::class;
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyExtNewsIndexEntry'][] = \MMC\SitePackage\Hooks\KeSearchHooks::class;
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerAdditionalFields'][] = \MMC\SitePackage\Hooks\KeSearchHooks::class;
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['additionalResultMarker'][] = \MMC\SitePackage\Hooks\KeSearchHooks::class;
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifySearchWords'][] = \MMC\SitePackage\Hooks\KeSearchHooks::class;
    public function registerAdditionalFields(&$additionalFields): void
    {
        $additionalFields[] = 'breadcrumb';
    }

@infabo
Copy link
Contributor Author

infabo commented Sep 25, 2023

image

Still experiencing this error. The only pattern I see: it appears once a week. Exactly. Indexing task is running once every hour, but this error occurs only once a week. 🍿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants