A bit of an odd situation --
When a node with a taxonomy term has an imagefield for uploading images, and I upload an image, I get a modal window popup while the upload is in progress with the error message in this issue's title.
A quick fix is to comment out lines 401 and 402 on pathauto.module, but from the looks of that, I'm sacrificing sanitization of the uploaded files:
$catpath = pathauto_cleanstring(check_plain(preg_replace('/\//', '', $parent->name))) .'/'. $catpath;
$catpath_raw = pathauto_cleanstring(preg_replace('/\//', '', $parent->name)) .'/'. $catpath_raw;
The error only occurs when the node has a taxonomy term assigned to it. It's also worth noting that this only appears to occur when re-editing a node. If I create a node, assigning a term and uploading images at the same time, it doesn't.
Comments
Comment #1
bsuttis commentedCommenting the above out is not helpful when using [catpath] or [catpath-raw] for taxonomy terms, so it's of no use in terms of a fix unless you don't alias your terms.
Comment #2
gregglesThis seems kind of hard to repeat so I'm hoping that you can test out this patch. Basically it adds a call to _pathauto_include to the pathauto_token_values function so that we are sure to have access to the pathauto_cleanstring function when we need it.
Comment #3
bsuttis commentedFrom the tests I did in 2 environments with the problem (5.1 production site and fresh install of 5.3 with limited modules), the patch above has fixed the problem.
Thanks much.
Comment #4
gregglesGreat, then it's ready to be committed (not yet fixed since it hasn't be committed yet...)
Comment #5
gregglesAnd now it's been committed to drupal-5--2 and trunk.
Thanks for the testing, bsuttis!
Comment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.