Comments

druroot’s picture

Assigned: Unassigned » druroot
mariagwyn’s picture

subscribing. will patch and test, though I can't really code. sorry.

paulgemini’s picture

subscribing

sirkitree’s picture

Started looking that requirements for this tonight - seems there is not content_permissions module for D7? It's listed as a dependency of cod_session, but I saw no project for it, so looked in CCK's master branch which is where their -dev is happening. Nothing there.

Looks like http://drupal.org/project/field_permissions is where it's all goin' down.

sirkitree’s picture

One of the dependencies in this feature is node reference. What is the recommended node reference module in D7 we want to go with here?

1. http://drupal.org/project/references
2. http://drupal.org/project/Relation

sirkitree’s picture

It doesn't seem that relation is exportable by features currently, according to #1184238: Add import of ctools relation type exports

However, references seems to be. Going to go with that for now.

sirkitree’s picture

In creating the Session content type, I ran into this little checkbox in D6:

This isn't available in the D7 version of the references module, but a patch was just committed to dev today in which it does provide some views integration for this purpose: #1083902-43: Backreferencing (listing nodes that reference the target node)

sirkitree’s picture

Here is the first attempt at upgrading this. I was able to get pretty far. This currently includes:

  • all relevant content types (I didn't think page was relevant)
  • all fields and field groups for these content types
  • the "session organizer" role
  • edit and view field permission for this role (need to look and see if this actually acts as we are expecting, have a feeling the functionality changed a bit in field_permissions module)
  • all variables (except pathauto)

Still todo:

  • views (these need recreated and the specific calendar style needs upgraded to work with Views 7.x)
  • pathauto settings for the content types added to strongarm
sirkitree’s picture

Last patch was corrupt somehow. Try this one.

sirkitree’s picture

one more time

ezra-g’s picture

I re-rolled and made some slight tweaks (updated the "package" value, made some tweaks to COD_Base so that we can preserve the user permissions here) and committed this along with some other related updates to cod_base.

Thanks, sirkitree!

http://drupalcode.org/project/cod_support.git/commit/2f4cfea
http://drupalcode.org/project/cod_support.git/commit/299fbc7

sirkitree’s picture

Status: Active » Needs work

Here is a start on upgrading the session view. This is just the "Page: Proposals" display.


$view = new view;
$view->name = 'sessions';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'sessions';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Proposed Sessions';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '20';
$handler->display->display_options['style_plugin'] = 'table';
/* No results behavior: Global: Text area */
$handler->display->display_options['empty']['area']['id'] = 'area';
$handler->display->display_options['empty']['area']['table'] = 'views';
$handler->display->display_options['empty']['area']['field'] = 'area';
$handler->display->display_options['empty']['area']['label'] = 'No sessions...';
$handler->display->display_options['empty']['area']['empty'] = FALSE;
$handler->display->display_options['empty']['area']['content'] = 'No sessions have been submitted.';
$handler->display->display_options['empty']['area']['format'] = 'plain_text';
$handler->display->display_options['empty']['area']['tokenize'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = 'Session';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 0;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Name(s) */
$handler->display->display_options['fields']['field_speakers']['id'] = 'field_speakers';
$handler->display->display_options['fields']['field_speakers']['table'] = 'field_data_field_speakers';
$handler->display->display_options['fields']['field_speakers']['field'] = 'field_speakers';
$handler->display->display_options['fields']['field_speakers']['label'] = 'Speaker(s)';
$handler->display->display_options['fields']['field_speakers']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_speakers']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_speakers']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_speakers']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_speakers']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_speakers']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_speakers']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_speakers']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_speakers']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_speakers']['group_rows'] = 0;
$handler->display->display_options['fields']['field_speakers']['delta_offset'] = '0';
$handler->display->display_options['fields']['field_speakers']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_speakers']['multi_type'] = 'ul';
$handler->display->display_options['fields']['field_speakers']['field_api_classes'] = 0;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
$handler->display->display_options['fields']['body']['label'] = '';
$handler->display->display_options['fields']['body']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['body']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body']['alter']['external'] = 0;
$handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body']['alter']['max_length'] = '200';
$handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim'] = 1;
$handler->display->display_options['fields']['body']['alter']['html'] = 0;
$handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['body']['element_default_classes'] = 1;
$handler->display->display_options['fields']['body']['hide_empty'] = 0;
$handler->display->display_options['fields']['body']['empty_zero'] = 0;
$handler->display->display_options['fields']['body']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['body']['type'] = 'text_summary_or_trimmed';
$handler->display->display_options['fields']['body']['settings'] = array(
  'trim_length' => '250',
);
$handler->display->display_options['fields']['body']['field_api_classes'] = 0;
/* Field: Content: Status */
$handler->display->display_options['fields']['field_accepted']['id'] = 'field_accepted';
$handler->display->display_options['fields']['field_accepted']['table'] = 'field_data_field_accepted';
$handler->display->display_options['fields']['field_accepted']['field'] = 'field_accepted';
$handler->display->display_options['fields']['field_accepted']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_accepted']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_accepted']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_accepted']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_accepted']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_accepted']['element_label_colon'] = 0;
$handler->display->display_options['fields']['field_accepted']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_accepted']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_accepted']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_accepted']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_accepted']['field_api_classes'] = 0;
/* Field: Content: Experience level */
$handler->display->display_options['fields']['field_experience']['id'] = 'field_experience';
$handler->display->display_options['fields']['field_experience']['table'] = 'field_data_field_experience';
$handler->display->display_options['fields']['field_experience']['field'] = 'field_experience';
$handler->display->display_options['fields']['field_experience']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_experience']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_experience']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_experience']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_experience']['element_label_colon'] = 0;
$handler->display->display_options['fields']['field_experience']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_experience']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_experience']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_experience']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_experience']['field_api_classes'] = 0;
/* Field: Content: Track */
$handler->display->display_options['fields']['field_track']['id'] = 'field_track';
$handler->display->display_options['fields']['field_track']['table'] = 'field_data_field_track';
$handler->display->display_options['fields']['field_track']['field'] = 'field_track';
$handler->display->display_options['fields']['field_track']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_track']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_track']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_track']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_track']['element_label_colon'] = 0;
$handler->display->display_options['fields']['field_track']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_track']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_track']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_track']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_track']['field_api_classes'] = 0;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Content: Experience level (field_experience) */
$handler->display->display_options['arguments']['field_experience_value']['id'] = 'field_experience_value';
$handler->display->display_options['arguments']['field_experience_value']['table'] = 'field_data_field_experience';
$handler->display->display_options['arguments']['field_experience_value']['field'] = 'field_experience_value';
$handler->display->display_options['arguments']['field_experience_value']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['field_experience_value']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['field_experience_value']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['field_experience_value']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['field_experience_value']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['field_experience_value']['glossary'] = 0;
$handler->display->display_options['arguments']['field_experience_value']['limit'] = '0';
$handler->display->display_options['arguments']['field_experience_value']['transform_dash'] = 0;
$handler->display->display_options['arguments']['field_experience_value']['break_phrase'] = 0;
/* Contextual filter: Content: Track (field_track) */
$handler->display->display_options['arguments']['field_track_value']['id'] = 'field_track_value';
$handler->display->display_options['arguments']['field_track_value']['table'] = 'field_data_field_track';
$handler->display->display_options['arguments']['field_track_value']['field'] = 'field_track_value';
$handler->display->display_options['arguments']['field_track_value']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['field_track_value']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['field_track_value']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['field_track_value']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['field_track_value']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['field_track_value']['glossary'] = 0;
$handler->display->display_options['arguments']['field_track_value']['limit'] = '0';
$handler->display->display_options['arguments']['field_track_value']['transform_dash'] = 0;
$handler->display->display_options['arguments']['field_track_value']['break_phrase'] = 0;
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'session' => 'session',
);
/* Filter criterion: Content: Status (field_accepted) */
$handler->display->display_options['filters']['field_accepted_value']['id'] = 'field_accepted_value';
$handler->display->display_options['filters']['field_accepted_value']['table'] = 'field_data_field_accepted';
$handler->display->display_options['filters']['field_accepted_value']['field'] = 'field_accepted_value';
$handler->display->display_options['filters']['field_accepted_value']['operator'] = 'not in';
$handler->display->display_options['filters']['field_accepted_value']['value'] = array(
  'all' => 'all',
  1 => '1',
  2 => '2',
);

/* Display: Page: Proposed */
$handler = $view->new_display('page', 'Page: Proposed', 'page_proposed');
$handler->display->display_options['path'] = 'program/sessions/proposed';
coltrane’s picture

This patch adds the prepopulation of the first speaker slot to the person creating the session.

rupl’s picture

This patch combines sirkitree's Views export from #12 and adds a "Page: Accepted" display to sessions.

rupl’s picture

Updated patch. Combines #12, #13, and #14 with additional displays: updated 'Page:Accepted' and added 'Feed:All'

Node:Session permissions are not included in this Feature yet. They require manual config if you want regular authenticated users to submit sessions. Googling for the PDO error I was receiving led me to #1063204: Adding a new permission causes integrity constraint violation (I'm using Features 7.x-1.0-beta3) and I haven't been able to work around it yet.

rupl’s picture

Building on #15, this patch contains the following:

  • Views: sessions_admin - All four displays: unprocessed, declined, accepted, scheduled.
  • Minor change to Session:Status field. Added 0|Unprocessed to allowed values, set it as the default value, and made it a required field. I'm having trouble getting Views/Features to import Filter groups correctly, so without the field change I couldn't list unscheduled proposals. Since Unprocessed is a valid status I didn't see harm in deviating from D6 convention.
  • Corresponding tweaks to Views:sessions to accomodate field change.

