proudcity / wp-proudcity

The ProudCity WordPress platform
https://proudcity.com
Other
21 stars 9 forks source link

Menu links refresh page for logged out users instead of navigating to menu item #2070

Open curtismchale opened 2 years ago

curtismchale commented 2 years ago

Source Various

Likely related to: https://github.com/proudcity/wp-proudcity/issues/2071

Describe the bug Sometimes a menu gets into a state where clicking an item simply refreshes the page. The HTML appears to be formatted properly and there are no JS errors that appear to be related.

Both saving the menu and clearing WP Rocket cache seem to fix the problem.

I think that since both of these actions fix the issue, it comes down to caching. Saving the menu should invalidate the cache so it gets cleared. Clearing the cache obviously...clears the cache. So both of the "fixes" that have worked may be the exact same thing.

To Reproduce We don't currently have confirmed steps to reproduce the problem.

Expected behavior Menu links should work as expected and take you to the page in question.

curtismchale commented 2 years ago

Possible fix with https://github.com/proudcity/wp-proud-core/commit/cf34ee4bf7ad1dc871f7bdb2f4db79fa1f9fad01 but we won't know until this gets out live and the problem doesn't happen again.

For now we're blocked until we have more information and can reproduce it reliably.

kevindherman commented 2 years ago

Streetsboro just reported this again without making edits to the site and confirmed the error in the following browsers: Chrome 103.0.5060.114 Firefox 102.0.1 Brave 1.40.113

They've reported it a few times so they may be a good instance to dig into since I think they're pretty standard but this issue keeps happening. @curtismchale

kevindherman commented 2 years ago

@curtismchale this is from Jarrel:

"Just about our entire website is not working. The Home page, Utility page and Council page are the only pages that will work. When you click on Police, Elections or any other tab in our main menu, it just sends you to the Home page. The same is happening with all of our documents. No matter which one you select, it takes you to the Home page. Since I am logged onto the site from my computer and everything seems to be "normal", I used several other computers within the office to double check everything because we've received customer complaints and that is how I found our website to be behaving. I uploaded a couple of agendas on Friday (July 8th) and that was it. All previous activities before then were documented on my last support ticket about this same issue (# 5865). We need to have this fixed immediately!"

So if the hope was that the fix for them would do the trick here's the info I just got.

kevindherman commented 2 years ago

@curtismchale I went in to troubleshoot and noticed the police department menu item was showing as pending:

Screen Shot 2022-07-11 at 11 16 42 AM

I saved the menu, cleared the cache and it worked.

I think there may be something where menus are pending for some reason and that throws everything off.

kevindherman commented 2 years ago

Additional context from Jarrell:

I have changed a few things under News, Jobs and Holiday Closure to “draft” instead of just deleting them. Do you think that’s what is causing this? If so, then I can just delete instead of having them “saved” as a draft. I do it so that (1) we do not lose the documentation and (2) I use the old postings as an example to how I had the setting for uniformity.

I wonder if changing something from published to draft is crossing up the menu because she should be able to do what she's describing but the menu can keep up with it @curtismchale

curtismchale commented 2 years ago

@kevindherman it's possible, but it shouldn't do that. Can we get a link to some of those items that were marked as draft. Maybe the Quick Menu plugin is having an odd interaction with the whole system?

kevindherman commented 2 years ago

@curtismchale if you look at the menu on this draft page that seems like it should be removed entirely, it could be messing up the menu: https://www.cityofjarrell.com/?page_id=7463&preview=true

Even looking at the draft list there are items that are homepage, police, election and meetings which have been sore points for this site. https://www.cityofjarrell.com/wp-admin/edit.php?post_status=draft&post_type=page

This might be too specific for Jarrell and not the larger problem that something with saving menus is upset.

curtismchale commented 2 years ago

This can be reproduced by finding content that is in a menu via WP Quick Menu. Mark that item as draft and then look at the menu. It will also be marked as draft with pending items as seen in the screenshot below.

CleanShot 2022-07-14 at 15 15 59@2x

The ultimate fix is to finish off our own revamp of the Quick Menu plugin which is this issue: https://github.com/proudcity/wp-proudcity/issues/2057

curtismchale commented 2 years ago

See comment for current status of this and it's path to being properly fixed.

lukefretwell commented 1 year ago

Possibly related to #2192