The module has been created like alternative way to populate the sitemap with custom links, but the branch is using two different methods (one of them was already used by the project before to use the menu system).

The code doesn't create a custom menu for this purpose (correct me if I am wrong), but even if it would do it there would be the risk that the user would select a menu to populate the sitemap that contains links the anonymous user cannot see (and wondering why the the links are not added to the sitemap).

The system adopted to add custom links to the sitemap is better, and it makes the code simpler, IMO. If I would have been asked which method I would have implemented, I would have replied that the idea of implementing a module like xmlsitemap_menu is not so good.

CommentFileSizeAuthor
#17 xmlsitemap-454190.patch17.72 KBAnonymous (not verified)

Comments

Anonymous’s picture

I'm 100% in favor of dropping it. It is a PITA when you think of the complexities it really adds.

dave reid’s picture

I think there's still merit to having xmlsitemap_menu.module. I understand it's value is diminished by having the custom menu code out of it, but it really doesn't add any more complexities compared to an xmlsitemap_taxonomy or xmlsitemap_node. :/

avpaderno’s picture

it really doesn't add any more complexities compared to an xmlsitemap_taxonomy or xmlsitemap_node

The difference is that those modules are really needed, if we don't want the users insert each links by hand in the site map.

My judgement is based on the past issue reports I read about that module; it's also based on the fact that this project has become a blob of code that could be slimmed down a little (I am talking of the 6.x-1, and Drupal 5 branches). As somebody else already suggested, the project code should contain just what it really needs; the rest (like the part that change the links priority basing on the number of comments added to the node) can be put in a module that doesn't need to be included in this project.

avpaderno’s picture

Another reason to remove the module, and use only the other approach is that the way of adding custom links through xmlsitemap_menu.module makes the operation too complicated. Imagine the user that must create a menu item in a menu, which must be first created if it doesn't exist already; it would be easier for him to write something into a text area, without the need to pass to a different settings page (after he notices that the module settings page makes reference to a custom menu).

Anonymous’s picture

And if someone wants to continue with xmlsitemap_menu they can create their own project for it. It adds very little value that I can see.

avpaderno’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

Let us proceed in order; the first step should be to remove in the old branch, and then in the new branch.
We should have the same modules in both the branches, anyway.

Anonymous’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

We should have the same modules in both the branches

No, I don't think so.

darren oh’s picture

xmlsitemap_menu was a response to all those users who complained that their views were not included in the site map. I told them that if they enabled their view to appear in a menu, and that menu was added to the site map, the view would be included automatically. I added a special XML Sitemap menu for items which users wanted in the site map but not in the visible menus. I did not expect that menu to be used manually very often.

People who manually add large numbers of links are doing it the hard way. Any module can implement hook_xmlsitemap_links() and add links automatically. That was what I was thinking when I removed the additional links feature from the XML Sitemap core in 5.x-2.x.

I'm not telling anyone what to do, just offering guidance. Kiam and Earnie should do what they think is best with the 6.x-1.x branch, and if Dave likes what he sees, he can do the same for the 6.x-2.x branch. Thanks for all your hard work!

avpaderno’s picture

To add the links to view in the sitemap is enough for the user to be able to add relative URLs through a text area.
I have seen people adding the navigation in the list of menus the module should use to populate the sitemap, and wondering why Google Webmaster Tools was complaining about a 403 error; I know the problem was caused by the module not checking the access permission, but my point is that the module has been overused.

dave reid’s picture

Status: Active » Postponed

Right now I'm still in favor of keeping xmlsitemap_menu(). There is no access problem anymore in the 6.x-2.x version. The only problem left is #454442: Disable duplicate links during regeneration which could pop up in future cases as well, so it deserves a proper solution. So I'm going to mark this postponed for now.

avpaderno’s picture

Title: Is xmlsitemap_menu.module really necessary? » Remove xmlsitemap_menu.module
Version: 6.x-2.x-dev » 6.x-1.x-dev
Assigned: Unassigned » avpaderno
Category: support » task
Status: Postponed » Active

I am taking it back to the 6.x-1 branch because I am going to remove the module.
The module that cannot use a Drupal hook to know when a single menu item is deleted for the simple fact that such hook doesn't exist, or it's not called from Drupal core code; being this the situation, to be sure the module doesn't leave links to menu items that have been deleted, it must remove all the links it had inserted in the sitemap table earlier.

The presence of this module doesn't allow me to optimize the code, and change it to create the sitemap content in a progressive mode. The actual code does create the sitemap content all in once, and this causes problems when the number of links to add is higher than a limit (maybe 5000, less or more).

avpaderno’s picture

Status: Active » Fixed

This task has been completed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Status: Closed (fixed) » Active

The task should be re-applied, as the module is back again.

avpaderno’s picture

Assigned: avpaderno » Unassigned
Anonymous’s picture

Issue tags: +reimplement
Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new17.72 KB

Here is a patch to implement the removal of xmlsitemap_menu module.

avpaderno’s picture

Removing files from CVS repository is not done by a patch; the patch could be used if you are suggesting to leave a shell module, which is what you didn't want to do with xmlsitemap_term.module (see the issue titled Why do we need the shell module, or something close).

Anonymous’s picture

Removing files from CVS repository is not done by a patch; the patch could be used if you are suggesting to leave a shell module, which is what you didn't want to do with xmlsitemap_term.module (see the issue titled Why do we need the shell module, or something close).

When I commit the change the directory will be gone. In the working copy I issued from the top directory cvs remove -f xmlsitemap_menu. The diff will only show the files removed.

Anonymous’s picture

Status: Needs review » Fixed

Committed to CVS.

Status: Fixed » Closed (fixed)
Issue tags: -reimplement

Automatically closed -- issue fixed for 2 weeks with no activity.