Still lacking permissions!

rupl’s picture

Continuing to build on the previous patch, this time with sessions_admin_contact View, session_confirm Flag, and dependency on VBO. Emails are not yet auto-populated with form-letter copy.

BTMash’s picture

Changing status to 'needs review' so someone remembers to go through it.

BTMash’s picture

Status: Needs work » Needs review

ack...didn't change it

paulgemini’s picture

I can enable it after most recent patch! Haven't gotten much past that though

japerry’s picture

I get this error from the latest patch:
Notice: Undefined index: edit field_experience in user_role_grant_permissions() (line 3026 of htdocs/modules/user/user.module).

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: UPDATE {role_permission} SET module=:db_update_placeholder_0 WHERE ( (rid = :db_condition_placeholder_0) AND (permission = :db_condition_placeholder_1) ); Array ( [:db_update_placeholder_0] => [:db_condition_placeholder_0] => 4 [:db_condition_placeholder_1] => edit field_experience ) in user_role_grant_permissions() (line 3028 of htdocs/modules/user/user.module).

When I go back, it says its 'rebuilding' permissions. and stays there

oadaeh’s picture

The Integrity constraint violation error is either a bug in Features or Drupal core. My searching led me to two issues: http://drupal.org/node/1063204 and http://drupal.org/node/607238. After reading through those and a number of other related bug reports, I was still unable to verify what was actually causing the problem, nor could I come up with a fix to resolve it. (I kind of ran out of steam.)

That result of that error is that none of the permissions are added or set. Somewhere along the way, the module name gets removed from the call stack before that database query (and other similar queries) is made.

----------

Other than the above, the patch in #17 applies cleanly to the version of COD 7.x-1.x pulled with git. The module appears to work correctly, although I don't know for sure if I found and checked absolutely everything.

----------

I did find one usability problem. When submitting a session, if the user attempts to add another speaker, a not so very helpful error message is displayed:

An illegal choice has been detected. Please contact the site administrator.

and the second speaker is not added.

The problem is that the Experience level field (way down on the page) is required but not set to anything. AFAICT, There are two ways to fix it: 1) make the field not required, or 2) have the field default to one of the values.

oadaeh’s picture

Status: Needs review » Needs work

Setting to needs work for the usability problem. I don't think the database problem is the fault of this module.

druroot’s picture

Status: Needs work » Needs review
FileSize
162.34 KB

Here's a patch that addresses the permissions and ui issue. I've removed the required option from the experience level field. As for the permissions, I removed several field level permissions in favor of content level permissions where appropriate. Newer versions of features and field_permissions seem to play nicely together now, so after clearing out several of the old settings and rerolling the feature, it looks like it's working much better, although you may have to uninstall the module and re-enable it if you have a very old sandbox.

oadaeh’s picture

I have a couple of questions for my own clarification:
* In the D6 version, cod_session depends on cod_base. Should the D7 version depend on cod_base?
* Is the desired functionality that content types added by this module are not removed during the uninstallation and cannot be manually deleted?

The latest patch applies cleanly, and the database/permissions error does not show up, but I haven't done much testing. The above are observations I made while working on the BoF Scheduler.

ezra-g’s picture

* In the D6 version, cod_session depends on cod_base. Should the D7 version depend on cod_base?

As long as it depends on items defined in COD Base.

* Is the desired functionality that content types added by this module are not removed during the uninstallation and cannot be manually deleted?

I don't think we should delete content during uninstallation, and since this is a general issue to the Node API rather than COD, I don't think it's worth documenting.

coltrane’s picture

#24 is passing following manual tests:

1. Enable feature without errors
2. Create session as authenticated user
3. Administrator schedules session (after creating room and timeslot)
4. Proposed and accepted Views are working

I'll do some more testing but I think this is probably fine to commit as is and allow new issues for cleanup.

For the start of the schedule I'll probably export Denver2012's grouped-by time schedule.

oadaeh’s picture

This module seems to be causing a problem that I have not been able to pin down. I have, however, been able to reproduce the steps it takes to manifest the problem, verifying that this module was the impetus. I had to do that, because it was causing errors during my creating the BOF feature, and I needed to verify the cause.

I started with a brand new, clean installation of Drupal 7.x.
I installed all the modules that COD Base and COD Session are dependent on.
I verified that the problem was NOT present.
I installed COD Base.
I verified that the problem was NOT present.
I installed COD Session (with the latest patch).
I verified that the problem WAS present.

The problem is that when ever you edit certain fields, you get the following error message:

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7424 of /path/to/drupal7.x/includes/common.inc).

The line number may be different.

The fields where I saw this are:
* List (integer) - Check boxes/radio buttons
* Long text and summary - Text area with a summary (the default "Body" field)
* Node reference - Check boxes/radio buttons
* Node reference - Select list

The fields that did not exhibit this behavior are:
* Date - Pop-up calendar
* File - File
* Image - Image
* List (text) - Check boxes/radio buttons
* Term reference - Autocomplete term widget (tagging)
* Text - Text field
* User reference - Autocomplete text field

Obviously, I did not try all possible combinations.

This behavior seems to only happen with fields that were created before the module was enabled and with all "Body" fields. Fields that are created after installing the module seem to work correctly, except for the "Body" field, which never works correctly, but can be replaced with a new field of like kind.

This is apparently not a new phenomena: https://www.google.com/search?gcx=w&sourceid=chrome&client=ubuntu&channe...()+(line+7424+of+%2Fhome%2Fjason%2Fvcs%2Fgit%2Fdrupalcon%2Fdrupal-7.x%2Fincludes%2Fcommon.inc).#sclient=psy-ab&hl=en&client=ubuntu&hs=arB&channel=cs&source=hp&q=EntityMalformedException%3A+Missing+bundle+property+on+entity+of+type+node.+in+entity_extract_ids&pbx=1&oq=EntityMalformedException:+Missing+bundle+property+on+entity+of+type+node.+in+entity_extract_ids&aq=f&aqi=&aql=&gs_sm=e&gs_upl=7037163l7037163l3l7037877l1l1l0l0l0l0l583l583l5-1l1l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=a1bc1589ec616832&biw=1569&bih=759

Once again, I've run out of steam before I could find a fix, but there are a number of contrib modules that are experiencing this, so it shouldn't be too difficult to figure out what is causing it.

oadaeh’s picture

Okay, it wasn't totally this module that caused it, but some toxic interaction with field_permissions. This patch applied to the 7.x-1.x version fixed the problem for me. Whew. Onward!

coltrane’s picture

Status: Needs review » Reviewed & tested by the community

#24 RTBC

Requires a lot of dev releases to avoid errors. Should update cod.profile so setup is easier.

