rupertgermann / tt_news

TYPO3 Extension - News (tt_news)
21 stars 37 forks source link

Error pages_language_overlay does not exist since update to Typo3 9.5.24 #164

Closed baden32 closed 3 years ago

baden32 commented 3 years ago

Dear Rupert,

Since Typo3 9.5.24, it seems that table pages_language_overlay does not exist anymore.

Unfortunately, in ext\tt_news\Classes\ModuleNewsAdminModule.php (I'm using version 10.0.0) on line 1286 (initLanguageMenu function) when user is not admin, we can see the following:

protected function initLanguageMenu()
{
    if ($this->isAdmin) {
        $res = Database::getInstance()->exec_SELECTquery(
            'sys_language.*',
            'sys_language',
            'sys_language.hidden=0',
            '',
            'sys_language.title'
        );
    } else {
        $exQ = ' AND pages_language_overlay.deleted = 0';
        $res = Database::getInstance()->exec_SELECTquery(
            'sys_language.*',
            'pages_language_overlay,sys_language',
            'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid IN (' . $this->pidList . ')' . $exQ,
            'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag',
            'sys_language.title'
        );
    }

Therefore, our client which is not an admin cannot administrate its news records because the following error occurs:

Oops, an error occurred! An exception occurred while executing 'SELECT sys_language.* FROM pages_language_overlay,sys_language WHERE pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid IN (1,2,3,13) AND pages_language_overlay.deleted = 0 GROUP BY pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag ORDER BY sys_language.title': Table 'pages_language_overlay' doesn't exist.

Do you see a way to solve this issue? Thanks a lot for your help and have a nice day. Regards Joel

DavidBruchmann commented 3 years ago

Just a general hint about any fix: Handling and existence of the table pages_language_overlay never depends only on the version but also on a feature-switch in the Admin-tools / install-tool.

baden32 commented 3 years ago

Hi David, thank you for your feedback, but I cannot understand what it means. Could you give me more info? Nothing changed on my website except that we go from 9.5.23 to 9.5.24.

baden32 commented 3 years ago

Hi David, Finally I found this option ([SYS][features][unifiedPageTranslationHandling]) in Install tool, the option was "on" but I cannot 100% understand what it means and why this option could be set to true having tt_news depending on pages_language_overlay table. Whatever, I created the table from my last Typo3 7.6 instance and now news records handling works fine as "non admin".

Thanks for your help. Issue is closed