diff --git a/docs/drupal-issue.html b/docs/drupal-issue.html
index f5a0957..dee7120 100644
--- a/docs/drupal-issue.html
+++ b/docs/drupal-issue.html
@@ -575,10 +575,12 @@
Feedback & Community
if (issueResp.ok) {
const issue = await issueResp.json();
if (issue.title) title = issue.title;
- // field_issue_version e.g. "10.6.x-dev" or "11.x-dev" → extract major version
+ // field_issue_version is "10.6.x-dev", "11.x-dev", "12.x-dev", or "main"
+ // "main" means the current development branch (D12+); no leading digit → use 12.
const ver = issue.field_issue_version || '';
const m = ver.match(/^(\d+)\./);
if (m) drupalMajor = m[1];
+ else if (ver === 'main' || ver.startsWith('12')) drupalMajor = '12';
}
} catch (_) { /* title/version stay as fallback */ }
diff --git a/drupal-contrib/template.tf b/drupal-contrib/template.tf
index 267df98..c5774c2 100644
--- a/drupal-contrib/template.tf
+++ b/drupal-contrib/template.tf
@@ -702,20 +702,22 @@ COMPOSE_EOF
fi
if [ "$SETUP_FAILED" = "false" ]; then
- # Enable the module or theme
+ # Enable the module or theme.
+ # ddev drush en can exit non-zero even when the module ends up enabled
+ # (e.g. a post-install hook in another module throws a fatal), so verify
+ # via pm:list rather than trusting the exit code.
log_setup "Enabling $PROJECT_NAME ($PROJECT_TYPE)..."
if [ "$PROJECT_TYPE" = "theme" ]; then
- if ddev drush theme:enable "$PROJECT_NAME" -y >> "$SETUP_LOG" 2>&1; then
- log_setup "✓ $PROJECT_NAME enabled"
- else
- log_setup "⚠ Warning: could not enable theme $PROJECT_NAME (may need manual enable)"
- fi
+ ddev drush theme:enable "$PROJECT_NAME" -y >> "$SETUP_LOG" 2>&1 || true
else
- if ddev drush en "$PROJECT_NAME" -y >> "$SETUP_LOG" 2>&1; then
- log_setup "✓ $PROJECT_NAME enabled"
- else
- log_setup "⚠ Warning: could not enable module $PROJECT_NAME (may need manual enable)"
- fi
+ ddev drush en "$PROJECT_NAME" -y >> "$SETUP_LOG" 2>&1 || true
+ fi
+ if ddev drush pm:list --status=enabled --format=list 2>/dev/null | grep -qw "$PROJECT_NAME"; then
+ log_setup "✓ $PROJECT_NAME enabled"
+ update_status "✓ $PROJECT_NAME: Enabled"
+ else
+ log_setup "⚠ Warning: $PROJECT_NAME not found in enabled modules list"
+ update_status "⚠ $PROJECT_NAME: Not enabled (check /tmp/drupal-setup.log)"
fi
fi
fi