Can't visit content - node page

Created on 20 September 2024, 2 months ago

Problem/Motivation

I'm currently using Drupal 10.3.2 and had installed this module.
I had created a basic page with had turned on Noah in the settings, but it always get "The website encountered an unexpected error. Please try again later."
even when i hadn't create any content, just visit the content page with have Noah turn on will get the same error.

This module looks dope but i can't use it

🐛 Bug report
Status

Active

Version

1.0

Component

User interface

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @hokofihe
  • 🇪🇸Spain julian_esimaginacion

    Hi @hokofihe can you see Report logs and tell me if get other error? /admin/reports/dblog

    If you create a new node type (other content type) without Noah's get you the same error?

    Thanks!

  • Hi @julian_esimaginacion,

    Here is my report log:

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd11.noahs_page_builder_page' doesn't exist: SELECT "d".* FROM "noahs_page_builder_page" "d" WHERE ("did" = :db_condition_placeholder_0) AND ("langcode" = :db_condition_placeholder_1); Array ( [:db_condition_placeholder_0] => 6 [:db_condition_placeholder_1] => en ) in noahs_page_builder_load() (line 787 of C:\wamp64\www\d11\web\modules\contrib\noahs\noahs_page_builder.module).

    It seems that when I create a new node type (or any other content type) without Noah's, I still get the same error. When I uninstalled Noah's, it worked normally.

    Also, I forgot to mention that when I installed Noah's for the first time, my Drupal website encountered the same error, but after reloading the website and clearing the cache, Noah's was successfully installed.

    So here is my report log from when I installed the module:

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'settings' can't have a default value: CREATE TABLE "noahs_page_builder_page" ( "page_id" INT NOT NULL auto_increment COMMENT 'Primary Key: Unique noahs_page_builder ID.', "did" VARCHAR(56) NOT NULL, "uid" INT NOT NULL DEFAULT 0 COMMENT 'Creator user\'s \"users\".uid', "nid" VARCHAR(56) NOT NULL DEFAULT 0 COMMENT 'Creator from \"node\".nid', "langcode" VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'Language', "settings" LONGTEXT DEFAULT '' COMMENT 'Save the json-html', "page_settings" LONGTEXT DEFAULT '' COMMENT 'Save the json-html', PRIMARY KEY ("page_id") ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'Stores example person entries for demonstration purposes.'; Array ( ) in Drupal\Core\Extension\ModuleInstaller->installSchema() (line 674 of C:\wamp64\www\d11\web\core\lib\Drupal\Core\Extension\ModuleInstaller.php).

  • 🇪🇸Spain julian_esimaginacion

    Hi hokofihe, looks like error on the installation. The database tables have not been created.

    I have installed the module on a new Drupal (10.3) site and I have not gotten any errors, the same if I uninstall it and reinstall it.
    I can't reproduce the error :(

    Pls, follow this:

    To see erros add this in your settings.php:
    $config['system.logging']['error_level'] = 'verbose';

    Then:

    1. Uninstall the module (drush pmu noahs)
    2. Remove from composer "composer remove drupal/noahs" or manually
    3. Reinstall Noah's composer require 'drupal/noahs:^1.0'
    4. Install in Drupal (drush install noahs)

    If you get an error during installation, send me a screenshot :)

    Thanks for your time!

  • Here is my screenshot:

  • also the screenshot when I enter the node page

  • 🇪🇸Spain julian_esimaginacion

    Hi hokofihe! sorry for the delay! hard days :)

    I've create a path to update the Noa's database tables: 3475758-cant-visit-content.patch

    If you don't want to install the patch, you can add this hook_update_n in your custom module (.module) and run update database.

    I hope this works for you
    Regards

    
      /**
     * Update base data tables.
     */
    
     function mymodule_update_8001() {
        if (!\Drupal::database()->schema()->tableExists('noahs_page_builder_page')) {
          $schema = [
            'description' => 'Stores example person entries for demonstration purposes.',
            'fields' => [
              'page_id' => [
                'type' => 'serial',
                'not null' => TRUE,
                'description' => 'Primary Key: Unique noahs_page_builder ID.',
              ],
              'did' => [
                'type' => 'varchar',
                'length' => 56,
                'not null' => TRUE,
              ],
              'uid' => [
                'type' => 'int',
                'not null' => TRUE,
                'default' => 0,
                'description' => "Creator user's {users}.uid",
              ],
              'nid' => [
                'type' => 'varchar',
                'length' => 56,
                'not null' => TRUE,
                'default' => 0,
                'description' => "Creator from {node}.nid",
              ],
              'langcode' => [
                'type' => 'varchar',
                'length' => 12,
                'not null' => TRUE,
                'default' => '',
                'description' => 'Language',
              ],
              'settings' => [
                'type' => 'text',
                'size' => 'big',
                'default' => '',
                'description' => 'Save the json-html',
              ],
              'page_settings' => [
                'type' => 'text',
                'size' => 'big',
                'default' => '',
                'description' => 'Save the json-html',
              ],
            ],
            'primary key' => ['page_id'],
          ];
      
          // Crea la tabla con el esquema definido.
          \Drupal::database()->schema()->createTable('noahs_page_builder_page', $schema);
        }
      }
    
  • After applied the patch my drupal website run normally!! Thank you for your hard work! :)

  • 🇪🇸Spain julian_esimaginacion

    Hi hokofihe, it's was a placer :) pls, download the latest version of this module, there are a new things and fixes

  • Merge request !32.0.0 → (Merged) created by julian_esimaginacion
Production build 0.71.5 2024