Skip to content

Closes #5744: Adding default metatag tokens to az_course - #5745

Closed
camikazegreen wants to merge 4 commits into
mainfrom
issue/5744
Closed

Closes #5744: Adding default metatag tokens to az_course#5745
camikazegreen wants to merge 4 commits into
mainfrom
issue/5744

Conversation

@camikazegreen

Copy link
Copy Markdown
Contributor

Description

Closes #5744 by adding default SEO metatag support for Course content.

This change:

  • Adds the optional field_az_metatag attachment to the Course content type.
  • Adds default metatag title and description templates for Course content using the Course title and description fields.
  • Adds the Meta tags field to the Course edit form when az_seo is installed.

Related issues

Closes #5744

How to test

  1. Install a site with both az_course and az_seo enabled.
  2. Create or edit a Course node.
  3. Verify the Meta tags field is available on the Course edit form.
  4. View the Course page source.
  5. Verify:
    • The page <title> uses the Course title.
    • The <meta name="description"> uses the Course description.
    • The Open Graph title and description are populated from the default metatag configuration.

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix

Checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.

@camikazegreen
camikazegreen requested review from a team as code owners July 1, 2026 20:55

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure whether to put this in the install folder or as optional config since I do not want az_seo to depend on az_course, but I followed the existing pattern from Event, News and Person.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message
Unable to install Quickstart Course, core.entity_form_display.node.az_course.default already exists in active configuration.

What is our standard pattern when we want to have two modules both be optional, but interact successfully in the cases where they are both installed?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe core.entity_form_display.node.az_course.default.yml should be in config/optional as well instead of config/quickstart?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for it to successfully install, add the field to the course content type and display correctly.
What it does not do is add the metatag field to the node edit form for the ability to edit/override. Maybe that's ok?

@tadean tadean Jul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we currently have any other existing patterns where an optional module overrides the configuration of an optional module without depending on it.

This same issue probably affects publications also, which should properly have metatags.

Some options:

  • Expand our quickstart config provider to have a notion of selective overrides to optional modules?
  • Programmatic hook to add the configuration change via code (not necessarily great as it wouldn't allow for distribution updates of that)
  • A recipe that adds metatag fields to content types that lack it?
  • make courses depend on az_seo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the Wednesday meeting on 7/15 we decided to just make courses depend on az_seo.

@tadean
tadean self-requested a review July 1, 2026 22:33
@joeparsons joeparsons changed the title Adding default metatag tokens to az_course Closes #5744: Adding default metatag tokens to az_course Jul 10, 2026
@joeparsons joeparsons added the enhancement New feature or request label Jul 10, 2026
@joeparsons joeparsons moved this from Todo to Needs review in 3.5.0-alpha1 Jul 10, 2026
Comment thread modules/custom/az_seo/config/install/metatag.metatag_defaults.node__az_course.yml Outdated
@camikazegreen

Copy link
Copy Markdown
Contributor Author

I recreated this branch from a clean main to resolve some branch history and CI issues encountered while rebasing. The replacement PR is #5785 . Closing this one in favor of the clean history.

@github-project-automation github-project-automation Bot moved this from Todo to Done in 3.6.0-alpha1 Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add basic Metatag support to az_courses

5 participants