Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

archive-product block template doesn't correctly show its title #5564

Closed
sunyatasattva opened this issue Jan 13, 2022 · 4 comments · Fixed by #6452
Closed

archive-product block template doesn't correctly show its title #5564

sunyatasattva opened this issue Jan 13, 2022 · 4 comments · Fixed by #6452
Assignees
Labels
type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team.

Comments

@sunyatasattva
Copy link
Contributor

Describe the bug

The slug archive-product does not get parsed into the correct human readable title.

To reproduce

Steps to reproduce the behavior:

  1. Go to Appearance → Editor → Browse all templates
  2. Make sure you have archive-product.html in your theme's templates directory
  3. Notice how the slug is not parsed into a title

Expected behavior

Slug should read "Product archive" if language is set to English.

Screenshots

Screen Shot 2022-01-13 at 23 47 44

@sunyatasattva sunyatasattva added the type: bug The issue/PR concerns a confirmed bug. label Jan 13, 2022
@Aljullu
Copy link
Contributor

Aljullu commented Jan 14, 2022

@sunyatasattva I thought that was expected if the theme doesn't define the template under templates in theme.json. Is it only happening for archive-product or for any other WC template?

@sunyatasattva sunyatasattva added type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. type: cooldown Things that are queued for a cooldown period (assists with planning). labels Jan 14, 2022
@sunyatasattva
Copy link
Contributor Author

@Aljullu Perhaps I'm wrong, but I think this is actually a bug in the way the strings are parsed, and I also might know where it stems from. This only happens for archive-product and, as you can see, the Product Category and Product Tag are correctly named (even though in the example above, they do not exist and are actually using the archive-product fallback).

Again, I might be wrong, but what would be the intent of leaving archive-product as a slug? I think I might have actually introduced this bug myself 😬

@tjcafferkey
Copy link
Contributor

I think this is expected behaviour, it may seem to work for Product Category and Product Tag because of a side-effect of us duplicating the themes archive-product.html for those templates somehow.

If you add a single-product.html file to the theme without defining it in theme.json you get the same result.

Screenshot 2022-01-25 at 08 42 09

Still if we are able to fix it I don't see why not, however we need to be aware that if a title is defined in the themes theme.json that should superseed our naming convention.

@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Mar 27, 2022
@sunyatasattva sunyatasattva removed the status: stale Stale issues and PRs have had no updates for 60 days. label Mar 29, 2022
@wavvves wavvves assigned wavvves and unassigned wavvves May 5, 2022
@dinhtungdu dinhtungdu self-assigned this May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). type: good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants