Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The biggest issue here is that the core module and the Tags submodule were renamed. However we already renamed most of the submodules in FBSS 6.x-3.x so there is a precedent for how to handle the transition gracefully.
I should note that we may want to consider renaming the other submodules while we're at it. Currently:
- The core module is "statuses"
- The Tags submodule is "statuses_tags"
- The other submodules are "fbss_[name]"
"fbss_" doesn't make much sense given the name change, and "statuses_tags" is inconsistent with that, so it's worth considering a new naming scheme while we can get it all done at once.
Comments
Comment #1
IceCreamYou CreditAttribution: IceCreamYou commentedHere is an initial (untested) patch. Still to do: update Flags, Rules, Mollom, Pathauto, Userpoints, and maybe Services and Views database records that reference "facebook_status" instead of "statuses."
Comment #2
IceCreamYou CreditAttribution: IceCreamYou commented(By the way, I decided it was too much trouble to rename the submodules, especially since their names in code are not user-facing. It will happen one day, but not today.)
Here is an overview of the status of integrations with all modules that FBSS supported.
Expected to be Working, No Remaining Upgrades Needed
User Relationships
Flag Friend
Input filters (core)
SMS Framework
Domain Access
Shorten URLs
Timeago
ImageCache Profile
I have reason to believe that all of these integrations are fully working. Upgrading from D6 to D7 does not require manual steps from the site administrator to upgrade these integrations; additionally, either no automatic upgrade steps are required or these steps are already included in the patch in #1.
Expected to be Working, Manual Upgrade Steps Required
Rules
Views
Pathauto
People will have to recreate any custom Rules and Views or modifications to the default Views as part of the D6 -> D7 transition. There's really not much we can do about this. We only provide one default Rule which is useless and disabled by default, and I recommend that we remove it.
All Pathauto users will need to completely reconfigure their Pathauto settings after upgrading from D6 to D7 because of the changes to Token in D7.
Expected to be Working, Manual Theming Changes May Be Required
User profile (core)
Author Pane
Statuses (itself)
Statuses provides variables to the user profile and author pane theming templates. The names of these variables have changed. Similarly, the names of variables for the statuses-item.tpl.php template have changed, and CSS classes and IDs are different, so CSS and template changes may be required.
No Longer Supported
Activity (#1415020: Activity integration is broken)
Notifications (most likely - #1255280: Document alternative to Notifications integration)
Modal Frame (no D7 version - #1591586: Remove Modalframe integration)
Mentions (no D7 version)
There is no explicit Mentions integration in Statuses.
Partially or Mostly Working, No Remaining Automatic Upgrade Tasks
Devel Generate (#1481764: Devel Integration with Stauses and fbss_comemnts)
Twitter / OAuth (#1469142: share status Twitter error)
Taxonomy (core - #1350292: Tags view doesn't adopt correct vocabulary)
Services
Working, Automatic Upgrade Tasks Remaining
Flag
The "content_type" column in the {flags}, {flag_content}, and {flag_counts} table needs to be updated for the facebook_status -> statuses transition.
Partially Working, Automatic Upgrade Tasks Remaining
Mollom
Userpoints
Mollom correctly judges whether a post is ham or spam, but it does not correctly display a CAPTCHA if it is unsure. Furthermore no entries appear in the {mollom} table for statuses.
In the {mollom} table, the "entity" and "form_id" columns need to be updated for the facebook_status -> statuses transition.
In the {mollom_form} table, the "form_id" column needs to be updated for the facebook_status -> statuses transition.
Even though hook_userpoints() appears to be deprecated (although the nodes and comments integration module is using it) and even though hook_userpoints_info() hasn't been implemented, it appears that Userpoints is more or less working. However even if no changes are required to the integration itself, we need to update the "operation" column of the {userpoints_txn} table during the upgrade process.
Not Working
Quant
The Quant module integrates with Statuses (instead of the other way around) and it hasn't been upgraded to take the name change into account.
Unknown
Context
Views Bulk Operations
Ctools
Heartbeat
Trigger (#1565402: Leftover D6 Trigger integration causes incompatibility with Commerce module)
It might be dangerous to use Context integration; the only place it's used is to change where contexts apply, and done incorrectly this could cause WSODs or other unexpected results. Most likely no one uses it right now, so I would not mind removing it.
Statuses has explicit integration with Views Bulk Operations from D6, but I think that is no longer necessary in D7 and should be removed. Most likely VBO already works with Statuses since it depends primarily on Rules and Views.
Statuses provides a Ctools content type as a convenience for Author Pane. I don't know if it is working, but I think Author Pane doesn't use it in D7 anyway, and it's redundant with the Statuses block. It's also a common source of questions, so we should remove it.
The only direct support that Statuses provides for Heartbeat is 3 lines of JavaScript. As I understand it, Heartbeat takes care of the rest. I have not tried mixing Heartbeat with Statuses, but from what I understand, it should work.
Trigger integration existed mainly to support Activity integration, and it is removed from D8, so we should go ahead and remove it.
Comment #3
IceCreamYou CreditAttribution: IceCreamYou commentedIn summary, these are the tasks extracted from the previous comment that don't already have issues associated with them:
Services integration has problems
Mollom integration has problems
Userpoints integration probably needs some improvements
Integration with Context, VBO, Ctools, and Trigger should be removed
The one default Rule we provide should be removed
VBO integration needs to be tested
Additionally, we should post a patch for the D7 branch of Quant to fix its integration with Statuses.
Finally, in this issue, we need to add upgrades for the Flag, Userpoints, and Mollom modules to the patch in #1.
Comment #4
IceCreamYou CreditAttribution: IceCreamYou commentedThis patch includes upgrades for Flag, Userpoints, and Mollom.
Remaining tasks in this issue include opening issues for the problems discussed in #3 and testing that the attached patch actually works.
Comment #5
mathankumarc CreditAttribution: mathankumarc commentedIts really awesome Isaac. Just now I looked in to the issue queue, its flooding with your comments.
I should take a part on this now. I will test this and will look into other issues too.
IceCreamYou++ (I'm wondering why we dont have this feature in d.o)
Comment #6
mathankumarc CreditAttribution: mathankumarc commentedHere is the updated one.
fbss_userpoints variables needs to renamed, since its not using fbss_[module_name] pattern for variable name. Not yet tested the complete upgrade. Just now I started to setup a another drupal installation for testing this one.
Comment #7
mathankumarc CreditAttribution: mathankumarc commentedHere is the patch for Quant integration. Also created the new issue in Quant issue queue and posted the patch #1616286: Port Facebook-style statuses support.
Comment #8
IceCreamYou CreditAttribution: IceCreamYou commentedGreat. Obviously the hard part of testing this is setting up D6 with all the integrated modules and then once you start the port if something breaks it's hard to just roll back...
I'm really busy this week so if it takes me awhile to respond that's why.
Comment #9
mathankumarc CreditAttribution: mathankumarc commentedJust now did fresh upgrade from 6.x to 7.x.
facebook_status table was not renamed to statuses. Both facebook_status and statuses tables are present. While upgrading we will remove the facebook_status folder and add the statuses folder, I think we are missing something here(or Am I missing anything.)
I think submodules are got updated.
P.S. first enable the statuses module then enable the submodules one by one, please do not enable all the modules in one shot.(May be the above problem caused by this because I enabled the modules in one shot :( )
I forgot to update my themes, However the beauty is D6 garland theme is working with D7. Its really awesome:)
I didn't tried mollom integration. Going to bed, will try to solve this on tomo :)
Comment #10
IceCreamYou CreditAttribution: IceCreamYou commentedThe usual upgrade process is:
I think that most likely Drupal doesn't think it needs to run the new upgrade function for Statuses since as far as it is concerned it is a new module. (Same for Statuses Tags, but the other submodules have the same names, so they should be fine.) We might be able to resolve this simply by renaming the upgrade function to facebook_status_update_7100(). If not, the upgrade process will need to happen during installation.
Other than possible memory limit issues I don't think this should be a problem.
Comment #11
mathankumarc CreditAttribution: mathankumarc commentedYeah thats right. However we will be hit by another problem, i.e. here we are installing the statuses module not re-enabling, so statuses installation will create the statuses table and facebook_status_update_7100() will try to rename the facebook_status table to statuses. The following method will allow us to solve this problem,
1. Install statuses
2. Re-enable or install(statuses_tags sub-module) the submodules (So that statuses schema will have complete information like private field)
3. Run the facebook_status_update_7100()
Here this function should migrate the data in the facebook_status table to statuses table and deletes the facebook_status table rather than renaming the facebook_status table
But the problem with this method is how can we make this process synchronous? i.e. running the update script after the complete installation of statuses and other submodules.
Nope. we will have problem with installation of fbss_privacy submodule. Cause privacy module will try to alter the schema of statuses table, so first we need to install the statuses and then the sub modules one by one.
Upgrade notes also suggests us to enable the modules one by one.
I think the above analysis had covered all the scenarios. @Isaac please share your thoughts on this and if I missed anything add it.
Finally we need to do another process, deleting the entry for facebook_status and facebook_status_tags module in system table once the upgradation is done.
Comment #12
IceCreamYou CreditAttribution: IceCreamYou commentedCopying the data could take an unacceptably long time for sites that have millions of statuses. We should consider manually creating the statuses table if needed in the install function. The hook_schema() implementation would have to be renamed, and then the hook_install() implementation would look something like this (pseudocode):
Since the schema is created before the install hook runs, another alternative would be to simply delete the {statuses} table before running the upgrade process if the {facebook_status} table exists. That might be easier although kind of wasteful.
Most likely the upgrade process will need to be called from statuses_install() instead of automatically invoked.
Yes, but it looks like Drupal enables dependencies before dependent modules, so Statuses should always be installed before Statuses Privacy.
This is not strictly necessary, but might as well I suppose.
Comment #13
mathankumarc CreditAttribution: mathankumarc commentedHere is the updated one based on the above points.
Didn't tested this one.
Comment #14
IceCreamYou CreditAttribution: IceCreamYou commentedLooks good to me, just a few minor things:
it's :-)
This is clever; I like it (though I would prefer the function be named _facebook_status_upgrade()). My one concern is whether Drupal will know to drop the schema when Statuses is uninstalled as it may still associate it with FBSS. Not sure what to do about it if so, just one more thing we need to test.
This can probably be just one function, _statuses_schema()
Comment #15
mathankumarc CreditAttribution: mathankumarc commentedWill modify the patch.
Will investigate on this too.
Comment #16
mathankumarc CreditAttribution: mathankumarc commentedBack to actions after two weeks :(
Statuses schema itself will not be available, So it will create more problems for us.
Here is the alternate solution,
Suggestions are welcome :)
Comment #17
IceCreamYou CreditAttribution: IceCreamYou commentedI've been really busy too...
Maybe there is a way to tell Drupal that a schema is actually associated with the new module, by changing it directly?
Thinking about this again, I think it would be okay to just copy the data. It's a simple solution and it really shouldn't take more than 30 seconds even with millions of records on a low-resource machine. The database API doesn't have a way to do that with prepared statements but I believe all the databases Drupal supports have
INSERT INTO {table} SELECT
syntax so it shouldn't be a big deal. At least it will work for the vast majority of sites and save us the headache of doing special schema stuff. I believe this is the route other modules have taken although looking quickly I can't find a good example.Comment #18
IceCreamYou CreditAttribution: IceCreamYou commentedReroll of #6 with suggestion from #17. Basically we move the content from the FBSS tables to Statuses tables and then drop the FBSS schema. Not yet tested although for obvious reasons I'd like to commit this as soon as we can.
Comment #19
IceCreamYou CreditAttribution: IceCreamYou commentedAlso, I addressed the issues brought up in #3:
Drop default rules
Drop Context module integration
Drop CTools integration
Drop VBO integration
Drop Trigger integration
#1263268: Mollom / captcha not visible after wrong input when using AJAX
#1663504: Services integration is broken
#1685442: Userpoints integration uses deprecated API
Comment #20
7twelve CreditAttribution: 7twelve commentedHad a look at the patch in #18 and having the migration does not fire off when placed into a hook_update. However, placing it into another function and calling via hook_install seems to do the trick. Only checked against statuses / statuses_context - but data and settings appear to have come through. Have attached a patch for statuses.install only (against dev)...which brings up another point I came across.
The submodules readme states that it isn't necessary to rename all of the submodules to the statuses naming convention - however when you have both facebook_status and statuses in your modules folder, only the fbss modules are recognized in the module list. This could potentially be quite confusing to end users, as the submodules (other than tag) won't show up until the facebook_status folder is removed. Thoughts?
Comment #21
IceCreamYou CreditAttribution: IceCreamYou commentedThanks for testing.
Hmm. Not sure why that would be, but I guess doing it that way is okay. However the patch you provided doesn't include most of the necessary stuff from #18. I will make an effort to reroll this weekend.
I actually have no problem with this as long as the release notes say that you have to delete the old FBSS folder after upgrading. Normally you would need to do that to upgrade a module anyway.
Comment #22
7twelve CreditAttribution: 7twelve commentedNot quite sure either. Attached the full patch.
Fair enough, I guess my concern was that hiding them until the old module is removed might lead people to unintentionally uninstall the old version before they should (erring on the side of people not reading the docs properly).
Comment #23
IceCreamYou CreditAttribution: IceCreamYou commentedThe patch in #22 still leaves out a lot from #18. The attached patch is #18 with the fix (more or less) from #20. Also attached is an interdiff between this patch and #18 so we can see what changed.
I'm fairly confident in this one. If it looks like this works let's get it committed and push out a beta!
Comment #24
IceCreamYou CreditAttribution: IceCreamYou commentedWhoops, here's a version with some extra comments about why we are using hook_install() and not just a normal hook_update_N().
Comment #25
mathankumarc CreditAttribution: mathankumarc commentedGreat.......
Will review and test this.
We will make a beta release this week :) I will put my efforts for a stable release.
Comment #26
mathankumarc CreditAttribution: mathankumarc commentedWe need to change upgrade of the statuses_tags like statuses
i.e. Installing statuses_tags and moving the data from the old table to new table then uninstalling the old table
Comment #27
IceCreamYou CreditAttribution: IceCreamYou commentedWhoops.
Updated patch attached.
Comment #28
mathankumarc CreditAttribution: mathankumarc commentedHere is the updated one and it contains the fixes for,
Need to delete the entry in the system table for the old modules.
Other than this, its working fine.
Wow! we are gonna have a stable release :)
Comment #29
IceCreamYou CreditAttribution: IceCreamYou commentedI'm assuming the 'machine_name' field was removed from being updated here because that's what was causing the integrity constraint violation? That error would have been due to the unique key on the 'hashtag' column, indicating that there was already a vocabulary with that machine name (normally the one we just added in statuses_tags_install()). That actually exposed a bug: I called the upgrade path after creating the new vocabulary when the upgrade path should have run first. Fixed in the attached patch (along with interdiffs to #27 and #28).
Comment #30
mathankumarc CreditAttribution: mathankumarc commentedFantastic :)
Yeah.
RTBC from my side :)
Still we need to consider deleting the entries for old schema in system table.
Comment #31
IceCreamYou CreditAttribution: IceCreamYou commentedCommitted fix to dev!
I created #1708256: Write release notes for 7.x-1.0-beta1 and once that is finished up we can tag and publish the release. (@mathankumarc, would you like to do the honors?)
Doesn't affect anything; might as well leave it. If we messed something up in the upgrade path I just committed, those system table records would let us know if FBSS had ever been installed previously, which we may need to know in order to fix things.
Comment #32
mathankumarc CreditAttribution: mathankumarc commentedWill do it happily :)
Indeed. Didn't considered this one.