govCMS / GovCMS

Current Drupal release of the main GovCMS distribution, with releases mirrored at https://www.drupal.org/project/govcms
GNU General Public License v2.0
128 stars 40 forks source link

'core_version_requirement' error message triggered by core modules in profiles folders. #1136

Open gingerrobot opened 2 weeks ago

gingerrobot commented 2 weeks ago

The 'core_version_requirement' key must be present in profiles/govcms/web/core/profiles/minimal/minimal.info.yml

Related issues:

https://www.drupal.org/project/drupal/issues/3391778 https://www.drupal.org/project/drupal/issues/3383616

This relates to the file: line 55 of core\lib\Drupal\Core\Extension\InfoParserDynamic.php

  if (str_starts_with($filename, 'core/') || str_starts_with($filename, $this->root . '/core/')) {

The files in the govcms distribution don't start with'core'. We probably need to add a patch to check for govcms core modules as part of the govcms distribution composer.json.

pandaskii commented 2 weeks ago

I can think of two possible reasons for this issue.

First, there might be an incorrect mapping, with the web folder located under the govcms folder.

When building the GovCMS profile inside the profiles/govcms folder, Drupal may encounter confusion due to the presence of duplicate files. This issue arises because Drupal detects two copies of the same files.

To resolve this, simply remove the redundant web folder. Once this is done, the issue should be resolved.

Second, you might be building GovCMS within an existing Drupal instance.

Since GovCMS is built as a standalone distribution, simply downloading the GovCMS profile and saving it in the Drupal profiles folder, then running composer install, will not work. GovCMS automatically creates a web folder and copies all necessary files into it, which can cause confusion if you already have a Drupal instance.

To avoid this issue, the easiest way to integrate GovCMS is to check out our scaffold project. Review the composer.json file located in the project's root directory and see if it can be combined with your local project. You can find the scaffold project at (https://github.com/govCMS/scaffold).

thisisalistairsaccount commented 3 days ago

Hi @gingerrobot just wondering if the advice helped or if there's a bigger issue still at play?