I have installed XML sitemap on my web site. It's a great module, second only to CCK, and Views, that permits to submit the site map of a web site directly to the major search engines. It assigns also a change frequency to any links present in the site map, which helps the search engine to decide how much times the content associated with the link must be checked (or if to cache it, I guess).
Recently, I noticed that in the form present in "admin/content/node-type/<type>" (replace <type> with any valid node type identifier present in your Drupal installation) was not showing correctly: the "Workflow settings" fieldset was between the "Save content type" button, and the "Delete content type" button.
At first I thought it could be caused by some modules which added some fields into that fieldset, so I checked the source code of the modules I installed to see which one could be "guilty", but I didn't find anything; there were few modules attaching fields, but none of them changed the weight of the fieldset.
The issue seemed then to not be constant, and it showed only for some node types. Checking with more attention, I saw the problem was not present when the submit buttons were "Save content type", and "Reset to defaults".
Finally, I found what the problem was.
In xmlsitemap_node.module there are the following code lines:
$form['submit']['#weight'] = 1; $form['reset']['#weight'] = 1;
$form['submit'] = array( '#type' => 'submit', '#value' => t('Save content type'), '#weight' => 40, ); if ($type->custom) { if (!empty($type->type)) { $form['delete'] = array( '#type' => 'submit', '#value' => t('Delete content type'), '#weight' => 45, ); } } else { $form['reset'] = array( '#type' => 'submit', '#value' => t('Reset to defaults'), '#weight' => 50, ); }
Found that, it is also found the solution to the issue; delete those code lines from the XML Sitemap module, and the "Workflow settings" fieldset will return to its original position.
ATTENTION
The files you can download using the links below are not the official releases made from the authors of the module; they are just my personal modifications I made to correct some bugs, or to optimize the code. The authors of the module are not responsible for any modifications I made to the code.
Any problems you get from the files I make available here MUST be reported only on this website.
Comments
Re: A Little Bug for XML Sitemap
I changed the link to the file, which was not correct.
If you tried to download it before, you should be now able to download it.
More Bugs for XML Sitemap
I found out many other bugs, or issues with the development snapshot of the module.
I reported them in Drupal, and I will update the package I make available here to include the changes I made to the copy of the module installed on this web site.
I will report when the file has been updated.
Done
I have updated the TAR archive to include the fixes to the issues I found, in particular I added the fixes for the following issues (the list could be not complete):
E_ALL, and not cause any errors or warnings when running; this includes also the warnings caused by a variable being used before it got assigned any value (not includingNULL).