Even when user is anonymous, all nodes have added "View items" menu tab. The solution (per #434160: How to make a menu tab created by page display view to be appeared on a specific content type, not all content types) is to add validator to the argument of page display of feeds_defaults_feed_items that checks if node type is Feed.

Comments

robcarr’s picture

StatusFileSize
new622 bytes

I'm seeing 'View items' as a tab on every node too. Changed the page View (of view feeds_defaults_feed_items) to include the argument validator, which removed the 'View items' tab (hurrah).

Had a look at the page feeds_news.views_default.inc... should the following be added (line 151) to prevent this occurring by default?

	$handler->display->display_options['arguments']['nid']['validate_type'] = 'node';
	$handler->display->display_options['arguments']['nid']['validate_options']['types'] = array(
	    'feed' => 'feed',
	  );

I'm not really a code monkey, but does this work?

dave reid’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new2.27 KB

Confirmed and re-rolled for whitespace adjustments. Also fixed that if the node ID argument is not there, then it should show a 404 and not empty text.

MrPhilbert’s picture

Time frame for rolling this patch into release?

robcarr’s picture

@Mr Philbert you need to review the patch at #2 and try it out. I've tried it and it's fine. If at least one other reviews it and finds it helps, please change issue status to RTBC... then it might get committed pretty swiftly

MrPhilbert’s picture

Tried the patch and view items no longer display.
Sorry it took so long to get back to you. I was trying to get this reply in yesterday before the github shutdown but I was just a few minutes late.

TrevorG’s picture

I tried this patch on the alpha3 release and all Hunks failed. I am relatively new to patching, can someone verify that this patch works?

robcarr’s picture

@TrevorG the patch currently only works against DEV.

TrevorG’s picture

I am using the latest dev, and downloaded the latest dev just to be sure I had a clean setup. I will try again soon and let you know.

404’s picture

subscribe

Though i don't really want anonymous user to see the view-time and log tab on nodes imported by feeds node importer. Currently i am using css to hide the tabl

nzekioglu’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha3

My experience, in case it helps anyone... the patch did not help but I was able to get rid of the tabs using the settings in the 2 views that Feeds creates. I edited the views "feeds_defaults_feed_items" and "feeds_log" and removed the menu options under page settings from the appropriate displays. Is this a wrong-headed way of handling it?

dave reid’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev

Patch is against 7.x-2.x, so please don't change the version.

dave reid’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

cvining’s picture

FYI,

I had this Tab issue (View & Log tabs showing on all nodes, even to anonymous). Tried both
7.x-2.0-alpha4 and
7.x-2.x-dev

I just disabled the "Feed node page" View, and it's gone.

I sure don't want anonymous to see those tabs all the time!

-- Cronin

damontgomery’s picture

We had the same problem with the "view items" and "log" tabs. Oddly enough, the log tab only showed for logged in users and the "view items" only for anonymous. We have a staging site and a production site and the "view items" didn't show for the staging, but did show for live.

Disabling the two views related to feeds, "feeds_defaults_feed_items" and "feeds_log" as described above fixed our problem as well.

Thank you.