Problem/Motivation
The prev/next module does not have an option to index by a Category/taxonomy. This makes it impossible to use this for a content type that uses taxonomy to categorize the content.
Proposed resolution
The recommended solution is to create the ability to also index based on a category/taxonomy.
Remaining tasks
Patch needs accepted by the contrib maintainer.
User interface changes
Added an optional dropdown that only appears when a user selects "Only nodes with same content type". Pic attached.
API changes
n/a
Original report by @holdmann

| Comment | File | Size | Author |
|---|---|---|---|
| #15 | prev_next-index-taxonomy-1986930-15.patch | 42.82 KB | bhosmer |
| #14 | prev_next-index-taxonomy-1986930-14.patch | 42.54 KB | bhosmer |
| #12 | prev-next-taxonomy-integration-986930-12.patch | 41.99 KB | bhosmer |
| #10 | prev_next-depends_taxonomy-1986930-8.patch | 10.07 KB | bhosmer |
| #9 | prev_next_added_category_criteria_700x366.png | 46.09 KB | johnish |
Comments
Comment #1
holdmann commentedDirty patch included.
Comment #2
johnish commentedI used this patch. It wouldn't automatically apply so I did it manually and so far the testing is looking good.
Comment #3
johnish commentedComment #4
johnish commentedI found that if the term id wasn't chosen for the piece of content then this fails.
Category ID is empty here and causes no nodes to be indexed and quit with a MySQL error.
Comment #5
johnish commentedHere's the code that I used to fixed the category_id is empty condition.
Attaching the git patch file.
Comment #6
johnish commentedComment #7
johnish commentedrerolled this patch
Comment #8
johnish commentedComment #9
johnish commentedComment #10
bhosmer commentedI'm testing this patch now, there is an extra
}on line 551 in the patch. Here is a new one that fixes it.Comment #11
bhosmer commentedI'm marking this as needs work.
It works as designed for some nodes, but node for others.
I get the same node for previous/next on some nodes.
Here is a sample of the
prev_next_nodetable:Steps to reproduce:
Some will show properly, but others will have previous/next nodes that aren't in sequence and the previous/next link will be the same node.
Comment #12
bhosmer commentedThis updates builds upon the previous patches and integrates taxonomy indexing.
It also separates some of the code into include files, and adds documentation for some of the custom functions.
Please review and test.
Comment #13
bhosmer commentedThis patch doesn't cover node deletion properly. Marking back to needs work.
Comment #14
bhosmer commentedI've incorporated the patch from xumepadismal, #1372754, that updates the index properly when deleting a node that seems to have solved the deletion problem in #12.
Comment #15
bhosmer commentedThis patch fixes improper indexing of existing nodes and fixes the modification of the nodes that pointed to the last node as well.