autopath.module currently does its job without telling the user what it's going to do. The user doesn't know that a URL is going to be generated (if they don't enter an alias), until the node is already submitted and they can see autopath's creation for themselves.
There should be a warning on the node creation form, telling the user that if they don't enter a path, one will be generated automatically based on the title.
This patch addresses this issue. After the patch is applied to path.module, the module_exist() function is used to see if autopath is installed and enabled. If it is, then as well as the standard help text for the path alias, some additional text warns the user about the existence of autopath.
The main reason why this patch is needed is because from a design perspective, the user should be informed of why something happened if they didn't ask for it to happen. The user may get annoyed that an alias was created for them, without their prior knowledge. Another reason is that if they know an alias will be generated - should they not enter one themselves - users may be more inclined to enter a meaningful alias themselves.
Jeremy Epstein - GreenAsh (now using autopath, with this patch)
| Comment | File | Size | Author |
|---|---|---|---|
| path.module.autopath_helptext.patch | 1.43 KB | Jaza |
Comments
Comment #1
mikeryanI don't think patching core, especially with a reference to a contributed module, is the right approach. I'm looking into using nodeapi to append some text to the help text the path module uses. If I do it in on "form pre", the new text appears right before the alias field, which is good, but I don't think there's any guarantee that in an installation with several modules using the nodeapi hook the text would fall in an appropriate place. Maybe using "form post" to add a note consistently to the bottom of the node form would be better? I'm open to opinions...
Comment #2
mikeryanI committed a version of autopath this week that adds help text to the node creation form using hook_nodeapi() - the one issue is that other nodeapi-based modules may cause other items to separate the help text from the Path alias setting. I've proposed a merger of this module with the path_automatic module, named pathauto, which should keep the help text in an appropriate place.
Comment #3
mcd commentedI'm seeing the help text divorced from the form field during edits and page creation, when the user has no permissions for path or autopath (and thus doesn't see the form field).
Comment #4
(not verified) commented