When creating the term links the uri callback key of the entity info is used. However, the Drupal API allows to override this per bundle which entity_uri checks. So instead of calling the callback directly entity_uri should be used to retrieve the callback. Then if I've overridden a specific bundle the correct links will be output.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | tagcoulds.patch | 1.32 KB | jax |
| tagclouds-entity-uri.patch | 676 bytes | jax |
Comments
Comment #1
jax commentedComment #2
jax commentedThis should be fixed in the other functions as well:
tagclouds_display_node_link_count()
tagclouds_display_term_link_count()
Comment #3
MGParisi commentedPlease send another patch...
Comment #4
MGParisi commentedAlso What exactly are you attempting to accomplish?
Comment #5
jax commentedIn Drupal 6 you could override the default url taxonomy/term/% for a specific vocabulary by setting your module's name in the vocabularies table. In Drupal 7 this no longer works that way. With the entities sytem you can override URL creation by setting the uri callback on bundle level:
Then, if you use
entity_uri();you get the correct callback since that first checks if a callback on bundle level exists.I've added a patch that also uses the taxonomy API function taxonomy_term_load instead of using the callback.
The function tagclouds_display_node_link_count() should also be fixed since the signature says $nid and then $node_info is initialised with the info from taxonomy_term. So either the variables should be renamed for clarity or the wrong info is loaded.
Comment #6
MGParisi commentedCheck out the dev release, I believe it should be working. However I am still concerned about
Comment #7
MGParisi commentedFYI Dev release should have todays date, it has not updated yet. It will be in the repository until it does.
Comment #8
MGParisi commentedJax (or anyone else) test out the Dev version?
Comment #9
MGParisi commentedShould be in latest dev release when it is published.