Skip to content

সমস্যা: after a refresh url fragment/anchor(/#example) not working properly #987

@Jisan-mia

Description

@Jisan-mia

easy way of getting the error is by following

  1. https://devsonket.com/bootstrap5 paste the link in your browser
  2. click on any title fragment link, and you'll get the below error

image

see the issue by yourself:

  1. enter the website `https://devsonket.com/'
  2. click on bootstrap5 cheatsheet, which takes me to this URL https://devsonket.com/bootstrap5
  3. click on the 4th title fragment link which is হরিজেন্টাল অ্যালাইনমেন্ট
  4. this adds the fragment to the cheatsheet URL like this https://devsonket.com/bootstrap5#হরিজেন্টাল%20অ্যালাইনমেন্ট and scrolls down on that section হরিজেন্টাল অ্যালাইনমেন্ট, works fine till now
  5. now refresh the current page
  6. and click on another title fragment link `ভার্টিকাল অ্যালাইনমেন্ট'
  7. now the url becomes like this https://devsonket.com/bootstrap5/bootstrap5#ভার্টিকাল%20অ্যালাইনমেন্ট and redirects to the এখানে কিছু পাওয়া যায় নি! page
  8. the same pattern applies to every other cheatsheet
  9. also this same thing happens when we share a cheatsheet link with someone

I assume the issue could occur from these lines

<a href={`${slug}#${title}`}>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions