Sneak Preview of Pathauto 5.x-2.2
It's come time for another point release of Pathauto and you can get a "sneak preview" of this by downloading and using 5.x-2.x-dev.
One bug left to fix?
There are still some issues that I'd like to clean up. It seems that 5.x-2.1 caused some problems for modules that make heavy use of taxonomy for their own purposes (forum, image gallery, etc.). Nancyw came up with a patch that will improve the situation for bulk updates: http://drupal.org/node/188606#comment-782627 If more folks could test that, it would be great. That doesn't solve all the problems that 2.1 introduced for these modules, and if someone wants to fix that problem prior to 5.x-2.2 please let me know. Otherwise it will have to be a "known bug".
Bulk Generation Got Faster
Also, stennie came up with some good work to improve the speed of bulk udpates though this code should ideally get some more testing. In fact, all of it needs a little more testing. That's where you come in!
Sneak Preview (aka help test)
If you're a 5.x-2.1 user and can help test this 5.x-2.x-dev you'll help me make sure that 5.x-2.2 will be a nice and solid release so that I can focus on making Pathauto rock for 6.x.
Here is a list of changes since 2.1:
- bug #219726 by psynaptic: 'update path aliases' node operation breaks publish operation
- doc bug #227147 found by iantresman patch by greggles: php compatibility in README no longer applicable
- small notice in pathauto_taxonomy.inc
- bug #228775 by greggles: Deleting nodes with feed aliases doesn't delete the feed alias
- bug #228696 by greggles: bulk delete didn't include blogs or forums in list (add them)
- adding id to js
- bug #224243 by greggles: Slashes for [termalias] token field must not be removed.
- task #229242 by Junyor, greggles: provide better bulk update instructions
- task #241132 by steamedpenguin: coding standards cleanup



Confused Source Review
Greg
I don't consider myself all that good at Drupal API stuff yet... so I read
a lot of code.
And it should be noted... EVERYTHING WORKS SO FAR!
I installed pathauto on a new D6 early in the week. I just got back to it
and the update system told me there was a new release.
So... I saved the old directory and "tar -xvzf ...".
Next step was to do a diff on the two directories to satisfy my
curiosity.
in pathauto.module, it seems that you changed lines 395,396.
If I am reading correctly, on 396 it looks like you are using db_query,
but passing the same (changed) parameters that you did on 395 for
db_query_range
Reading the api.drupal.org didn't enlighten me any more... so I thought I
would ask... just in case it was a sleeper or something.
Specifics:
395,396c395,396
< $vid = db_result(db_query_range("SELECT t.vid FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name", 0, 1, $object->nid));
< $category = db_fetch_object(db_query("SELECT t.tid, t.name FROM {term_data} t INNER JOIN {term_node} r ON r.tid = t.tid WHERE t.vid = %d AND r.nid = %d ORDER BY weight", 0, 1, $vid, $object->nid));
> $vid = db_result(db_query("SELECT t.vid FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name LIMIT 1", $object->nid));
> $category = db_fetch_object(db_query("SELECT t.tid, t.name FROM {term_data} t INNER JOIN {term_node} r ON r.tid = t.tid WHERE t.vid = %d AND r.nid = %d ORDER BY weight LIMIT 1", $vid, $object->nid));
The questions that this raised for me
1) why on the first line do you pass .... 0, 1, .... when the code for db_query_range reads that the 0 is the $count and the 1 is the $from. That seems to indicate that you are starting with the first record returned, but if the old code was doing a "LIMIT 1", then why wasn't the 0 ($count) set to 1???
2) on the second line, it seems to be replacing the same kind of query as the first line... The same ...0, 1, ... structure... but in this case, you used a db_query call instead of db_query_range call. So, this is something that makes me go Hmmmm....
Thanks for any comments to this. I'm just trying to get my feet wet and see if I understand how all this stuff works.
Kurt Vanderwater
P.S. Sorry about the strange size of the pasted code....
Not sure yet how to control that...
I was able to hightlight the fragments that caught my eye.
bugs!
There's a couple of bugs in that change, actually, thanks for drawing my attention to that! Take a look at the issue where it was introduced ( http://drupal.org/node/241132#comment-799065 ) for the followup and then hopefully we can work towards fixing it.
The arguments to db_query_range are kind of tricky.
http://api.drupal.org/api/function/db_query_range/5
So, the 0, 1 needs to come last and should be the "from" and then the "count". So, while I think stemedpenguing and I I got the order of variables wrong in general - we got the "0, 1" part of it right. (right?)
The code pasting problem is probably due to the markdown filter that is used here. The rules it uses can cause problems with pasted code...
--
Open Prediction Markets | Drupal Dashboard
one more try?
Ok...I fixed the bugs that kvanderw found and a bug in the bulk generation speedup code...
Once the tarball is rebuilt (midnight tonight) then I'd love it if some folks could test this out tomorrow and hopefully I can create an official release tomorrow night. If you are dying to test it out now then just check it out of cvs.
--
Open Prediction Markets | Drupal Dashboard
I'm in
Hi Greg! I would love to help you out with the testing whenever I have time. I'll start reading all I can about this 5.x-2.x-dev release; then I'll install it and test it. Regards!