When uninstalling the statuses tags submodule, it's not displaying uninstallation messages.

The following condition always fails, since $vocabulary->nodes is not set

if (isset($vocabulary->nodes) && count($vocabulary->nodes) == 0) {
}

Also link to edit Hashtags vocabulary is wrong

st(
          'This vocabulary was not used for any other purpose, so <a href="!delete_url">deleting it</a> is recommended.',
          array('!delete_url' => url('admin/structure/taxonomy/edit/vocabulary/2', array('absolute' => TRUE)))
        )

The URL should be "admin/structure/taxonomy/hashtags/edit"

Comments

mathankumarc’s picture

Isaac need your help on this.

if (isset($vocabulary->nodes) && count($vocabulary->nodes) == 0) {
}

What this condition will do.

icecreamyou’s picture

In D6, that clause checks whether the vocabulary is used for anything else ($vocabulary->nodes was an array of the node types to which this vocabulary was assigned). If the vocabulary wasn't in use, then a message was displayed telling the user that they should delete the vocabulary. In D7 it doesn't look like there's an easy way to do the same thing (I think because vocabularies are now related to nodes through fields) so we can just display this message without checking if the vocabulary is in use or not:

The Statuses Tags module has been uninstalled. The vocabulary @name was previously used to store #hashtags for the Statuses Tags module. If you are not using this vocabulary for anything else, you may want to <a href="!delete_url">delete it</a> now.

mathankumarc’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

Here is the patch.

icecreamyou’s picture

Status: Needs review » Reviewed & tested by the community

looks good

mathankumarc’s picture

mathankumarc’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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