Skip to content

inner page anchor doesn't work in case of chinese characters on it #4792

Closed
@guoapeng

Description

@guoapeng

Hi there,
when I open a post on the left hand of which there is a outline view, if I click on the item which contains chinese charactors, it can't bring me to the proper anchor point with no response.
when I open the developer mode of the browser chrome, I got the error like this and captured an screenshot of the error, please refer to the image.
Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null
at HTMLAnchorElement. (utils.js:240)
image
Uploading image.png…

the hexo version and plugin version are listed, please check and advise, thanks in advance!

$hexo v
INFO  Validating config
hexo: 5.4.0
hexo-cli: 4.3.0
os: linux 5.4.70-amd64-desktop Deepin 20.1 20.1
node: 14.17.6
v8: 8.4.371.23-node.76
uv: 1.41.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.17.2
modules: 83
nghttp2: 1.42.0
napi: 8
llhttp: 2.1.3
openssl: 1.1.1l
cldr: 39.0
icu: 69.1
tz: 2021a
unicode: 13.0
themes:
"name": "hexo-theme-next",
  "version": "7.8.0",
# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------

scheme: Gemini

Activity

stevenjoezhang

stevenjoezhang commented on Oct 6, 2021

@stevenjoezhang
Member

This issue has been fixed in next-theme/hexo-theme-next@0d2b3af
Theme NexT version 7.8.0 is outdated. The latest version is v8.8.0 https://github.com/next-theme/hexo-theme-next/releases/tag/v8.8.0

guoapeng

guoapeng commented on Oct 6, 2021

@guoapeng
Author

thanks @stevenjoezhang for the reply, that is very helpful! I will try the latest version and to see if it can solve the problem.
but I guess I was missled by the installation instruction of the hexo-theme-next. I followed installation approach option 1 on the page detailed installation instructions, the script on the page to get latest release version is still returning v7.8.0 at the moment. I think that could be a problem I have to report to you guys.

$curl -s https://api.github.com/repos/theme-next/hexo-theme-next/releases/latest | grep tarball_url
"tarball_url": "https://api.github.com/repos/theme-next/hexo-theme-next/tarball/v7.8.0",
guoapeng

guoapeng commented on Oct 7, 2021

@guoapeng
Author

yeah, I tried the new version which fixed the issue, thanks @stevenjoezhang

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

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

        Participants

        @guoapeng@stevenjoezhang

        Issue actions

          inner page anchor doesn't work in case of chinese characters on it · Issue #4792 · hexojs/hexo