Skip to content

Hash in the landingPage URL gets duplicated and doesn't work #909

@dkotter

Description

@dkotter

In setting up a public preview for one of our plugins (Simple Local Avatars to be specific) I was wanting to land the user on a specific settings page and ideally have them be taken to the proper section of that page by utilizing a hash in the URL.

I set the landingPage property to the following:

"landingPage": "\/wp-admin\/options-discussion.php#show_avatars",

When the Playground loads, it sends me to that settings page but the URL contains the hash part twice: /wp-admin/options-discussion.php#show_avatars#show_avatars and I believe because of that, it doesn't jump the user down to the proper place on the page. If I remove the extra hash and hit enter, it does load and jump correctly.

Not sure if there's something I'm doing wrong here that's causing that double hash or if there's something else I need to do to escape this value. I tried replacing the hash (#) with the encoded property instead (%23) but that also didn't work.

If helpful, you can see / test the Playground URL here: 10up/simple-local-avatars#252 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions