0

Short version: before updating to WP 4.5 and on a day when the only known change was adding a page to a submenu via the navigation menu admin all of the menu links of type Custom Link where we specify a URL suddenly lost their href attributes. Links of type Page still have theirs.

After much experimentation I confirmed that deactivating all plugins did not change this but setting TwentyFifteen as theme corrected it.

Theme authors are no longer available for assistance.

Long version:

So far I have managed to confirm that all of the bad entries have no href attribute on their tag so they don’t know what to link to and that all of the ones having this issue are of the type Custom Link where we have supplied an address.

I have disabled an re-enabled all plugins to no effect on this. I have just now updated to WordPress 4.5 which came out today. That did not fix.

I loaded and saved edits to the menu to see if that would re-set. It did not.

Loaded page with JavaScript turned off to rule out jQuery or other JS stripping off the hrefs after rendering. They were still gone.

Tried editing a local custom link and removing host to see if links starting w http were issue but that did not change anything.

Added a CSS class to one of the custom links via admin and verified it showed up on the enclosing <li> on front end but no help with href on link.

So far only support post I have found re this said they had a corrupted database table that caused it. So I ran a CHECK TABLE on every one of the WP tables and all came back as Ok.

Switching theme to TwentyFifteen has all menu items with correct href attributes. Switch back and issue recurs.

In header.php the menu is drawn via wp_nav_menu(array('menu_class'=>'sf-menu')). I am guessing the sf is for superfish. I removed the class and the menu was drawn unstyled but still lacking hrefs on custom links.

functions.php does not seem to have a replacement for wp_nav_menu()

So where do I go next?

  • Are you using a sourced theme, or something you have written? – Nathan Powell Apr 15 '16 at 2:59
  • @NathanPowell Theme is called Gospel and was purchased by a previous developer via ThemeForest but the author is no longer on TF. We think we may have found their new company and are seeking the previous developer for the purchase id as theme author refuses all contact without purchase id. – jerrygarciuh Apr 16 '16 at 23:54
0

I think this is likely due to the issue of the core upgrade to jQuery 1.12. Check out this page. In the core discussion yesterday it was the highest priority and decided that it relies on the theme developers, and the users to update. Please take a look at that link, it is extremely helpful. They also stated that because of this change and the problems made there will be more posts made on "make" as well as wp tavern for users.

I should also specify that the fix I am referring to is changing any: a[href=#scroll-to-top] to a[href="#scroll-to-top"]... note the double quotes!

  • Should this lead you to the solution or not, please update us to your progress here. In the world of open source software/programming it is imperative we understand where things breakdown, regardless of blame. – Nathan Powell Apr 15 '16 at 3:49
  • I will investigate this but the linked post references WP 4.5 and this happened prior to making that update. Thank you for the reply! – jerrygarciuh Apr 16 '16 at 23:55
  • Also given that disabling JavaScript and reloading page has no effect it would seem unlikely that jQuery was the cause. – jerrygarciuh Apr 16 '16 at 23:56
  • I misread the question, thinking the upgrade happened before discovery. Good luck! – Nathan Powell Apr 17 '16 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.