Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
path.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 May 2012 at 22:49 UTC
Updated:
27 Oct 2015 at 04:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
markie commentedpretty basic patch attached.
Comment #4
jhedstromComment #5
berdirI don't think this applies to 8.x anymore.
Comment #6
jhedstromRe-rolled for D7.
Comment #7
spadxiii commentedLooks like a nice and simple patch that works like a charm!
Comment #8
David_Rothstein commentedThe path_node_insert() change looks fine, but I'm not sure about the way the patch does it in path_node_update() since that function contains this code further down:
So if you pass a 'pid' without an 'alias', currently it will run path_delete() (albeit with a PHP notice), but with the patch, path_delete() will be skipped entirely. I'm not sure what the practical consequences of that would be, but do we really want to change that behavior as a side effect of fixing the PHP notice...?
Comment #9
jcisio commentedI don't know we can have !empty($path['pid']) with $path['alias'] unset. BTW attached patch to keep the current behavior and to fix the notices.
Comment #10
jcisio commentedComment #11
David_Rothstein commentedYup, that looks good now and seems to work correctly.
Comment #12
David_Rothstein commentedCommitted to 7.x - thanks!