after installing punchclock, I get 2 new user roles (Employee and Supervisor) but as soon as I try to re-read the modules section, I get the following error message and can not see the modules;

Notice: Undefined index: edit own field_punch_activity in user_role_grant_permissions() (line 3028 of /var/www/d7/modules/user/user.module).
* PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 8 [:db_insert_placeholder_1] => edit own field_punch_activity [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3030 of /var/www/d7/modules/user/user.module).
I have already checked boxes for roles to be able to punch in (etc.)
further, if I go to http:///example_site/admin/structure/views/view/punchlog I get error;
* Notice: Undefined offset: 0 in views_handler_field_field->option_definition() (line 293 of /example_site_path/modules/admin/views/modules/field/views_handler_field_field.inc).
* Notice: Undefined offset: 0 in views_handler_field_field->option_definition() (line 293 of /example_site_path/ modules/admin/views/modules/field/views_handler_field_field.inc).

CommentFileSizeAuthor
#3 Screen shot 2012-08-16 at 5.56.18 PM.png100.28 KBbusla
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SolomonGifford’s picture

I cannot reproduce. I've reinstalled. Are you using Views 3?

SolomonGifford’s picture

Status: Active » Closed (cannot reproduce)

I've re-released. See if that solves the problem.

busla’s picture

I get the same problem

jax555’s picture

Status: Closed (cannot reproduce) » Active

Has this problem ever been figured out. I installed punchclock and of course I get the same exception. No matter if I give employees every permission , it still comes up so there must be another solution to this.

serfurt1’s picture

Issue summary: View changes

Found a way to remove the error and restore the Modules menu visibility. Whether or not this edit makes the permissions work as expected, I haven't tested. Code (in punchclock.module):

//stuff before

function punchclock_permission() {
	return array(
			'punchclock punch' => array(
					'title' => t('Punchclock Punch In'),
					'description' => t('Can punch in and out'),
			),
			'view punches' => array(
					'title' => t('View Punches'),
					'description' => t('Can view users\' punch ins and outs'),
			),
			'administer punchclock' => array(
					'title' => t('Administer Punchclock'),
					'description' => t('Administer Punchclock'),
			),
			//Begin edits to remove error

			'delete any shift content' => array(
				'title' => t('delete any shift content'),
				'description' => t('delete any shift content'),
			),
			'delete own shift content' => array(
				'title' => t('delete own shift content'),
				'description' => t('delete own shift content'),
			),
			'edit any shift content' => array(
				'title' => t('edit any shift content'),
				'description' => t('edit any shift content'),
			),
			'edit field_punch_activity' => array(
				'title' => t('edit field_punch_activity'),
				'description' => t('edit field_punch_activity'),
			),
			'edit field_punch_start' => array(
				'title' => t('edit field_punch_start'),
				'description' => t('edit field_punch_start'),
			),
			'edit field_punch_status' => array(
				'title' => t('edit field_punch_status'),
				'description' => t('edit field_punch_status'),
			),
			'edit field_punch_tasks' => array(
				'title' => t('edit field_punch_tasks'),
				'description' => t('edit field_punch_tasks'),
			),
			'edit own field_punch_activity' => array(
				'title' => t('edit own field_punch_activity'),
				'description' => t('edit own field_punch_activity'),
			),
			'edit own field_punch_start' => array(
				'title' => t('edit own field_punch_activity'),
				'description' => t('edit own field_punch_activity'),
			),
			'edit own field_punch_tasks' => array(
				'title' => t('edit own field_punch_tasks'),
				'description' => t('edit own field_punch_tasks'),
			),
			'edit own shift content' => array(
				'title' => t('edit own shift content'),
				'description' => t('edit own shift content'),
			),
			'view field_punch_activity' => array(
				'title' => t('view field_punch_activity'),
				'description' => t('view field_punch_activity'),
			),
			'view field_punch_start' => array(
				'title' => t('view field_punch_start'),
				'description' => t('view field_punch_start'),
			),
			'view field_punch_status' => array(
				'title' => t('view field_punch_status'),
				'description' => t('view field_punch_status'),
			),
			'view field_punch_tasks' => array(
				'title' => t('view field_punch_tasks'),
				'description' => t('view field_punch_tasks'),
			),
                        //End edits

//stuff after