The module doesn't create database table

Created on 3 February 2025, about 1 month ago

Problem/Motivation

After clearing the cache or running update.php, the page crashes permanently.
Before: Composer installation runs without error. Module installation (in Drupal) initially returns a blank screen. After reloading the page, the status message on the modules page is "Module Real Name has been installed." The 'realname' table is not created in the database. The Realname setting option does not appear in Account Settings.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇭🇺Hungary martonadam

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

Comments & Activities

  • Issue created by @martonadam
  • 🇭🇺Hungary martonadam

    I manually created the realname table based on realname.install

    CREATE TABLE `speleoar_drup677`.`drspa_realname` (`uid` INT UNSIGNED NOT NULL DEFAULT '0' , `realname` VARCHAR(255) NOT NULL DEFAULT '' , `created` INT UNSIGNED NOT NULL DEFAULT '0' , PRIMARY KEY (`uid`)) ENGINE = InnoDB;  ALTER TABLE `drspa_realname`
      ADD CONSTRAINT `drspa_realname_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `drspa_users` (`uid`);
    

    After this, the page does not crash and the Realname setting is available, however, it does not take tokens into account, only the normal string (this is also registered in the database) and all usernames are this string.

  • 🇭🇺Hungary martonadam

    I tried again: probably the tokens I tried with earlier returned an empty string, with the right tokens the naming and saving works fine.

    I manually created the realname table based on realname.install

     CREATE TABLE `speleoar_drup677`.`drspa_realname` (`uid` INT UNSIGNED NOT NULL DEFAULT '0' , `realname` VARCHAR(255) NOT NULL DEFAULT '' , `created` INT UNSIGNED NOT NULL DEFAULT '0' , PRIMARY KEY (`uid`)) ENGINE = InnoDB;
    ALTER TABLE `drspa_realname`
      ADD CONSTRAINT `drspa_realname_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `drspa_users` (`uid`);
    COMMIT;

    After this, the page does not crash and the Realname setting is available,.

  • Hey @martonadam,

    I have tried reproducing the issue you have mentioned. I am using Drupal 10 and version 2.0.0 of Realname, but on installing the module I didn't received any problem.
    I even tried installing the module from UI, didn't face any black screen issue and it shows "Module Real Name has been installed" without any error related to database name.
    I am attaching screen shots related to the site of both before and after enabling the module.
    Please let me know if I am missing something here.
    Thanks!

Production build 0.71.5 2024