Closed (fixed)
Project:
Conference Organizing Distribution Support Modules
Version:
7.x-1.x-dev
Component:
cod_session
Priority:
Major
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
7 May 2011 at 19:43 UTC
Updated:
4 Jan 2014 at 00:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
druroot commentedComment #2
mariagwyn commentedsubscribing. will patch and test, though I can't really code. sorry.
Comment #3
paulgemini commentedsubscribing
Comment #4
sirkitree commentedStarted 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.
Comment #5
sirkitree commentedOne 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
Comment #6
sirkitree commentedIt 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.
Comment #7
sirkitree commentedIn 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)
Comment #8
sirkitree commentedHere is the first attempt at upgrading this. I was able to get pretty far. This currently includes:
Still todo:
Comment #9
sirkitree commentedLast patch was corrupt somehow. Try this one.
Comment #10
sirkitree commentedone more time
Comment #11
ezra-g commentedI 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
Comment #12
sirkitree commentedHere is a start on upgrading the session view. This is just the "Page: Proposals" display.
Comment #13
coltraneThis patch adds the prepopulation of the first speaker slot to the person creating the session.
Comment #14
ruplThis patch combines sirkitree's Views export from #12 and adds a "Page: Accepted" display to sessions.
Comment #15
ruplUpdated 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.
Comment #16
ruplBuilding on #15, this patch contains the following:
0|Unprocessedto 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.Still lacking permissions!
Comment #17
ruplContinuing 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.
Comment #18
btmash commentedChanging status to 'needs review' so someone remembers to go through it.
Comment #19
btmash commentedack...didn't change it
Comment #20
paulgemini commentedI can enable it after most recent patch! Haven't gotten much past that though
Comment #21
japerryI 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
Comment #22
oadaeh commentedThe 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:
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.
Comment #23
oadaeh commentedSetting to needs work for the usability problem. I don't think the database problem is the fault of this module.
Comment #24
druroot commentedHere'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.
Comment #25
oadaeh commentedI 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.
Comment #26
ezra-g commentedAs long as it depends on items defined in COD Base.
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.
Comment #27
coltrane#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.
Comment #28
oadaeh commentedThis 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:
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.
Comment #29
oadaeh commentedOkay, 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!
Comment #30
coltrane#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
Comment #31
oadaeh commentedThis 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.
Comment #32
oadaeh commentedI 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.
Comment #33
oadaeh commentedI'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):
If I created the feature or the patch incorrectly, let me know and I'll fix it as soon as possible.
Comment #34
oadaeh commentedHmm. 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.
Comment #35
coltraneThere's no view in cod_session. Though there is one in cod_bof. Oversight?
Also, I'm getting
trying to enable cod bof. What versions of features are you using oadaeh?
Comment #36
oadaeh commentedI 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)
Comment #37
oadaeh commentedUpdating status.
Comment #38
infiniteluke commentedPatch 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.
Comment #39
infiniteluke commentedApparently 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.
Comment #40
coltraneThanks oadaeh! I updated the patch for field permissions, prepopulating, markup elements, and the query for unscheduled content.
Comment #41
ezra-g commentedAwesome - 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_sessionand 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!
Comment #42
coltraneNoticing 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.
Comment #43
rupl@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.
Comment #44
coltraneThis is what it's exporting to cod_session.features.inc:
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?
Comment #45
oadaeh commentedFor anyone following this, my post in comment #33 (#1150334-33: Upgrade the cod_session, cod_bof Feature to D7) is still relevant.
From #41:
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 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:
I mentioned this in bullet point three of comment #33 above.
What about them isn't working? I did note a problem with them in bullet point six of comment #33 above.
Umm, okay. Sorry, I didn't know about that, but since you have a fix underway, I'll not worry about it.
Comment #46
coltrane@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!
Comment #47
oadaeh commented@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. :^)
Comment #48
coltraneUpdated patch for conflict handling.
Comment #49
ezra-g commentedThanks 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 i
n the Denver 2012 sandboxat #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).
Comment #50
ezra-g commentedHere'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
Comment #51
ezra-g commented#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 !!!