Active
Project:
Pay-per-node
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2015 at 15:48 UTC
Updated:
23 Jan 2015 at 15:48 UTC
In my drupal installation i couldn't get permissions to create(not even as administrator) content which where of a type with underscore(p.x. 'support_ticket') so i made this change to pay-per-node.module at line 147 and it worked:
foreach (node_type_get_types() as $type) {
// user can create node with his assigned permissions
if (node_access('create', $type->type)) {
$type->type=str_replace('_', '-', $type->type);
$_paypernode_global_node_creation['with_perms'][$type->type]=-1; // unlimited
}
}
I added this line:
$type->type=str_replace('_', '-', $type->type);
Hope it helps and get commited. I was using the 7.x-2.x-dev release.