I think issues with cod_session can happen in followups:
* sessions_admin_contact view not working, not showing any sessions in any state (unprocessed or scheduled tested)
* Consider making tracks and experience field machine values not numeric (semantic)
* export denver2012 schedule
* Make session confirm flag require a step, default to no roles may use it

oadaeh’s picture

Status: Reviewed & tested by the community » Needs work

This is just an FYI to say that the patch in #24 is missing a Views style plugin that the BoF Scheduling tool is somewhat dependent on for it's view. I started working on it, but I have been a little over busy w/work and other personal obligations, so I haven't got anything more done than integrating the D6 version of the plugin into the patch. It, of course, doesn't work, and that will need to be corrected.

The patch also does not include the fancy day and time validation when creating a new event that is in COD 6, but maybe that's not as important.

oadaeh’s picture

I went ahead and took a look at what it would take to upgrade that plugin (rather than waste time in Minecraft), and I think I may have it about 75% done. I'll try to finish it up and update the patch in the next couple of days.

oadaeh’s picture

Status: Needs work » Needs review
FileSize
98.96 KB

I'm sorry it took so long. Attached is my attempt to bring this module up to date.

In no particular order, here are some of the issues resolved or remaining (some as an FYI):

  • Except for some of the items I list below, I believe it is feature complete. However, although I tried my best, I won't guarantee that it's working 100%, so buyer beware.
  • I did not convert cod_session_link_alter(), because hook_link_alter() no longer exists, and I couldn't figure out how to get hook_entity_view_alter() or hook_node_view_alter() to work.
  • There are problems w/Token, Entity Token, Date, and Auto Node Title working together (and probably a lot of other modules). This the current status by KarenS: http://drupal.org/node/1103032#comment-5281422. In order for it to work even close to correctly, the current dev version of Entity API needs to be installed.
  • The link to the main schedule on the Your schedule page does not work 100% correctly all the time. For example, on sites that are installed in a sub-directory of the default directory, they get a 404 error. A potential fix is to use PHP and the l() function. I know that's not going to happen, so I'm leaving it as is, assuming most people won't be installing COD in a subdirectory.
  • There are currently no granularity settings for date fields in Views Contexts (http://drupal.org/node/1153052). In cod_session.module, I commented out the line that retrieves the view and changed the second argument for the call to cod_session_day_slots() to be the day, rather than the key. Maybe I'm doing that part wrong, but it works.
  • cod_session_views_api() needs to be in cod_session.module. Features keeps wanting to add it to cod_session.features.inc, and if it's in that file, the Views plugin will not be found.
  • There are some bits of code I'm pretty sure I never executed in the UI (like cod_session_schedule_form()). It wasn't from my lack of trying, but more likely from lack of understanding of COD. So, there may still be bugs there. (Actually, there may still be bugs in the code I did execute. See the first item.)

If I created the feature or the patch incorrectly, let me know and I'll fix it as soon as possible.

oadaeh’s picture

Hmm. It occurred to me the patch in #33 was against cod_support, not just cod_session. If it matters, this one should just be against cod_session.

coltrane’s picture

Status: Needs review » Needs work

There's no view in cod_session. Though there is one in cod_bof. Oversight?

Also, I'm getting

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] => 5 [:db_insert_placeholder_1] => schedule bof_session [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3030 of /Users/bjeavons/projects/cod/d7/modules/user/user.module)

trying to enable cod bof. What versions of features are you using oadaeh?

oadaeh’s picture

I failed to include new files in the patches I uploaded. The attached patch should rectify that. I'll update the BoF issue with a new patch, as there was a file missing there, too.

Just in case that isn't all of it, below are all the modules I have installed, along with their versions.

Drupal core 7.11-dev (Includes: Bartik, Block, Color, Comment, Contextual links, Dashboard, Database logging, Field, Field SQL storage, Field UI, File, Filter, Help, Image, List, Menu, Node, Number, Options, Overlay, Path, RDF, Search, Seven, Shortcut, System, Taxonomy, Text, Toolbar, Update manager, User)
Admin 7.x-2.0-beta3 (Includes: Admin)
Automatic Nodetitles 7.x-1.0 (Includes: Automatic Nodetitles)
Chaos tool suite (ctools) 7.x-1.x-dev (2012-Jan-10) (Includes: Chaos tools, Page manager, Views content panes)
Coder 7.x-1.0 (Includes: Coder, Coder Review)
Date 7.x-2.0-rc1 (Includes: Date, Date API, Date Popup)
Devel 7.x-1.2 (Includes: Devel)
Entity API 7.x-1.0-rc1+21-dev (2012-Jan-16) (Includes: Entity API, Entity tokens)
Features 7.x-1.0-beta6 (Includes: Features)
Field group 7.x-1.1 (Includes: Fieldgroup)
Field Permissions 7.x-1.x-dev (2012-Jan-10) (Includes: Field Permissions)
Flag 7.x-2.0-beta6 (Includes: Flag)
Panels 7.x-3.0 (Includes: Panels)
References 7.x-2.0 (Includes: Node Reference, References, User Reference)
Strongarm 7.x-2.0-beta5 (Includes: Strongarm)
Token 7.x-1.0-beta7 (Includes: Token)
Views 7.x-3.1 (Includes: Views, Views UI)
Views Bulk Operations (VBO) 7.x-3.0-beta3 (Includes: Views Bulk Operations)

oadaeh’s picture

Status: Needs work » Needs review

Updating status.

infiniteluke’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
136.76 KB

Patch applies cleanly. In comparison to D6 sessions, everything looks good so far. I haven't done a full test with the rest of the site features. I'll chat with ezra-g about this tomorrow before calling this done.

infiniteluke’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
19.05 KB

Apparently the feature is overridden and there is a conflict with cod_sponsors. I have the latest patch applied from #1150350: Upgrade the cod_sponsors Feature to D7. I'm going to set this back to needs review. Looks like there's more dependencies that this needs to be tested against.

coltrane’s picture

Thanks oadaeh! I updated the patch for field permissions, prepopulating, markup elements, and the query for unscheduled content.

ezra-g’s picture

Awesome - Thanks for the re-rolls, everyone!

I made a couple of commits to COD Base including the full name formatter so that we can focus on testing for this issue specifically.

I plan to do more functional testing later this week, but noticed a few issues with #40:

