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

Full site editing: Wrong navigation active link when for post page. #40222

Closed
PatelUtkarsh opened this issue Apr 11, 2022 · 3 comments
Closed
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended

Comments

@PatelUtkarsh
Copy link
Contributor

Description

When adding post page in full site editing navigation page (WP core settings -> readiung -> Your homepage displays -> posts page).

In frontend, active link has wrong global $post reference causing wrong active state.

Step-by-step reproduction instructions

  1. Make sure post page exists or add new blank page and configure post page. (WP core settings -> reading -> Your homepage displays -> posts page)
  2. Go to full site edit -> Template part -> Header.
  3. Remove navigation.
  4. Add random page link as first item.
  5. Add second item as from page created in point 1.
  6. Open frontend and click on the second link from the menu.
  7. See active state is still first item. (Expected to be 2nd one). (Expected to have class current-menu-item)

Screenshots, screen recording, code snippet

active-link.mp4

Environment info

  1. WP: 5.9.3
  2. Twenty Twenty-Two as active themes.
  3. Gutenberg: not installed.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan carolinan added [Block] Navigation Affects the Navigation Block Needs Testing Needs further testing to be confirmed. labels Apr 11, 2022
@aezazs-multidots
Copy link

Hello @PatelUtkarsh

I have tried to reproduce the same issue, and yes I also got the issue of the Wrong navigation active link.

Following are the environment info
WordPress:- 5.9.3
Active Theme:- Twenty Twenty-Two
Mac OS:- Monterey 12.2.1
Chrome:- Version 99.0.4844.84 (Official Build) (arm64)

Please review from your end and let me know if there is anything.

Thank you.

@KAJALwp
Copy link

KAJALwp commented May 4, 2022

Hello @PatelUtkarsh, @carolinan

I have tried to reproduce the same issue, and yes I am also facing the same issue, with and without Gutenberg plugin.

Following are the version details
WordPress:- 5.9.3
Theme: Twenty Twenty-Two
Gutenberg Plugin:- 13.1.0
Mac OS:- Monterey 12.3.1
Chrome:- Version 99.0.4844.84 (Official Build) (arm64)

Thank you.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Aug 25, 2022
@Mamaduka
Copy link
Member

I believe this issue was fixed by @carolinan in #43800.

I can no longer reproduce it with Gutenberg 14.1 or the current trunk.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. labels Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants