Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
path.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 May 2008 at 15:30 UTC
Updated:
5 Jul 2008 at 18:33 UTC
In path_nodeapi() there's this code:
case 'validate':
$node->path = trim($node->path);
if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
form_set_error('path', t('The path is already in use.'));
}
break;
With E_ALL error reporting, the first line in the case throws an error:
notice: Undefined property: stdClass::$path in /drupal/modules/path/path.module on line 137.
This is going to be a problem (in 6.x, not 7.x at the moment) for the project module port, because project.module handles paths for project nodes on its own and calls unset($form['path']);.
The attached patch checks to see if $node->path is set first, which takes care of the notice.
| Comment | File | Size | Author |
|---|---|---|---|
| path_nodeapi_notice_0.patch | 1.17 KB | aclight |
Comments
Comment #1
killes@www.drop.org commentedGood to go
Comment #2
dries commentedI've committed this patch to DRUPAL-6 and CVS HEAD. Thanks.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.