Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace date replace var with an empty string on terms. #18598

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

hansjovis
Copy link
Contributor

Context

  • Since terms do not have a published date, we do not want to output anything when a user enters a %%date%% replace var in the title or meta description of a term.

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a bug where the date replacement variable would output 0 when used in categories or tags, instead of not outputting anything as shown in the Google preview.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Please test this in a 'normal' term (either category or tag) and in a term from a custom taxonomy.

  • Create a term.
  • Add the %%date%% replace var in either the meta description or SEO title.
  • See that the Google preview replaces the replace var with nothing.
  • Publish the term.
  • Go to the term page on the website.
  • Check the source code of the term page. It should be the same as the one shown in the Google preview.
    • E.g. the %%date%% replace var should be replaced by nothing / the empty string.
    • Note: There is another existing bug where empty strings are replaced with a single space.

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.

Fixes #

@hansjovis hansjovis added the changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog label Jun 21, 2022
@IreneStr
Copy link
Contributor

@hansjovis Is this still relevant, or can it be closed? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants