Problem/Motivation

After applying #3179107 on an existing install, /admin/config/system/tacjs/overview crashes with this error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.tacjslog' doesn't exist: SELECT COUNT(*) AS "expression"
FROM
(SELECT 1 AS "expression"
FROM
{tacjslog} "log") "subquery"; Array
(
)

That's because the table is not created for existing installs.

Steps to reproduce

  1. Install tacjs 5.0.0
  2. Switch to 5.x-dev

Proposed resolution

We should add a hook_update_N to create the table.

Remaining tasks

I will submit a patch.

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

This patch adds a hook that creates the table when updating the database.

boulaffasae’s picture

Status: Needs review » Fixed
StatusFileSize
new1.45 KB

I got the following error:

  error: patch failed: tacjs.install:41
  error: tacjs.install: patch does not apply

Here is a an updated patch

  • boulaffasae committed f4d27d5 on 8.x-5.x
    Issue #3187255 by prudloff, boulaffasae: Table tacjslog is not created...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

boulaffasae’s picture

Status: Closed (fixed) » Patch (to be ported)

Patch to be ported.

Removed from 8.x-5.x

gurvan’s picture

StatusFileSize
new781 bytes

Just a new patch for the 8.x-5.2 version (waiting for a new release)

  • boulaffasae committed bf91bf8 on 8.x-5.x
    Issue #3187255 by prudloff, boulaffasae, gurvan: Table tacjslog is not...
boulaffasae’s picture

Status: Patch (to be ported) » Fixed

Thank you prudloff, gurvan

eliechoufani’s picture

Although it is fixed, I'd like to add a useful info. You get the error if you are using MariaDB version < 10.3 because Default expression wasn't included for BLOB and TEXT type until version 10.3

Official version Improvements and new features document : https://mariadb.com/kb/en/incompatibilities-and-feature-differences-betw...

Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.