Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
And remove all programmatically created overviews/tables in favor of views.
Comment | File | Size | Author |
---|---|---|---|
#6 | view_permissions-1658962-6.patch | 938 bytes | basvredeling |
Comments
Comment #1
weseze CreditAttribution: weseze commentedInitial port has been done.
Still to do:
Comment #2
weseze CreditAttribution: weseze commentedReferencing #1930398: "Simplenews Statistics" tab showing on all pages.
Comment #3
weseze CreditAttribution: weseze commentedComment #4
deggertsen CreditAttribution: deggertsen commentedOne 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.
Comment #5
r0bm1lls CreditAttribution: r0bm1lls commentedHi,
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.
Comment #6
basvredelingView 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...
Comment #7
4x3 CreditAttribution: 4x3 commentedUpgraded 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.
Comment #8
dieuweI 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.