Here's a patch to the sitemap module, created through the formupdater. Since I'm new to drupal, I won't dare committing it to cvs. However, applying these patches has worked for me.

The old code that I replaced:

   $output = form_textarea(t("Description"), "sitemap_description",
     variable_get("sitemap_description", "This is a site map"), 70, 7,
     t('This text will be displayed at the top of the site map page'));
   $output .= form_select(t("Omitted vocabularies"), "sitemap_overview_vocab",
     variable_get("sitemap_overview_vocab", array()), $select,
     t("Select vocabularies which should be <b>omitted</b> from listings."), "", 1);  
   $output .= form_textfield(t("Navigation link text"), "sitemap_overview_title",
     variable_get("sitemap_overview_title", t("site map")), 35, 255,
     t("The text in the navigation link which points to the site map page."));  
   $output .= form_textfield(t("Number of nodes to show"), "sitemap_max_rows",
     variable_get("sitemap_max_rows", "0"), 10, 10,
     t("Number of nodes to show per taxonomy term. Set to 0 if you do not want nodes to listed"));  
   $output .= form_checkbox(t("Show number of nodes for each term"),
     "sitemap_node_count", 1, variable_get("sitemap_node_count", 1));
   $output .= form_checkbox(t("Show Author and number of Comments (in mousover)"),
     "sitemap_author_and_comments", 1, variable_get("sitemap_author_and_comments", 1));

with this new code, that worked in 4.7:

   $form["sitemap_description"] = array(
     '#type' => 'textarea',
     '#title' => t("Description"),
     '#default_value' => variable_get("sitemap_description", "This is a site map"),
     '#cols' => 70,
     '#rows' => 7,
     '#description' => t('This text will be displayed at the top of the site map page'),
   );
  $form["sitemap_overview_vocab"] = array(
     '#type' => 'select',
     '#title' => t("Omitted vocabularies"),
     '#default_value' => variable_get("sitemap_overview_vocab", array()),
     '#options' => $select,
     '#description' => t("Select vocabularies which should be <b>omitted</b> from listings."),
     '#extra' => "",
     '#multiple' => 1,
   );
   $form["sitemap_overview_title"] = array(
     '#type' => 'textfield',
     '#title' => t("Navigation link text"),
     '#default_value' => variable_get("sitemap_overview_title", t("site map")),
     '#size' => 35,
     '#maxlength' => 255,
     '#description' => t("The text in the navigation link which points to the site map page."),
   );
   $form["sitemap_max_rows"] = array(
     '#type' => 'textfield',
     '#title' => t("Number of nodes to show"),
     '#default_value' => variable_get("sitemap_max_rows", "0"),
     '#size' => 10,
     '#maxlength' => 10,
     '#description' => t("Number of nodes to show per taxonomy term. Set to 0 if you do not want nodes to listed"),
   );
   $form["sitemap_node_count"] = array(
     '#type' => 'checkbox',
     '#title' => t("Show number of nodes for each term"),
     '#return_value' => 1,
     '#default_value' => variable_get("sitemap_node_count", 1),
   );
   $form["sitemap_author_and_comments"] = array(
     '#type' => 'checkbox',
     '#title' => t("Show Author and number of Comments (in mousover)"),
     '#return_value' => 1,
     '#default_value' => variable_get("sitemap_author_and_comments", 1),
   );

Comments

frjo’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

This must be the wrong project, this is site_map not sitemap. Can't find the project for sitemap so I mark this "won't fix".

I will update site_map.module to 4.7 as soon as I get some free time, I need it before I can update my own site to 4.7.