teaminmedias-pluswerk / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
35 stars 62 forks source link

ke_search:indexing: hidden_content specified twice #450

Open infabo opened 11 months ago

infabo commented 11 months ago
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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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. :popcorn: