Posted by drumm on May 24, 2012 at 5:21pm
9 followers
| Project: | Drupal.org customizations |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | twardnw |
| Status: | closed (fixed) |
| Issue tags: | Drupal.org D7, porting |
Issue Summary
Motivation
Port this feature from D6 to D7. We need to install several new on drupal.org modules in order to make this happen.
Blockers
This issue is blocked by #1838878: Install References, JCarousel and Entityreference_migration on drupal.org
Dev Site
http://casestudies-drupal_7.redesign.devdrupal.org/
Latest Deployment Steps (for new dev site)
Install and enable #1838878: Install References, JCarousel and Entityreference_migration on drupal.orgdrush emr to update user/node references to entity references
Run code in #1839860: Add hook_update_N to drupalorg.install to fix 'Status' values on Case Study nodes. to updated case study nodes
Update Feature in code (see comment 22)
Comments
#1
tag
#2
@drumm & @tvn, Has this D6 feature settled down enough that we could begin porting it to D7?
#3
https://drupal.org/case-studies is the URL of this feature.
#4
I went ahead and tried to port this to D7. It looks like it is working when I tried to recreate it although I'm missing some elements like the Sector taxonomy and Organization content type. Also run into other issues but I don't think they are related to this feature.
Questions
1. Can I request for a devsite of the case-studies in d6? I just want to check how the Browse by category was created? right now, the categories display duplicate terms in my view. See http://screencast.com/t/6esEuLfH9vsW
2. I'm missing the taxonomy Sector in the d6 version so I created one in my d7 port and I named it "sectors", will that be a problem to other modules?
3. Should I also add the patches for styling the pages? I cannot download the bluecheese theme here http://drupal.org/project/bluecheese
thanks!
#5
hi primerg,
we do not have fitting dev site right now, I will work on getting some space and will let you know as soon as we have a site you can use.
Browse by category is a views display of casestudy nodes which has Taxonomy: Term ID as an argument showing summary, sorted ascending.
I do not think you should provide patches for styling since Bluecheese theme is being ported to D7 as well. However drumm might know better, he will follow up on this issue. Thank you for helping with this!
#6
Here is an initial patch. Still need some work on the sidebar navigation.
Included in this patch is the
- casestudies views with 5 displays
- image styles necessary for the image displays
This patch assumes that:
- there is a taxonomy named "sectors"
- there is a content type "organization". I found this declared in the drupalorg_marketplace, so maybe add it as a dependent? that module is not ported yet.
- the features for menu was remove for the subnavigation. I didn't see that in d6, maybe I it should be added too?
Other open issues with this patch
- the sidebar navigation. I tried to copy the settings in the D6 but not sure if it's only a views version issue.
@tvn, would be great if you can take a look at this patch specially at the sidebar navigation view.
#7
For D6, please take a look at any dev site on the server. As long as you are looking around, it is fine, and won't interfere with other work.
For D7, I started the buildout of a 'cases' dev site. Please hold off on theme work for #1438716: [Meta] Port bluecheese to Drupal 7.
#8
For D6 it's better to take a look at http://reviews-drupal.redesign.devdrupal.org/ since it's a new one and has the latest version of case studies feature.
D7 dev site url: http://cases-drupal_7.redesign.devdrupal.org/
#9
[BUMP] @primerg, how's it going on this one?
This is now fairly critical, but not marking it as such because if we don't have Case Studies fully functional on D7 by Wednesday, October 24th, we'll just have to switch off this functionality for launch and add it back in later down the road.
#10
Attached is case studies view upgraded to D7 by techgirlgeek, moving from here: https://drupal.org/node/1831706#comment-6691058
#11
Assigning to @drumm for a review and commush of #10 at your leisure.
#12
Since this has been waiting for organization nodes, the feature in #6 no longer applies. Without the content type, the view doesn't import well. We need a fresh export of the entire feature.
#13
Ok, so far, we need to install JCarousel and references on d.o D7. I realize that we are moving to Entity References instead of the References module, but BTMash has written a migrate module for References. It does only do D7 References to D7 Entity Reference though. So we have to install the D7 version of References to migrate the data over. Once these modules are installed, we can use CCK's Content Migrate module to migrate the References fields over to D7, then the entityreference_migrate module to get them into Entity Reference.
#14
opened issue to have modules installed
#1838878: Install References, JCarousel and Entityreference_migration on drupal.org
#15
Next issue I'm running into:
the field 'status' has 3 values:
CommunityFeatured
Hidden
but the D7 Field API needs it to be:
0|Community1|Featured
2|Hidden
So currently, in the database, it shows:
select * from field_data_field_status limit 10;+-------------+--------+---------+-----------+-------------+----------+-------+--------------------+
| entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_status_value |
+-------------+--------+---------+-----------+-------------+----------+-------+--------------------+
| node | | 0 | 1495516 | 2218672 | und | 0 | Community |
| node | | 0 | 1496692 | 2062436 | und | 0 | Community |
| node | | 0 | 1496948 | 2075856 | und | 0 | Community |
| node | | 0 | 1496954 | 2192986 | und | 0 | Community |
| node | | 0 | 1497006 | 2062460 | und | 0 | Community |
| node | | 0 | 1497036 | 2066404 | und | 0 | Community |
| node | | 0 | 1497052 | 2066322 | und | 0 | Community |
| node | | 0 | 1497122 | 1969504 | und | 0 | Community |
| node | | 0 | 1497168 | 2066352 | und | 0 | Community |
| node | | 0 | 1497196 | 2066342 | und | 0 | Community |
+-------------+--------+---------+-----------+-------------+----------+-------+--------------------+
What we need is :
select * from field_data_field_status where entity_id = 1834716;+-------------+-----------+---------+-----------+-------------+----------+-------+--------------------+
| entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_status_value |
+-------------+-----------+---------+-----------+-------------+----------+-------+--------------------+
| node | casestudy | 0 | 1834716 | 3887674 | und | 0 | 0 |
+-------------+-----------+---------+-----------+-------------+----------+-------+--------------------+
I propose that we update the feature in D6, so that the appropriate key|value pairs are set up, so that a custom script is not needed to set these values in the database. I will open a related issue for that update.
#16
Well, unfortunately not going to be able to solve this in the D6 feature. I am going to be writing a script to tackle this.
#17
Since there are only a small number of Case Study nodes (~300), I am going to tackle this in similar fashion to my update for the Organization nodes using a hook_update_N and node_load each of the Case Study nodes, then save the appropriate value for Satus.
#18
#1839860: Add hook_update_N to drupalorg.install to fix 'Status' values on Case Study nodes.
#19
If #1351880: List widgets without keys not reflected in field_data_* and field_revision_* tables gets put into Content Migrate the issues/patch in #18 will no longer be needed.
#20
On a tip from jhodgdon and tvn, they pointed out there was some code in drupalorg and drupalorg_crosssite that may need to be updated. Good news there, just need to uncomment the code in drupalorg.module, no changes (that I can see) needed for drupalorg_crosssite. I have created a separate issue for that patch.
#1841056: update drupalorg.module for Case Studies.
#21
OK, here's the patch. Thanks to Tyler for LOTS of guidance...
#22
That patch doesn't apply. We've rebuilt the feature, but I have noticed some great inconsistency with the node counts on terms in the sidebar navigation. It has something to do with the contextual filter for the 'Status' field. Without this code
if (arg(0) == 'case-studies') {if (arg(1) != '') { return arg(1); }
else { return 'Featured'; }
}
the view results in an output of in D7
Once that code is included in the contextual filters, the view for the sidebar does not display.
In D6, the node counts are

I am up against a knowledge barrier here, Shaun and I have poked at this in many different ways, but are unable to understand why our output is so far off from expected.
#23
Let's wait for a rebuild with the updates from #1839860: Add hook_update_N to drupalorg.install to fix 'Status' values on Case Study nodes. so we know we have clean status values. In the meantime, have a clean export of the feature?
#24
Thanks to some help from dawehner, the view has been sorted out. Attached is the entire updated feature. For some reason Features wants to include all of the taxonomies in this though. It's not defining any terms, just the vocabs.
I do want to wait for a newer database snapshot\build to test this out before adding to the repo.
#25
Ok, with the changes that happened in the latest DB snapshot, here is an updated copy of the feature
Also need #1841056-3: update drupalorg.module for Case Studies. commited
#26
http://casestudies-drupal_7.redesign.devdrupal.org/admin/structure/types... was migrated from D6 because of some leftover crufty data. I removed that data on production. The field was causing a dependency on all vocabularies, which we do not want.
This field can be deleted on the dev site, and the feature re-exported with trimmed down dependencies.
#27
removed field, re-export of feature.
#28
Committed, but with removing drupalorg_case_studies.features.content.inc, drupalorg_case_studies.features.fieldgroup.inc, and drupalorg_case_studies.view_default_inc.bak, which I think are leftover from D6. (Features can have custom code too, which is exports along with the generated code.)
#29
Automatically closed -- issue fixed for 2 weeks with no activity.