Error: Call to undefined method Drupal\mysql\Driver\Database\mysql\Connection::tablePrefix()

Created on 28 September 2024, 3 months ago

Problem/Motivation

Hey,

I have installed version 2.0.6 of this module on the latest version of Drupal 11 (via composer and mglaman/composer-drupal-lenient for compatibility).

At several stages (custom table creation, structure loading, etc.), I encountered this error:

Call to undefined method Drupal\mysql\Driver\Database\mysql\Connection::tablePrefix()

Steps to reproduce

  1. Install Drupal 11.0.4
  2. Install Views Custom Table 2.0.6 (use Lenient via composer)
  3. Add custom table
  4. The first error appears at step 2 of the form

Proposed resolution

According to this deprecated : https://www.drupal.org/node/3260849
I suggest replacing all tablePrefix($table_name) with getPrefix().

I tested these modifications, and everything is OK for me.

I am attaching a patch containing these changes.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France johnatas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024