When porting to D7 the taxonomy/term/% path changed to taxonomy/term/%term_id and although menu_hook_alter's would register as changing the menu callback appropriately, it would not actually "take" in the front-end and would show the default menu callback.

As a work around the following is currently implemented in 7.x-1.x-dev trunk.

1. Change all views to *not* overwrite the core path and use a slightly different path.
2. Select the view as you normally would using the vocab/term edit pages
3. Submit tickets on the errors you discover!

Comments

ipwa’s picture

Thanks for this work around.

My problem is that when I do this, I get an access denied message on all my term pages.

I also found that when I edit a Taxonomy, I can select the view and the view display, but it only saves the view name and the display goes back to being the first on available on the list. Maybe this is causing my problem. Does your installation save the view display when you edit taxonomy pages and assign a view?

ipwa’s picture

Taxonomy Views Switcher is working for me: http://drupal.org/node/1106948

Nice temporary solution.

truongquangphuc’s picture

It's also a problem of me! :(

alladdin’s picture

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

Same here but for D6 dev version.

Have duplicate content on the site:

/vocabname/termname
and
/taxonomy/term/termid

in same time. How to fix it?

kevinquillen’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs review

Please do not switch versions around- it is hard to track them when working on a specific version (my queue is filtering for 7.x).

I am releasing an alpha2 release shortly where I was able to get taxonomy/term/% overridden with TVI and a view. Please try it out (be sure to read the release notes) and let me know how you fare.

uno’s picture

Alpha2 release is working just fine, when it comes to custom view block(s) per taxonomy terms.

The only (minor) issue is that, when TVI enabled, default Taxonomy term view does not overtake non-TVI Taxonomy Term display (in my scenario), I had to set it via TVI settings specifically to each term, or set vocabulary global TVI setting per vocabulary, which also works fine.

Thanks for your effort.

kevinquillen’s picture

Are you saying that when the module is enabled, it should include a default view for the user to customize, and set all current vocab to use that as an example?

uno’s picture

No, somehow we misunderstood.

Some of the people (I think many), use pre-build Taxonomy term view (either default, cloned or customised), as a default for the taxonomy terms in general, and than just enable TVI for those terms that should be using some view other than default.

I haven't tested thoroughly, but on one of my sites (common installation), after enabling Alpha2, default Taxonomy Term view is no longer default, even for the terms not managed by TVI, that were supposed to be managed by default Taxonomy Term view.

I had to use TVI for all vocabularies, and enable Taxonomy Term view, otherwise it would only show default (node) Taxonomy term page sorting.

And, I am not stating this is a huge disadvantage, at least not for me, but for sites that have many vocabularies ... ?

Still, I may be wrong, since I tested it only on one site, for a limited period of time, will report again after some time.

Thanks.

kevinquillen’s picture

I think I see what you are saying, can you post some screenshots?

uno’s picture

I can, if you insist, but I am not sure how to show you this issue with screenshots, since the devil is in the code. I could, also, give you a link, but since it is a non English site, I do not want you to loose your time and eyes in a foreign language maze :D

I am using default pre-build taxonomy term view (cloned, customized and enabled) for most of my terms.

I enabled TVI and set it for few selected taxonomy terms.

Those taxonomy terms, where I did not enable TVI, should have Taxonomy Term View display, which they do not - they are using core Drupal Taxonomy Term display - node/article display.

EDIT - Zillions of the following caused me to disable the module:

Notice: Undefined variable: display in tvi_get_view_info() (line244 /home/example/public_html/sites/all/modules/tvi/tvi.module).

duaelfr’s picture

StatusFileSize
new481 bytes

@uno : free gift for your notice ;)

Glavrach’s picture

Костыль:

function tvi_init() {
  if (arg(0) == 'taxonomy' and arg(1) == 'term') {
    $tid = arg(2);
    $info = tvi_get_term_info($tid, TVI_DATATYPE_SETTINGS);
    if ($info and (int)$info->status == 1) {
      $item = menu_get_item('taxonomy/term/'.$tid);
      $item['path']    = 'taxonomy/term/'.$tid;
      $item['page_callback']    = 'tvi_render_view';
      $item['page_arguments']   = array($tid);
      $item['access callback']  = 'tvi_render_view_access';
      $item['access_arguments'] = array($tid);
      menu_set_item('taxonomy/term/'.$tid, $item);
    }
  }
}

function tvi_menu_alter(&$items) {
  /*
  $items['taxonomy/term/'.$tid]['page callback']    = 'tvi_render_view';
  $items['taxonomy/term/'.$tid]['page arguments']   = array(2);
  $items['taxonomy/term/'.$tid]['access callback']  = 'tvi_render_view_access';
  $items['taxonomy/term/'.$tid]['access arguments'] = array(2);
  */
}

Делать патч и переводить на английский было лень.

duaelfr’s picture

Status: Needs review » Closed (fixed)

I just pushed a fix for this bug to the 7.x branch.
It will be in the next dev release.

elpino’s picture

Status: Closed (fixed) » Needs review

I just installed 7.x-1.0-beta3 release and it's displaying this same behavior.

Enabled vocabularies are displayed with the custom view page correctly, yet disabled vocabularies which should be displayed by the default view page override are completely ignoring views altogether and are being displayed by Drupal's core functionality.

Maybe the buggy code got reintroduced in a patch.

Update: I'll open a new issue as not to assume the bug is from the same code even though they behave the same way.

cwithout’s picture

Status: Needs review » Closed (fixed)

Resetting status. See #1968086: TVI disabled vocabularies ignore views default taxonomy term page override for issue with default view not being used. (Patch included.)