Closed bytehead closed 5 years ago
Are you sure you have executed the database updates in the Contao Install Tool? (You have to update two times.)
Yes. Seems that the SQL statement is missing: https://github.com/terminal42/contao-node/blob/c1c54d56d21e73ebbd03f12fff80ac41118b4cd6/src/Resources/contao/dca/tl_node.php#L156-L162
That's normal, as far as I understand it. Tags aren't saved directly in that table. It's managed by the tags-bundle.
But Contao tries to select this column: 'SELECT DISTINCT tags FROM tl_node'
.
Which Contao version?
4.7.7
It's odd. We are using this extension in Contao 4.7 as well without experiencing this issue.
I think I got the issue. Let me check quick.
Exactly like @fritzmg pointed out the tags are managed by codefog/tags-bundle
and thus the bug is not strictly related to this extension. However it still seem a bit weird to me because for tag management we do use a relational table and Contao should never try to fetch the tags
column directly. Let me know what you'll find out.
AFAIK this query comes from the filter panel. But don’t know how this works together.
@richardhj fields that use Haste-ManyToMany
relation also use a filter callback to replace those default Contao filters with custom ones, so this shouldn't be a problem here… unless there is a bug :wink:
I'm much further now:
An exception occurred while executing 'SELECT cfg_tag_id FROM tl_cfg_tag_node':
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sc_website.tl_cfg_tag_node' doesn't exist
I have to explain here that we run our Contao database updates on CLI (not via install tool). Problem is, that commands runnning on CLI don't have a TL_MODE
, (it's actual value is null
). Finally this hook gets missed by the schema tool on CLI:
Any ideas how to solve this? 😀
If we change this one to
if (!defined('TL_MODE') || TL_MODE == 'BE') {
$GLOBALS['TL_HOOKS']['sqlGetFromFile'][] = ['Haste\Model\Relations', 'addRelationTables'];
}
it should then work, right?
Hm, it is actually defined (has value null
).
if (!TL_MODE || TL_MODE === 'BE') { ... }
would work.
Or just TL_MODE !== 'FE'
… ?
Right, it is defined… so let's go with @fritzmg proposal which was my second though. I will release the Haste hotfix in a few minutes.
Nice, thanks for hotfixing @qzminski! 🍻
Right after a fresh install (
1.0.1
) accessing the backend module:Stacktrace: