简体   繁体   中英

Drupal newsletter module and restricted access category

I am using Drupal 7 with newsletter module ( https://drupal.org/project/newsletter ). I created templates with the rispectives lists. Unfortunately I am not able to see the real name of the category, I just see "Restricted access" for each on".

Anyway if I try to inspect the element the ID category is the right one and everything is working aside the incorrect email of the category.

Thanks

I encountered this issue also. Apparently newsletters implementation of hook_entity_info is lacking an "access callback".

I put this code in my module, and defined my own access callback, but you could probably use an existing callback if you prefer.

function mymodule_entity_info_alter(&$entity_info){
    $entity_info["newsletter_template"]["access callback"] = "mymodule_template_access";
}

function mymodule_template_access($op, $entity, $account, $entity_type){
    return true;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM