Tried to uninstall all xmlsitemap modules and got this errors:

    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder AND subtype = unsupported type for db_type_placehol' at line 1 query: xmlsitemap_link_delete_multiple /* Admin : xmlsitemap_link_delete_multiple */ DELETE FROM xmlsitemap WHERE type = unsupported type for db_type_placeholder AND subtype = unsupported type for db_type_placeholder in sites\all\modules\xmlsitemap\xmlsitemap.module on line 709.

Now - what the heck is now cluttered in the database?

Comments

hass’s picture

Title: You have an error in your SQL syntax » Uninstall: You have an error in your SQL syntax
Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

What did you uninstall? All the modules? If so, it is the core bug where module with dependencies aren't properly installed in reverse order.

hass’s picture

I have disabled all submodules first, than disabled the xmlsitemap module and then uninstalled all xmlsitemap modules at once.

The error messages doesn't sounds like a dependency issue. More like bugs in the syntax of the SQL statements!

Dave Reid’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

You have to uninstall the sub-modules first as well, then uninstall the primary module. Read #705226-6: Uninstallation Issue as this has come up before and it should be documented in the README.txt.

The good news is there shouldn't really be much messed up in the database. There might be a few stragglers in {variables} which you can find with name LIKE 'xmlsitemap_%'.

hass’s picture

Great, by design broken. I still do not understand how this can cause MySQL errors with placeholders and wrong syntax!??? How about making sure required functions (if this is the reason) are available in all submodules!? It may create duplicate code, but it would be a workaround.

Dave Reid’s picture

The reason is the {xmlsitemap} table gets uninstalled first before the sub-modules try to delete their data from the table, hence the APIs no longer know which placeholders to use since there is no schema data. I've liked to the comment that contained the link to the issue where you can help to fix this bug in core: #151452: Uninstalling modules does not follow dependencies and can lead to WSOD.

Dave Reid’s picture

Status: Closed (works as designed) » Fixed

And while I realize that you're upset at a module for not working around a serious bug that desperately needs to be addressed in core, I've implemented a temporary fix that should prevent the errors on uninstall.
http://drupal.org/cvs?commit=372650
http://drupal.org/cvs?commit=372652

hass’s picture

This looks like a reasonable and easy workaround. Thx.

Status: Fixed » Closed (fixed)

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