Sitemap not create after install sitemap module

Created on 22 November 2023, 7 months ago
Updated 6 March 2024, 4 months ago

Hi All,

Any idea after installed composer require 'drupal/sitemap:^2.0@beta' and did the config to the page to show the sitemap page with all main menu but nothing to come up empty page just tile show in the body page once clicked on sitemap. Where I need to do the config or create anything else to make it work?

Anybody know about this please help.

Thank you in advance. :)

πŸ’¬ Support request
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States smethawee

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @smethawee
  • πŸ‡ΊπŸ‡ΈUnited States smethawee
  • Status changed to Postponed: needs info 7 months ago
  • πŸ‡¨πŸ‡¦Canada mparker17 UTC-4

    Hello smethawee,

    Sorry to hear that you had a problem when using the Sitemap module!

    Sitemap 8.x-2.0-beta4 is compatible with Drupal core versions 9.1, 9.2, 9.3, 9.4, 9.5, 10.0, and 10.1. It would help me to debug the problem you are experiencing if I knew which version of Drupal core you were using. You can find out which version of Drupal core you are using by logging in, going to /admin/reports/status (that is to say, http://yourwebsite/admin/reports/status - but because the http://yourwebsite part is different for every website, we usually leave that part out), and looking for "Drupal Version". If you have trouble with a module, many module maintainers will want to know this information.

    Some sites will not display changes you've made until you have cleared all caches, and/or run cron ("cron" = "scheduled maintenance tasks"). Normally, the Sitemap module works as soon as you save changes to its configuration... but other modules (and older versions of Drupal core) can break Sitemap's normal behaviour. It would help me if you could confirm that you have cleared all caches and run cron. You can clear all caches (sometimes called "flushing caches") by going to /admin/config/development/performance and clicking the "Clear all caches" button. You can run cron by going to /admin/reports/status and clicking the "Run cron" button. If you have trouble with a module, many module maintainers will want to know if you have flushed caches and run cron.

    Sitemap 8.x-2.0-beta4 also requires that someone trying to access the sitemap has the access sitemap permission. There are two reasons for this: (1) Drupal is secure-by-default, so every page needs to have a permission to control it, and (2) it can be useful for site administrators to easily toggle a feature (like a sitemap) "on" when they're ready to launch the feature, or toggle it "off" if they find a problem... permissions make this easy without affecting the rest of the site. It would help me if I knew which role you were trying to access the sitemap as, and whether that role has been assigned the "access sitemap" permission. You can see which permissions are assigned to which roles at /admin/people/permissions.

    On that note, the sitemap should appear at /sitemap. From your description, it sounds like you are testing the right page, but the URL is not shown in your screenshot. It would reassure me if you could confirm that you are testing the page at /sitemap.

    You said that you made changes to Sitemap's configuration. Sitemap 2 is configured using a "plugin" system (menus are one type of plugin, but there are several others)... by default, Sitemap 8.x-2.0-beta4 will only show items on the sitemap that correspond to plugins that you have enabled... we do this because we want to make the sitemap as customizable as possible. It would help me if you could confirm that the plugin(s) (i.e.: the menu(s)) that you want to show on the sitemap are still checked after navigating away from the Sitemap configuration page (honestly, I often forget to click "Save configuration" on the sitemap configuration page after making changes). You can do this by going to any other page, then going to /admin/config/search/sitemap... the plugins that are checked in the "Enabled plugins" section on that page should also appear in the "Plugin display order" section, and should have a corresponding vertical tab in the "Plugin settings" section of that page... so in your case, under "Enabled plugins", then "Menu: Main navigation" should be checked, and in the "Plugin display order" section, you should see "Menu: Main navigation" with a re-order handle next to it, and in the "Plugin settings" section, you should see a vertical tab labelled "Menu: Main navigation". Don't forget to click "Save configuration" if you have made any changes!

    On a similar topic, Sitemap 8.x-2.0-beta4 will (by default) only show menu items that are enabled, because some site administrators want to build out sections of their site, and only show these sections when they are ready. It would help me if you could confirm whether the items in the menu that you want to display on the sitemap are enabled. If you go to /admin/structure/menu, and click "Edit menu" next to the menu you have configured, then you will see the menu items in that menu, and an "Enabled" checkbox in the column next to them. Enabled menu items are checked; disabled menu items are unchecked.

    Finally, one of the sites I maintain has a very large number of pages, and I have found that the Sitemap module behaves strangely when it has a lot of items to display. It would help me to know roughly how many menu items are in the menu you want to display on the sitemap (i.e.: are there less than 200 menu items, or more?).

    Sorry for the long response! If you figure out the problem, please post back here to let me know you fixed it! If you cannot figure out the problem, then please let me know your answers to the questions in this post, and I'll see if I can figure out some other things you could try, or if I have additional questions. I wish you good luck!

    (since I needed more information to debug the problem, I have changed the status of this support request from "Active" to "Postponed (maintainer needs more info)": this is normal - please read the Issue Status field documentation β†’ for more information)

    (please note I have removed the issue tag - please read the issue tag guidelines β†’ for more on why)

  • πŸ‡ΊπŸ‡ΈUnited States smethawee

    Hello @mparker17

    Thank you for you reply to my issue. Yes, It is Drupal 10.1.6. I have cleared caches and run cron. I'm admin user permission and confirm you that is /sitemap.
    I have about 25 menu to add it but I just check mark only main menu ad footer menu
    and this is in the sitemap page I saw in the Body (Edit summary) code it in there.

    ------------------------------------------

      Keyboard Navigation Description

      The tree can be navigated via the keyboard as described below.

      (function($) { $(function(){ $sm = $('#sitemap-placeholder'); var hasAdminMenu = $('#admin-menu').length; var $template = $($('#template-content').text()); $template.find('.site-menu').each(function(){ if ($(this).is('.styleguide-site-menu') && !hasAdminMenu) return; var $li = $('
    • '); var $ul = $(this).children('ul').first(); var $title = $(this).children('.site-menu-title').first(); $li.append($('').attr('href', $ul.find('a:first').attr('href')).html($title.html() || $ul.find('a:first').text().replace(' Home', '').replace(' home', '') )); $li.append($ul); $ul.find('div > *').unwrap(); $li.find('.sub-menu-toggle,.megamenu-skip-link,.more-wrapper,button').remove(); $ul.find('h3').each(function(){ $(this).next('ul').prepend($('
    • ').append(this)); }); $li.find('*').removeAttr('class').removeAttr('style').removeAttr('aria-labelled-by').removeAttr('aria-haspopup').removeAttr('aria-expanded').removeAttr('aria-owns').removeAttr('aria-controls').removeAttr('id'); $li.find('a[title]').each(function(){ $('').text(' - ' + $(this).attr('title')).insertAfter(this); }); $sm.append($li); }); if($sm.children().length == 1) { var $subchildren = $sm.find('> li > ul > li').detach(); $sm.empty().append($subchildren); } if($.fn.a11yTree){ $('#sitemap-placeholder').a11yTree({ treeLabelId:$('h1.page-title,.page-title-wrapper h1').first().uniqueId().attr('id'), //toggleSelector:'i.fa', //treeItemLabelSelector:'.tree-item-label', //onCollapse:function($item) { // customCollapse($item); //}, //onExpand:function($item) { // customExpand($item); //} }).parent().addClass('a11y-tree'); $('#keyboard-nav-description').show(); } else { if (window.console && window.console.warn) window.console.warn('jquery.a11yTree.js plugin not found, cannot generate accessible treeview'); } }); })(jQuery);

      ----------------------------------------
      I did tested it disable module and enable module is not help to make it work too.

      Again, Hope we will find out what going on it.

      Thanks much,
      Methawee

  • Status changed to Active 4 months ago
  • πŸ‡¨πŸ‡¦Canada mparker17 UTC-4

    Sorry for the delay in answering: I didn't see that you had replied! Moving back to "Active" so I can take a look this week.

  • Production build 0.69.0 2024