admin管理员组文章数量:1122832
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?
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?
Share Improve this question asked Apr 15, 2016 at 1:42 jerrygarciuhjerrygarciuh 1531 gold badge1 silver badge14 bronze badges 2- Are you using a sourced theme, or something you have written? – Nathan Powell Commented Apr 15, 2016 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 Commented Apr 16, 2016 at 23:54
1 Answer
Reset to default 0I 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!
本文标签: menusAll custom links suddenly lack href attributes
版权声明:本文标题:menus - All custom links suddenly lack href attributes 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736287537a1927900.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论