Skip to content

Closes #5744: Adding default metatag tokens to az_course (clean version) - #5785

Open
camikazegreen wants to merge 6 commits into
mainfrom
issue/5744-clean
Open

Closes #5744: Adding default metatag tokens to az_course (clean version)#5785
camikazegreen wants to merge 6 commits into
mainfrom
issue/5744-clean

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

Copy link
Copy Markdown
Contributor Author

I think what's happening here is that az_course now sets az_seo as a dependency, which is causing az_seo to be installed before az_event.

This configuration file is included in two locations:
/modules/custom/az_event/config/install/core.entity_form_display.node.az_event.default.yml
/modules/custom/az_seo/config/quickstart/core.entity_form_display.node.az_event.default.yml

I suspect that this is just the first one to fail, but this would also be an issue for person, news and flexible page.
Would it require refactoring how all of these content type modules interact with az_seo in order for this to install correctly?

@tadean

tadean commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

I think what's happening here is that az_course now sets az_seo as a dependency, which is causing az_seo to be installed before az_event.

This configuration file is included in two locations: /modules/custom/az_event/config/install/core.entity_form_display.node.az_event.default.yml /modules/custom/az_seo/config/quickstart/core.entity_form_display.node.az_event.default.yml

I suspect that this is just the first one to fail, but this would also be an issue for person, news and flexible page. Would it require refactoring how all of these content type modules interact with az_seo in order for this to install correctly?

Course shouldn't be installed at all in the base install, since it's an optional module. Taking a look at this... 😕

@tadean

tadean commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

I think you're right though... It's possible that just the presence of the dependency is making drupal change the order it installs the modules in, even if it's not actually installing az_course.

@tadean

tadean commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

I wonder if there's a core issue that Drupal orders the dependency tree on install regardless of whether the modules are to be installed or not.

@tadean

tadean commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@camikazegreen it does seem like that happens - as soon as the az_seo dependency is declared (on the optional module that's not being installed), it starts trying to install az_seo before az_event

If the dependency is removed, it starts installing them in the original order.

Strange how a module that's not being enabled affects the install order...

@az-digital-bot

Copy link
Copy Markdown
Contributor

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@camikazegreen

Copy link
Copy Markdown
Contributor Author

In order to successfully install this change to course, I ended up having to refactor the rest of the content types to eliminate duplicate config items.

I've successfully tested this in Tugboat. It installs clean, and I've verified that all existing content types work as expected. Installing az_course and importing courses works and display the appropriate metatags.

I could use particular review on all of the database updates, and I'll attempt to test them on an existing site next week.

@tadean

tadean commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

I think we should potentially consider adding a feature to our quickstart override config provider that only attempts to override configuration if the dependencies are met and/or the configuration it's overriding exists. (So that the course seo configuration can exist in the az_seo module)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add basic Metatag support to az_courses

3 participants