Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Will there be any work to port this module to D7, or is there more general approach to alter path (entity_uri) of any entity type?
Comments
Comment #1
pfx CreditAttribution: pfx commentedsubscribe
Comment #2
mstrelan CreditAttribution: mstrelan commentedsubscribe
Comment #3
dokuf CreditAttribution: dokuf commentedsubscribe
Comment #4
cseppa CreditAttribution: cseppa commentedsubscribe me too!
Comment #5
mstrelan CreditAttribution: mstrelan commentedI started work on this but haven't got very far so if anyone wants to jump in they can as I won't be back for a while.
The key is to return the uri in hook_entity_info() as hook_term_path() no longer exists. Apart from this we just need to upgrade to use the new database layer and any other D7 conventions.
Comment #6
mstrelan CreditAttribution: mstrelan commentedFurther info. Not sure if I'm going down the right path but it seems good to me
Anyone want to jump in?
Comment #7
bryancasler CreditAttribution: bryancasler commentedsubscribe
Comment #8
andypostMore descriptive title to follow the issue.
Approach from #6 is right!
Comment #9
pauleb CreditAttribution: pauleb commentedsubscribe
Comment #10
bryancasler CreditAttribution: bryancasler commentedbump
Comment #11
Shadlington CreditAttribution: Shadlington commentedSub
Comment #12
Iztok CreditAttribution: Iztok commentedI am not the right person for this task but it looks like
$entity_info['taxonomy_term']['uri callback']
only works for links other than:- tabs
- terms listing in administration
- etc
All of this links are hardcoded like the one bellow:
Problem is of course when you are editing a term, because you cant reach the url you would want (usually a view right...).
I guess the solution would be to redirect from taxonomy/term/*tid* to whatever.
Well anyway, code from #6 will work in links in menus, content fields etc but not in the administration.
Comment #13
mstrelan CreditAttribution: mstrelan commentedI don't think you want to override the links in administration pages because they are required for editing / adding terms etc.
Comment #14
bryancasler CreditAttribution: bryancasler commentedI'd be happy to test any suggestions.
Comment #15
Shadlington CreditAttribution: Shadlington commentedIs it worth look at the Redirect module for possible integration?
I'm really not sure about whether its appropriate or not. Just thought I'd draw attention to it in case its useful.
Comment #16
pbfleetwood CreditAttribution: pbfleetwood commentedsubscribe
Comment #17
basicmagic.net CreditAttribution: basicmagic.net commentedsubscribe
Comment #18
laura s CreditAttribution: laura s commentedsubscribe
Comment #19
simon_s CreditAttribution: simon_s commentedsubscribe
Comment #20
spencer.nowak CreditAttribution: spencer.nowak commentedsubscribe
Comment #21
WilliamV CreditAttribution: WilliamV commentedAny updates on the status of porting? Thank you! Grtz.
Comment #22
mstrelan CreditAttribution: mstrelan commented@WilliamV - the status is that I started looking at this a while back but have not had any time to look at this further. Neither of the maintainers of this module have indicated that they are working on this and approximately 15 people have "subscribed" yet no one has provided anything particularly useful. If I should happen to get some free time and I feel compelled to work on this then perhaps I will continue, or if I get a project that requires this. So if anyone out there wants to pick up where I left off at #6 I'm sure everyone in this thread will be appreciative.
Comment #23
WilliamV CreditAttribution: WilliamV commented@mstrelan - I appreciate your efforts. I would be glad to help testing, but i don't really have the needed 'developer' experience to port this module. Hope you find some time soon for porting. Starting of at #6.
Comment #24
Tesmon CreditAttribution: Tesmon commentedsubscribe
Comment #25
andypostI think the module should have different UI
- redirects should be added/changed at vocabulary|term edit form with form_FORMID_alter()
- list of redirects probably better to maintain as tab for admin/structure/taxonomy/redirects or
- settings for module could go into admin/config/content/taxonomy_redirect/settings
- needs hook_update_N() to use vocabulary_machine_name, maybe schema change
- implement hooks to reflect vocabulary update|delete and the same for terms
- php_filter staff should use new text formats API
- take into account token integration and upgrade path for old internal tokens
Also needs review #1120176: Remove t() from hook_schema()
Comment #26
mstrelan CreditAttribution: mstrelan commented@andypost - sounds like we should get 7.x-1.x out the door as a direct port and open up 7.x-2.x to accommodate any redesign
Comment #27
andypost@mstrelan not sure, because D7 menu system is different from D6 also it's all about moving parts of code
By the same time core's APIs are changed so direct port is hard,
anyway we should decide on menu first, write some code and then provide upgrade path
Comment #28
yugongtian CreditAttribution: yugongtian commented+1
Comment #29
bryancasler CreditAttribution: bryancasler commentedHow will the Taxonomy Redirect module differ from the Redirect module?
http://drupal.org/project/redirect
Comment #30
vito_swat CreditAttribution: vito_swat commented@andypost
I don't really like the way you propose to do this. What me and probably most of users need is just possibility to redirect some vocabularies to other paths (most probably views paths). Any per path redirection, redirection based on term name etc can be handled by redirection and/or pathauto module.
Unless there will be any solution I suggest Taxonomy display to everyone who need just to override term listing with views.
Comment #31
xandeadx CreditAttribution: xandeadx commentedsubscribe
Comment #32
derhasi CreditAttribution: derhasi commentedI just opened a sandbox as proof of concept of mstrelan's suggestion in #6.
You can find the project here: http://drupal.org/sandbox/derhasi/1177152, a fully functional module is available in the repository there.
I hope this work can go back here. Feel free to comment ;)
Comment #33
geek-merlinsub
Comment #34
mstrelan CreditAttribution: mstrelan commentedThanks derhasi, this is a good start but it really needs some of the options like Path case and Separator. I will submit some issues and maybe some patches to your sandbox.
Comment #35
mstrelan CreditAttribution: mstrelan commentedI just had a thought that you probably don't need this module if you already have Pathauto and CTools Page Manager enabled.
1. Pathauto
Setup URL aliases for terms to point to the path you want to redirect to.
2. Page manager
Override taxonomy/term/% and create a Variant with a selection rule to target the vocabulary holding the terms you want to redirect. Make the variant a HTTP_RESPONSE_CODE variant and 301 redirect it to the alias you set up in Pathauto.
Anyone know of any issues with this? One issue I am having is that page manager doesn't seem to want to sanitise my taxonomy term, which I want to send as an argument to a view.
Comment #36
geek-merlini'm using and loving derhasi's module from #32!
Comment #37
danharper CreditAttribution: danharper commentedHi,
Tried using module from #32 but I received this error message when I saved my path options in taxonomy vocab settings. (although the module does work)
Thanks Dan
reported http://drupal.org/node/1212770
Comment #38
geek-merlin@dan: you might report this to the issue queue of the sandbox module.
Comment #39
derhasi CreditAttribution: derhasi commented@Agileware, should i promote the sandbox to a full project, or do you want to provide a D7 branch?
Comment #40
goofrider CreditAttribution: goofrider commentedsub
Comment #41
mojzis CreditAttribution: mojzis commented@vito_swat thanks for the tip, http://drupal.org/project/taxonomy_display did exactly what i needed :)
Comment #42
skizzo CreditAttribution: skizzo commentedsubscribing
Comment #43
jvinci CreditAttribution: jvinci commentedsubscribe
Comment #44
Danny EnglanderSubscribing
Comment #45
mrryanjohnston CreditAttribution: mrryanjohnston commentedsubscribe
Any updates on this? The sandbox module appears to be gone.
Comment #46
skizzo CreditAttribution: skizzo commentedsee http://drupal.org/project/entity_path
Comment #47
1800collect CreditAttribution: 1800collect commented@skizzo (not sure why my reply isn't under yours.)
http://drupal.org/project/entity_path
This works and is the new "taxonomy redirect"! Thanks so much.
Directions:
That's it just click save, or mess with other options.
Comment #48
DamienMcKennaAnother alternative for this on D7 is http://drupal.org/project/taxonomy_display
Comment #49
fehin CreditAttribution: fehin commented@1800collect, how do you set the pattern for subdomains in Entity_path?
Comment #50
1800collect CreditAttribution: 1800collect commented@fehin
I am not sure what you mean regarding subdomains. Right now I can't even get my directions to work. Frustrated.
Comment #51
fehin CreditAttribution: fehin commentedI used a different solution. I used views rewrite output on the taxonomy Term:name field and linked it to my views terms page. The views page I linked it to uses term id as an argument and in the url, so whenever someone clicks on a term it takes them to that page and that displays all contents with that term.
Comment #52
Frank Ralf CreditAttribution: Frank Ralf commentedhttp://drupal.org/project/synonyms might be another alternative.
Comment #53
blogers CreditAttribution: blogers commented#47
1800collect commented 3 years ago
Dont work the module i install it y don hapend nothing
Comment #54
PalvinKang CreditAttribution: PalvinKang commented#47 1800collect
I installed the entity_path module today and I got it to work (on a test site)
#53 blogers
may of had other issues
Comment #55
kamirura CreditAttribution: kamirura commentedThis module solved it for me. Adds a redirect field to the term that takes the node adress.
Comment #56
kamirura CreditAttribution: kamirura commentedThis module solved it for me. Adds a redirect field to the term that takes the node adress. https://www.drupal.org/project/taxonomy_tools
sorry for double post...