Hi,

First up, Great module.

I've found an issue with the "Using the view" drop down not showing any default Views stored in code (using HOOK_views_default_views() ). I did some poking around and it looks like default Views do not have a VID which the tvi_get_views function seems to key the $views array with. Therefore it looks like the $view object it not getting added to the $views array.

I guess the $views array could be keyed with $view->name instead but I have no idea how that would impact the rest of the modules functionality.

Thanks
Tom

CommentFileSizeAuthor
#1 tvi_replace_view_id_by_name.patch8.32 KBb-prod

Comments

b-prod’s picture

Category: bug » feature
Status: Active » Needs review
StatusFileSize
new8.32 KB

This patch modifies view identifier: instead of using the view id, it uses the view name.
This allows to be able to select some default views, which are defined in contributed modules. Indeed, such views don't have a view id (except when they have been overriden) so without this patch it is impossible to use them.

The patch implements hook_update_N, so you need to run update.php.

derekwebb1’s picture

Thanks for the patch B-Prod! I will probably be rolling this and a postgres patch into the next release (out this weekend hopefully).

Thanks for the effort!

Cheers, Derek

derekwebb1’s picture

I patched the code with these changes however I found that the upgrade path is somewhat incomplete - it does not convert old view_ids to view_names in the db.

I am going to try to have that worked out this weekend or sometime in the not too distant future.

Once that is taken care of we can test a bit and create a new release.

Cheers, Derek
http://collectivecolors.com

b-prod’s picture

Yes, actually I didn't take care about possible existing settings. It could be done through tvi_update_6002() function. If I find some time (for this week it is impossible, but maybe next week) I will work on it.

b-prod’s picture

Status: Needs review » Needs work
yuriy.babenko’s picture

I also ran into this issue today; it would be great to get the patch into a new module release!

sethcohn’s picture

+1 to this, I'd use with this support. Most of my views end up in code..

derekwebb1’s picture

Unfortunately there is no upgrade path defined yet. The patch works great but it requires one to manually re-assign all tvi assignments. If I toss that out there as is... I will never hear the end of it. I need to either a). Find someone to write the upgrade path, or b) Do it myself.

I am really a front-end guy so that's uncharted waters for me but I will give it a whack.

Cheers, Derek

derekwebb1’s picture

Status: Needs work » Fixed

Dev release includes this patch and a complete upgrade path. Thank you for your assistance B-Prod!

derekwebb1’s picture

Status: Fixed » Needs review

I meant to ask you to test dev branch... so setting this to "Needs Review" Thanks!

b-prod’s picture

The DEV version works fine for me.

Note that I applied it to the patched version (769858: Doesn't show default Views that are not stored in database (#1)).

Maybe a check by someone who does not have applied the patch above could be useful.

braindrift’s picture

works fine for me (tested on 1.1)

b-prod’s picture

Status: Needs review » Reviewed & tested by the community

It seems that the patch is working properly. Set tag to "reviewed".

derekwebb1’s picture

Thanks for the testing! I will get this rolled out fairly soon.

jenna.tollerson’s picture

Hey there all, great work. I'm looking for this fix. Any chance of this fix getting rolled into official release soon?

Greg Varga’s picture

subscribe. Great module, thanks! Would be glad to see a new official release.

traviscarden’s picture

Thanks for this patch, B-Prod! deeporange1, this has been sitting for quite a while. Can we do anything to help get it into a new release?

duaelfr’s picture

Status: Reviewed & tested by the community » Closed (fixed)

The patch seems to be included in the last dev version.