Closed (outdated)
Project:
Diff
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2008 at 21:46 UTC
Updated:
7 Mar 2016 at 10:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
junyor commentedWhoops! I left some debug code in.
Comment #2
junyor commentedNo, that didn't fix it.
Comment #3
junyor commentedThere seems to be two problems:
* Single-select vocabularies aren't handled correctly. When this problem is encountered, blank lines appear in the "new" diff
* Taxonomy terms aren't ordered in any coherent way, so something can show up in the diff that shouldn't just because it's ordered differently in the old taxonomy vs. the new taxonomy
The former issue is a pretty straight-forward fix, but the latter isn't. I've attached a patch for the former issue.
I tried to fix the latter issue by using tids as keys for the result arrays, but the diff didn't seem to like it when the array keys weren't contiguous. Any suggestions for fixing that?
Setting to needs review for the first issue.
Comment #4
moshe weitzman commentedIf D6 is broken, we should fix it first if possible.
Comment #5
moshe weitzman commentedanyone available to port this to D6? D7 (we want to submit this to core)
Comment #6
mo6subscribe
Comment #7
j0rd commentedTaxonomy revision diffs don't work at all. This is because the taxonomy module only associates node_terms with NID and not NID+VID (VID is the revision number). Theirfor when it loads the term data for $new_node and $old_node it's the same...and therefor you can't not get diff data from it.
I believe the taxonomy module would have to get changed to resolve this or glue would have to be added with another module.
Function in question. taxonomy.module
function taxonomy_node_get_terms($nid, $key = 'tid')Comment #8
junyor commentedI've been exploring this a bit more and I'm running into some problems with mulit-select or freetagging vocabularies. The diffing is done based on array keys, but I can't find a good key for these vocabularies. Any ideas?
@j0rd: $new_node and $old_node have arrays of taxonomy terms with all the needed information.
Comment #9
junyor commented@j0rd: Sorry, I see what you mean now. Yes, there's no way to diff existing revisions. It is still possible to diff an existing node with an edit, though.
Comment #10
junyor commentedHere's a new patch that resolves all the issues I've found except the problem diffing existing revisions. Now the diff is built using vocab name and term name to guarantee uniqueness and aid in sorting.
Comment #11
moshe weitzman commented@Junyor -any chance you want to maintain this module? I have pretty much moved on. I gave you CVS access so you can at least commit his patch.
Comment #12
junyor commented@moshe: I appreciate the offer, but unfortunately I won't be able to do so due to other obligations.
Comment #13
joe-b commentedBased on @Junyor's D5 work, I've had a go at a patch for D6, which is attached.
Comment #14
joe-b commentedNuts, minor syntax update. Apologies.
Comment #15
mitchell commentedRe #13.
Comment #16
mitchell commentedActually, #13 also answers #5.
Comment #17
alan d. commentedClosed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.