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

System pages such Login produce wrong breadcrumbs #390

Open
fthobe opened this issue Dec 11, 2024 · 0 comments
Open

System pages such Login produce wrong breadcrumbs #390

fthobe opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fthobe
Copy link
Contributor

fthobe commented Dec 11, 2024

Many pages like the Log-in Page produce incorrect breadcrumbs. Currently Products is practically reported back as root if the page is neither home nor a Taxon or Product.

breadcrumbs_component.rb

  def crumbs
    return @crumbs if @crumbs

    @crumbs = [
      { name: t('spree.home'), url: helpers.root_path },
      { name: t('spree.products'), url: helpers.products_path }
    ]

    if(taxon)
      @crumbs += taxon.ancestors.map do |ancestor|
        { name: ancestor.name, url: helpers.nested_taxons_path(ancestor.permalink) }
      end

      @crumbs << { name: taxon.name, url: helpers.nested_taxons_path(taxon.permalink) }
    end

    @crumbs
  end

In fact Google gives wrong breadcrumbs
Screenshot 2024-12-18 at 13 10 00

Solidus Version:
Current

To Reproduce
Install starter-frontend

Current behavior
Wrong breadcrumbs are shown

Expected behavior
The page should produce a breadcrumb path similar to Home > Login.
A login page breadcrumb can be ommited according to specifications, but the page should be placed in the correct paternal element (eg Home or Home > Account)

Screenshots
Screenshot 2024-12-11 at 10 37 59

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

@fthobe fthobe added the bug Something isn't working label Dec 11, 2024
@fthobe fthobe changed the title Login Page producing wrong breadcrumbs System pages such Login produce wrong breadcrumbs Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant