Just wondering if there are plans for a D7 port of this? Great module with a specific and invaluable application. Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emackn’s picture

I'd like too. Shouldn't be too hard really. Biggest issue is going to be dealing with views. Not sure if the current method of finding views with taxonomy args will work with views for D7.

basicmagic.net’s picture

subscribe

Maciej Lukianski’s picture

Since Taxonomy is now a reference field and you have to expose it in views as contextual filter, it might be possible to create a more generic solution to use other reference fields as well (eg node->node) and create aliases for views using this as a filter as well.

crantok’s picture

Subscribe

joelpittet’s picture

FileSize
12.27 KB

Here is the port to D7

Would you mind providing me with commit access?

emackn’s picture

Status: Active » Needs review

need to review

joelpittet’s picture

Thanks emackn, I keep forgetting that status for some reason. And you were correct the view getting arguments has changed drastically but may provide some improvements to this module.

pfaocle’s picture

Status: Needs review » Needs work

Patch didn't apply - was this against 6.x-2.2 or 6.x-2.x? Manually applied patch, but has not made module functional. Playing around with this, will comment again if I find anything useful.

joelpittet’s picture

@leafish_paul it was patched against 6.x-2.x-dev

I am not the best at the patch formatting but I have been following the instructions. I cloned 6.x-2.x-dev to my machine, made the changes, and ran git diff > view_alias-d7-1138344.patch

Did it throw any useful errors?

Maciej Lukianski’s picture

I found a different approach, which generates and deletes extra aliases using the rules module:

http://www.archive.org/details/LearnTheRulesFrameworkPart27-ExtraPathAli...

It can be a replacement for this module and should work for users, nodes, taxonomies

joelpittet’s picture

FileSize
3.92 KB

I attached the zip so you guys don't have to worry about my patches until i figure out why my formatting is all messed on my git patches.

pfaocle’s picture

Thanks - I hit another issue with pathauto (#1267966: Pathauto patterns are not showing up) before I could get back to this. Seems to be working here, although there are several php notices on admin/config/search/path/patterns:

Notice: Trying to get property of non-object in _find_view_arguments() (line 231 of /snip/sites/default/modules/view_alias/view_alias.module).

sachbearbeiter’s picture

i tried #11 and so far it works fine ...

it seems, that this module saved my live, because i have to build nice urls with some views, that are taking taxonomies as arguments ...

i had the problem that views is not pathauto aware - term name as argument is not accurate - so i give the tid as argument and still get in the url a nice path ...

so i would spent a bounty for a D7 version and "Recurring Aliases" - so dear joelpittet or emackn - send me a pm if one of you want to go a little bit further ...

or are there mor generic approaches in D7 to solve problems like this? something with an default views php argument, that takes the aliased term name and uses a pathauto function to bring it into views?

thanks

Summit’s picture

Hi, Would this module also work on views with urls like products/[number]? I am building a view for drupal commerce product entities, and would love clean url for it.
greetings, Martijn

netentropy’s picture

I can confirm the zip in #11 works in Drupal 7 and with a site with a large number of terms.

We need to get this committed and maintained. Honestly I wish it was in Views itself.

Let me know what I can do.

joelpittet’s picture

FileSize
256 bytes

Here is a small patch, since people are using that d7 zip

emackn’s picture

Is there a complete patch for the D7 upgrade?

joelpittet’s picture

#5 for patch, #11 for zip + #16 for the minor fix on top

netentropy’s picture

I am having a bit of trouble with the D7 version.

If I try to use a path alias on two views for the same taxonomy term ID but different paths , that one tends to over come the other.

For example. everything on my site (tutorials, video, downloads) can be categorized by the same taxonomy term "content category"

When I set up the view path alias for questions to be filtered by "content category" the views alias work as intended, ie question/category-1

However if I build another view to sort tutorials by "content category" , when I build the path alias, instead of the expected tutorials/category-1 , it rewrites as the previous questions/category-1

thing it , it still works properly just with the wrong path.

any ideas?

emackn’s picture

I'm going to create a 7 branch and try to get in the patches, if not they will have to be re-rolled.

Nor4a’s picture

FileSize
11.56 KB

I made it working on D7.
Also rewrote the module - now it supports multiple taxonomy arguments seperated by "/". It supports also multilingual taxonomy terms - if the terms have common IDs for all the languages and localized.
Hope this functionality will be implemented in the public module release :)

Sorry - I'm using SVN and the pathcing would be too difficoult because a lot of code have been rewriten. So I'm adding all the code as an archive. Code has no Coder issues.

emackn’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

I won't be unpacking a zip file, you will have to check out the code via git and create the patch file if you want me to look at the changes.

Nor4a’s picture

And here comes the patch against 7.x-1.x which I checked out from repository.

Nor4a’s picture

Fix the name of the patch file, because # do not allow to download the file.

ram4nd’s picture

Subscribe

bancarddata’s picture

This latest patch in #24 seems to depend on the internationalization module - I do not have it installed and am getting this error:

PHP Fatal error: Call to undefined function i18n_string() in /opt/apache/htdocs/drupal/sites/all/modules/view_alias/view_alias.module on line 166

Any way to modify this to not have that requirement?

candelas’s picture

any news on this?

rich.3po’s picture

Issue summary: View changes
FileSize
16.84 KB

Hi - this is a really useful module.

I've applied that patch in #24 and noticed that not all views get picked up on the URL alias admin screen - specifically views that are in code rather than DB storage

I've made an update to fix this - see attached patch. It would be great to see a D7 release of this soon (even if dev release)

Other than this the module seems to work, but the code could use some cleaning up

cheers

emackn’s picture

Rich.3po,
Thanks for the patch. I'm sure others will appreciate the work as well. Tragically though, I no longer work with Drupal, so I've added you as a maintainer if you're willing. That way you can add any improvements you might need.

I'm glad that you got some use out of it. ;)

candelas’s picture

@rich.3po please, take it. I missed this module a lot :)

rich.3po’s picture

@emackn - ok thanks, i cant guarantee how much time i can put into this but i'll do my best to help out...

Regarding my patch in #28 i forgot to include the .info file. Heres the new patch

John Franklin’s picture

Can we get this patch in to be a baseline D7 port? It seems to work for my very basic needs. I'm willing to be a co-maintainer of this to get a D7 port.

  • rich.3po committed e32f558 on 7.x-1.x
    Issue #1138344 by Nor4a, rich.3po: Apply patch for D7 port
    
rich.3po’s picture

Status: Needs work » Fixed

I've now made a D7 dev release. I need to spend some time cleaning it up before rolling a full release, but it should be usable.

That said, if any other bugs are found let's address them in separate tickets

cheers

Leeteq’s picture

Great! So the Maintenance status and Development status of this module must be updated now, then?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.