When defining several views with conflicting paths, well defined urls should override argument based paths, which is not the current behavior.
For example, say we have a national organization with state sub chapters. The national press releases are located at /media/releases and consist of a view of the national press release content type. Chapters use a separate content type for their press releases, and tag it with a taxonomy term for their chapter. We setup a second view for them so these releases are located at /$arg/releases where $arg is the chapter taxonomy term. This all works, except that once the second view is implemented, /media/releases no longer returns results, because there is no chapter code of 'media'.
There are several other use-cases I have run into that have run across the same issue.
Here is a diff that will resolve this, I can attach a real patch file if you like, but its only a one line change.
Thanks!
retrieving revision 1.166.2.43
diff -u -r1.166.2.43 views.module
--- views.module 14 Jul 2007 18:54:16 -0000 1.166.2.43
+++ views.module 24 Aug 2007 15:29:59 -0000
@@ -96,7 +96,7 @@
views_menu_admin_items($items, $view_name, $view_args, $args);
}
}
- else {
+ elseif(!in_array($_GET['q'], $urls)) {
// Do substitution on args.
$use_view = $use_menu = FALSE;
$menu_args = $view_args = $menu_path = array();
Comments
Comment #1
missym commentedI tried it and it solves various and sundry problems. Thanks for the patch!
Comment #2
sunPlease submit a proper patch.
Comment #3
esmerel commentedNo patch submitted.