- cod_session.info lists Panels and Page manager as requirements
- The feature appears overridden. I get a max execution timeout waiting for the Features diff to load (A potential workaround is to commit this patch to a local branch and then do drush fu cod_session and compare the changes.

I'm leaving this as "needs review" since the things I mentioned are likely to be somewhat trivial changes and the next step here in my view is more functional testing. Looking forward to diving in on that soon!

coltrane’s picture

Assigned: sirkitree » coltrane
Status: Needs review » Needs work

Noticing these issues:

* re-exporting is putting views_api hook in features.inc and not removing from .module
* cod session appears overridden
* auto node titles isn't working
* conflict isn't working

I have a fix for conflict checking underway.

rupl’s picture

* re-exporting is putting views_api hook in features.inc and not removing from .module

@coltrane I think Features is exhibiting expected behavior by not removing code from the .module file. That way, it doesn't obliterate custom changes we insert into the module (like the field formatter in cod_base, for instance). I think removing the code manually will fix the issue.

coltrane’s picture

This is what it's exporting to cod_session.features.inc:

function cod_session_views_api() {
  list($module, $api) = func_get_args();
  if ($module == "views" && $api == "views_default") {
    return array("version" => "3.0");
  }
}

If I leave it there and remove _views_api() from .module then the schedule and bof Views say they are missing a handler for the page style. What's up with that?

oadaeh’s picture

For anyone following this, my post in comment #33 (#1150334-33: Upgrade the cod_session, cod_bof Feature to D7) is still relevant.

From #41:

- cod_session.info lists Panels and Page manager as requirements

There is a reason for that, but I don't remember what it is. It is also that way in COD6. I can research it and let you know, if you want.

- The feature appears overridden. I get a max execution timeout waiting for the Features diff to load (A potential workaround is to commit this patch to a local branch and then do drush fu cod_session and compare the changes.

The Feature wasn't overridden when I created it. This situation may exist because I created the COD Session Feature w/o the other pieces present. I didn't want to get distracted by other potentially unrelated conflicts.

I have a project I'm trying to complete by Monday, but if I have a bit of free time over the weekend, I'll look at this and see if I can resolve the problem.

From #42:

* re-exporting is putting views_api hook in features.inc and not removing from .module

I mentioned this in bullet point three of comment #33 above.

* auto node titles isn't working

What about them isn't working? I did note a problem with them in bullet point six of comment #33 above.

* conflict isn't working

Umm, okay. Sorry, I didn't know about that, but since you have a fix underway, I'll not worry about it.

coltrane’s picture

@oadaeh Indeed, I had forgotten that you had discovered most of those issues and documented. My comment #42 was short cause I was late for something. No worries about the session conflict! This is a large feature and everyone's help is appreciated.

I have the auto node title variable being added when recreating the feature, but upon cod_session installation the timeslot doesn't have it enabled.

You are right that panels and page manager are indeed part of COD 6.x beta 2. Honestly I forget why that was!

oadaeh’s picture

@coltrane: no problem. I just wanted to point out and address the issues, if I could, so people weren't unnecessarily repeating the same steps I already went through. (I did some of that myself while creating this patch.) If I can save people from wasted brain cycles, and instead, have them pick up where I left off and continue forward, then that It is a much better use of time and effort. :^)

coltrane’s picture

Status: Needs work » Needs review
FileSize
314.14 KB

Updated patch for conflict handling.

ezra-g’s picture

Status: Needs review » Needs work

Thanks for pushing this forward, folks!

I spent a bit of time today and plan to spend some more this week helping to drive this towards a commit.

- We're missing the auto node title variable ant_timeslot - This should resolve the lack of automatic node titles for timeslot nodes.

- I got an "Undefined index: und in cod_session_node_validate() (line 457 of .../sites/all/modules/cod_support/cod_session/cod_session.module" when submitting a session that referenced aroom with the field_room_session_capacity field not set. I believe we can resolve that with checking if (!empty(field_room_session_capacity[LANGUAGE_NONE])) or similar.

- In attempting to troubleshoot the style plugin issues mentioned in #44, I learned that the actual code for the BoF style plugins is not in this patch but exists in the Denver 2012 sandbox at #1293870: BoF Scheduling tool.

If it's not a huge task to merge into a single patch, it seems great to include the COD_BoF changes with this patch, since while COD_BOF is a separate feature, it depends intricately on COD_Session (eg with the hook_views_api definition mentioned in #44). However, if that task is huge, I won't hold up committing the progress that's here.

Marking as needs work based on the issues I mentioned in this comment + everyone's testing above (duplicate hook_views_api() definitions).

ezra-g’s picture

Title: Upgrade the cod_session Feature to D7 » Upgrade the cod_session, cod_bof Feature to D7
Status: Needs work » Needs review
FileSize
342.87 KB

Here's a re-roll. After some functional testing I was able to create a simple schedule with 2 sessions and also successfully schedule and unschedule BoF sessions. Automatic node titles are also being assigned for timeslots.

My sense is that this is RTBC enough (and under active enough development by enough folks) to be committed and continue development in further issues. I'll leave this patch here briefly before committing.

Note that to deal with the issues we've been experiencing in this thread with Views/Features weirdness (appearing overridden, handlers being undefined) I filed 2 patches to Features which, until they get committed, you should apply to continue working with COD:

#1460522: Defaults only show "false" for views and others (foofeature.views_default.inc not included)
#1432264: Changes to hook_views_api cause Views plugins to be undefined

Some of the changes since #48:

- Features headscratching, Features patches noted above
- Added Token as a dependency of COD base (This supports auto node titles but we're likely to use it in other places as well)
- Fixed undefined index issues
- Integrated COD BoF work from the Denver team at #1293870: BoF Scheduling tool
- Some drush fu to reduce the chances that future feature exporting won't introduce unrelated changes

ezra-g’s picture

Status: Needs review » Fixed

#50 is committed. http://drupalcode.org/project/cod_support.git/commit/72cc5a8

Ginormous thanks coltrane, sirkitree, rupl, druroot, oadaeh, infiniteluke and everyone who helped push this forward.

With this issue fixed, we've got a more solid base of features to continue building off of.

Thanks :D !!!

Automatically closed -- issue fixed for 2 weeks with no activity.