I am including Custom Menu Link Entities: http://take.ms/7axvi

However, no menu links are showing up in the sitemap. Only content type entities are. When I look at the "Custom menu link" vertical tab of the settings, it is showing 53 indexed items but 0 visible. http://take.ms/kJdA0

I tried editing and saving several menu items (leaving XML sitemap settings to use the default), rebuilding through the UI, and clearing the cache. This did not fix it.

I tried editing and saving several menu items (changing XML sitemap settings from the default), rebuilding through the UI, and clearing the cache. This did not fix it.

There are no errors in the recent log messages.

Am I missing something? Or is this a bug?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dobrzyns created an issue. See original summary.

cristian100’s picture

Same problem, can't get Main menu items to show on xml sitemap.

anish.a’s picture

Same issue for me.

jorgegc’s picture

Component: User interface » Code
Category: Support request » Bug report
Priority: Normal » Major
Status: Active » Needs review
FileSize
1.35 KB

The issue is coming from checking whether anonymous users have access to view the menu item entity and not the page it is pointing to. I have created a patch that addresses this issue.

C-Logemann’s picture

I can confirm this bug and patch #4 is fixing it.
+1 for RTBC

pifagor’s picture

Status: Needs review » Needs work

This patch didn't passed the tests. You need to work on the patch

jorgegc’s picture

Status: Needs work » Needs review

@pifagor, the patch didn't even trigger the tests because the branch hadn't passed tests in 4 weeks. I am manually triggering tests now.

pifagor’s picture

The patch must pass automatic tests

hanoii’s picture

It works, although I noticed something odd on my use case.

I have a menu that has links for both internal nodes and also non-existant URLs, which is because this menu is fed to a frontend angular application. This non-existant URls end up with the URL from which the sitemap is regenerated.

I think it should use the same url configured as the rest.

Dave Reid’s picture

Dave Reid’s picture

Took a look at this and I think we can do even better. Let's attempt to transform the URL to a relative one, and let's support when the user enters a manual base path like /something.

Dave Reid’s picture

Okay I have tested this version with:
1. Normal routed menu links (entities, etc)
2. <front> links
3. <nolink> links
4. base:/path links
5. Not-same domain external links

  • Dave Reid committed 36bb1cb on 8.x-1.x
    Issue #2852713 by Dave Reid, jorgegc: Fixed menu link processing did not...
Dave Reid’s picture

Issue tags: +Needs tests

Comitted #12 to 8.x-1.x. Leaving open for tests.

pifagor’s picture