I wanted to do the following:
Add two tabs to the popular/alltime, popular/latest tab set. These would become popular/images, popular/rides. A ride is a CCK type on our system - http://nobmob.com
Anyhow, easily done, created a view with page/menu option. Put them on the URLs above, filtered for only nodes with ratings (votes API with Fivestar module) and this works.
However, the popular/images page has no tabs. Very odd can can't work out why. The only clue is 'Title' column being blank for the two non-standard views (popular/images, popular/rides) in the views admin table list, even though this column was filled in the DB (used MySQL to look).
This problem was first spotted on 1.5, upgraded to 1.6-beta5 on a test system to check and problem persists. The beta version does show the correct title on the views admin page however, so this is probably a red herring in the earlier release.
Comments
Comment #1
merlinofchaos commentedDo you have a manual menu link to popular/images somewhere? The menu system can easily destroy the tabness of a link by doing that.
Otherwise, if that's not the case...I'm not quite sure what might be going on here. Might require some investigation and trying to recreate this situation in a minimal environment.
Comment #2
raintonr commentedNo, no other menu entries.
SELECT * FROM menu where path like 'popular%' order by path;shows just one entry for 'recent popular content'. The others aren't there, sorry - I don't know if that's how it's supposed to work or not.select * from view_view where url like 'popular%';returns 4 rows for alltime, recent, images and rides as I'd expect.You are welcome to mess about in our development system if that would help. Contact me offline (homepage on Drupal profile has email address) to arrange.
Comment #3
raintonr commentedA little more poking on this this eve. I placed some debug in the
views_menufunction. The menu looks to be being correctly built. A dump of the items returned by this shows:Visiting the URL for the page with no menu items, and a URL with some menu items produced the same dump above.
I'm not really sure what's meant to happen here, but should we be pointing fingers at the core menu rendering code? Does the above look normal?
Comment #4
raintonr commentedMore tracing... think the problem is that when one includes "Node: Body" in the view, that node is loaded to gain the body and it is this that is replacing the menus with those that would be on the last loaded node's page.
More digging reveals it's not actually the load that's doing this as if one comments out the
node_invoke_nodeapi($node, 'view', $teaser, TRUE);call (around line 462 inviews_node.inc) then this problem disappears. Of course this probably breaks something else I don't know what this is meant to be doing!Comment #5
raintonr commentedMore digging... this ultimately is down to the image_gallery.module. In
image_gallery_nodeapifunction (triggered from the call I previously commented out), there is a call tomenu_set_location.At first it would seem that we should remove the
menu_set_locationfrom image_gallery.module because when the node teaser is shown the location should not be modified. However, thinking on, views allows either teaser or body to be shown so changing the image_gallery.module will not work in all situations.Seems that the views.module should also call
menu_set_locationat some point to make sure any changes that occurred during in node processing during the building of the view are removed. Perhaps inside theviews_view_pagefunction?Comment #6
merlinofchaos commentedimage_gallery.module should only call menu_set_location if $page == TRUE, not if $teaser == FALSE.
You should file a bug against image_gallery and point them at this issue.
Comment #7
raintonr commentedThis has been accepted as a required change to image_gallery.module and bug/patch submitted there:
http://drupal.org/node/162496
Hence am closing this as one as a duplicate.