And remove all programmatically created overviews/tables in favor of views.

CommentFileSizeAuthor
#6 view_permissions-1658962-6.patch938 bytesbasvredeling
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

weseze’s picture

Initial port has been done.

Still to do:

  • Finish simplenews clicks view
  • simplenews opens view
  • Main simplenews statistics view
weseze’s picture

weseze’s picture

Priority: Major » Critical
deggertsen’s picture

One simple change that should be made is the permissions. The default for the view should be set so that only those with the "View newsletter statistics" permissions can access the tab. This doesn't totally solve the problem as the tab still appears for every node type, but it helps. In order to fix it so it doesn't show up for every node type a solution like the one mentioned here may work: #1485188: How to hide a TAB menu made by Views if the view itself return no results: is there a better way to accomplish this?

If anybody wants the view export with the simple permission change, I can post it. I just didn't want to take up a ton of space for such a small change.

r0bm1lls’s picture

Hi,

Just to be clear the tab shows even if the node display is not defined in a view. Simple normal node display shows the tab. Unless I'm missing something the issue of the "simplenews statictics" tab showing is not limited to a view. It shows up everywhere.

basvredeling’s picture

Issue summary: View changes
FileSize
938 bytes

View permission added in a small patch.

Perhaps the node type filter can be applied with some small code in hook_menu_local_tasks_alter(). https://api.drupal.org/api/drupal/modules!system!system.api.php/function...

4x3’s picture

Upgraded our site from D6 to D7 and Simplenews statistics tab was showing up on all pages - even when logged out. I could not remove the tab - even with Statistics module uninstalled. I found a few links in the Navigation Menu table in the database to "node/%/simplenews_statistics". I manually deleted these from the database and cleared the cache. This removed the stray links.

dieuwe’s picture

Status: Active » Closed (fixed)

I have just committed a patch to fix the view permissions and implemented a hook to hide the menu tabs for content types that are not newsletter.

If there are any more bugs related to the view, please open a new issue.