SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'file_path' can't have a default value

Created on 9 April 2024, 3 months ago
Updated 30 May 2024, 27 days ago

Problem/Motivation

Hello, when i try to enable this module I got this error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'file_path' can't have a default value: CREATE TABLE "wordsonline_connector_job_files" ( "job_id" INT NOT NULL COMMENT 'Primary Key: Unique id for wordsonline_connector_job_files', "job_Item_id" INT NOT NULL COMMENT 'Primary Key: Unique id for wordsonline_connector_job_files', "file_name" VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'file name', "file_path" TEXT DEFAULT '' COMMENT 'file data', "source_language" VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'file name', "target_language" VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'file name', PRIMARY KEY ("job_id", "job_Item_id") ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'Stores value in tmgmt wordsonline jobs files table'; Array ( ) in Drupal\Core\Extension\ModuleInstaller->installSchema() (line 655 of core/lib/Drupal/Core/Extension/ModuleInstaller.php).

I am using Drupal version 10.2.5

Steps to reproduce

  • Install the latest version of this module using composer
  • When enable it you got this error.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

Gaurav Gupta Jaipur, Rajasthsan

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

Merge Requests

Comments & Activities

  • Issue created by @Gaurav Gupta
  • Issue was unassigned.
  • Status changed to Needs review 3 months ago
  • Status changed to RTBC 27 days ago
  • 🇮🇳India manish-31

    I have tested the MR patch, the reported issue is fixed.

    However, there still one error -

    Error: Class "Drupal\tmgmt_file\Format\FormatManager" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php) #0 /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.manager....')
    #1 /app/web/modules/contrib/wordsonline_connector/src/Plugin/tmgmt/Translator/WordsOnlineTranslator.php(143): Drupal\Component\DependencyInjection\Container->get('plugin.manager....')
    #2 /app/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\wordsonline_connector\Plugin\tmgmt\Translator\WordsOnlineTranslator::create(Object(Drupal\Core\DependencyInjection\Container), Array, 'wordsonline', Array)
    #3 /app/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('wordsonline', Array)
    #4 /app/web/modules/contrib/tmgmt/src/Entity/Translator.php(270): Drupal\Component\Plugin\PluginManagerBase->createInstance('wordsonline')
    #5 /app/web/modules/contrib/tmgmt/tmgmt.module(491): Drupal\tmgmt\Entity\Translator->getPlugin()
    #6 /app/web/modules/contrib/tmgmt/tmgmt.module(66): tmgmt_translator_auto_create(Array)
    #7 [internal function]: tmgmt_modules_installed(Array, false)
    #8 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(409): call_user_func_array(Object(Closure), Array)
    #9 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object(Closure), 'tmgmt')
    #10 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(416): Drupal\Core\Extension\ModuleHandler->invokeAllWith('modules_install...', Object(Closure))
    #11 /app/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(388): Drupal\Core\Extension\ModuleHandler->invokeAll('modules_install...', Array)
    #12 /app/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true)
    #13 /app/vendor/drush/drush/src/Commands/pm/PmCommands.php(102): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
    #14 [internal function]: Drush\Commands\pm\PmCommands->install(Array, Array)
    #15 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
    #16 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #17 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #18 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #19 /app/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #20 /app/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #21 /app/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #22 /app/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #23 /app/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #24 /app/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
    #25 /app/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
    #26 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
    #27 /app/vendor/bin/drush(120): include('/app/vendor/dru...')
    #28 {main}
    

    I think above error can be tracked in a separate issue once this is fixed, so marking this as RTBC. Thanks!

Production build 0.69.0 2024