Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/drupal-issue.html
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,12 @@ <h2>Feedback &amp; Community</h2>
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 */ }

Expand Down
24 changes: 13 additions & 11 deletions drupal-contrib/template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down