As part of my college coursework, I have been tasked with developing a genomic database with a locally accessible website and some basic tools. I have installed Drupal 10.2.4 with PostgreSQL 14.11 and PHP 8.3.4. I am trying to install Tripal module version 3.10 using

sudo -u www-data composer require 'drupal/tripal:^3.10' -W

but I keep getting error

Your requirements could not be resolved to an installable set of packages.   

Problem 1     - Root composer.json requires drupal/tripal ^3.10, found drupal/tripal[dev-4.x, 4.0.0-alpha1, 4.0.0-alpha2, 4.x-dev (alias of dev-4.x)] but it does not match the constraint.   Installation failed, reverting ./composer.json and ./composer.lock to their original content.

My compose.json has the following specified
{
"require": {
    "drush/drush": "^12.4",
    "drupal/core": "^10.2"
}
}

I do not want to use Tripal v4 since it is still in development and since I am new to Drupal and coding, I am not confident to handle bugs. As a side note, I did try using Tripal version 4 using

sudo -u www-data composer require 'drupal/tripal:^4.0@alpha'

and things seem to work fine, until I tried installing Chado using Home > Administration > Tripal > Data Storage > Chado > Install Chado

and ended up with another error. I am not sure if this is related or not, but I figured I would be facing less bugs with v3 than v4 of Tripal. From what I can grasp (with my limited knowledge) this seems to be related to the absence of drupal_chado_installations table, but it does in fact exist as follows

SELECT * FROM information_schema.tables WHERE table_name = 'drupal_chado_installations';

table_catalog    | table_schema |         table_name         | table_type | self_referencing_column_name | reference_generation | user_defined_type_catalog | user_defined_type_schema | user_defined_type_name | is_insertable_into | is_typed | commit_action
--------------------+--------------+----------------------------+------------+------------------------------+----------------------+---------------------------+--------------------------+------------------------+--------------------+----------+---------------
 teak_wood_genes_db | public       | drupal_chado_installations | BASE TABLE |                              |                      |                           |                          |                        | YES                | NO       |

I have anyway attached the error I am getting with Chado installation.

The website encountered an unexpected error. Try again later.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "drupal_chado_installations" does not exist LINE 3: "drupal_chado_installations" "i" ^: SELECT "i"."install_id" AS "install_id", "i"."schema_name" AS "schema_name", "i"."version" AS "version", "i"."created" AS "created", "i"."updated" AS "updated" FROM "drupal_chado_installations" "i"; Array ( ) in Drupal\tripal_chado\Database\ChadoConnection->getAvailableInstances() (line 279 of modules/contrib/tripal/tripal_chado/src/Database/ChadoConnection.php).

Drupal\Core\Database\StatementWrapperIterator->execute() (Line: 851)

Drupal\Core\Database\Connection->query() (Line: 239)
Drupal\pgsql\Driver\Database\pgsql\Connection->query() (Line: 525)
Drupal\Core\Database\Query\Select->execute() (Line: 155)
Drupal\pgsql\Driver\Database\pgsql\Select->execute() (Line: 279)
Drupal\tripal_chado\Database\ChadoConnection->getAvailableInstances() (Line: 47)
Drupal\tripal_chado\Form\ChadoInstallForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Comments

rhip’s picture

As you've found, the version of Tripal you're trying to install (v3.10) is not compatible with the version of Drupal you're using (v10.2.4). Drupal 7 has already reached EOL so it might not be ideal to use it, although given that this is for coursework you could try it?

The error about the missing table sounds like Drupal is unable to find this table despite it existing in your PostgreSQL database. Three things I can think to check are:

1. Database connection in your settings file:

It's possible that Drupal is trying to connect to a different database than the one that you are expecting - check your db settings in your settings.php file

2. Flush the cache - a cache flush might be needed for Drupal to recognise newly added tables

3. Table prefixes - are you using table prefix?