You shouldnt use an embedded update function in your .module. You should simply put that code into .install hook_update_x. That way the users are not forced to visit the settings page after update, but to call update.php as with all other modules out there.

CommentFileSizeAuthor
#3 pathauto_remove_update.patch6.23 KBgreggles

Comments

greggles’s picture

thanks for the tip - do you have a patch which achieves this?

greggles’s picture

Priority: Critical » Normal
greggles’s picture

Title: Use .install files » Remove the updates that didn't actually do anything
Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new6.23 KB

As of 4.7 and 5.x these updates weren't actually updating anything but they still gave the messages that they were. So, I propose removing them.

Pathauto also has a need for a .install that will do some other things, but that's a separate issue.

Here's a patch which removes the unnecessary code (and therefore the unnecessary messages). Reviews and tests are welcome.

csevb10’s picture

I'd second removing them, it seems harmless at least from a 4.7/5.0 perspective.
What elements would need to go into the .install?

greggles’s picture

They all seem like "cleanup of old settings from prior installations" kinds of things so I don't think any need to go into a .install file. Does that seem like the case to you as well?

There are other things that do need to go into the install (like cleaning up patterns for cck nodes and also the _uninstall) but those are their own issues.

csevb10’s picture

That seems like the case to me. At this point, none of it is really relevant, so it's not really worth porting it into the install file for 4.7/5.0.

greggles’s picture

Status: Needs review » Fixed

Fixed in the 5--2 version of pathauto. Thanks profix898 and csevb10!

greggles’s picture

Just for the record, I forgot to remove this one function so I committed a patch that removed that....

Anonymous’s picture

Status: Fixed » Closed (fixed)