Closed (fixed)
Project:
Fusion
Version:
7.x-2.0-alpha1
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
18 Oct 2011 at 14:30 UTC
Updated:
3 May 2012 at 16:29 UTC
Would someone from Top Notch be able to provide a general road map to migrate a site from Fusion 7.x-1.x/Skinr to 7.x-2.x/Accelerator?
Comments
Comment #1
sheena_d commentedWe are currently working on documentation for making the switch from Skinr to Fusion Accelerator, We'll post an update here once it's ready.
The only changes that would need to be made to a sub-theme between 7.x-1.x and 7.x-2.x have to do with Skin definitions. Basically, the syntax for creating a Skin is the same as in Skinr 7.x-2.x, but you just replace every instance of "skinr" with "fusion_apply"
For example, in Fusion 7.x-1.x a skin was defined like this:
and in Fusion 7.x-2.x, the syntax is thus:
Almost exactly the same, just the function name has changed.
Also, in the theme's .info file, for Fusion 7.x-1.x there are the following lines of code:
and they need to be changed to:
Let us know if you run into any snags, it will help us write better documentation.
Thanks,
Sheena
Comment #2
esmerel commentedCurrently dependent on #1313768: 500 error after git clone and enable - Hoping to get in with aquariumtap this weekend at BADCamp and see if we can straighten out the problem there.
Comment #3
mshepherd commentedSo @sheena_d - it's essentially swapping some function names from skinr to fusion(_apply)? I guess little has changed in the theme templates?
I'm going to have a try at this now. I'll post back any probs / findings.
Comment #4
mshepherd commentedHere's the process I used:
And the result? Aside from having forgotten the few classed I'd set from within skinr, the site seems to be 99% OK. I'll get those classes added in again and hopefully all will be back to normal.
Comment #5
mshepherd commentedI've now added the various classes back into my skins (using the Edit Skin context link) and we're fully back in action. I guess it took around 15 minutes in total.
Comment #6
sheena_d commentedmshepherd,
Thanks for reviewing the upgrade process, that's really helpful!
Yes, there is pretty much no change from Fusion 7.x-1.0 to 7.x-2.0 except for the namespace change with Skin definitions. 2.0 is just sort of a stopgap to account for not using Skinr anymore. Lots of new functionality will be going into the Fusion Accelerator module in the future and if/when we do substantial updates to Fusion Core, we will issue a 3.0 version.
Thanks again!
Sheena
Comment #7
mshepherd commentedThanks Sheena and you're welcome.
I can't wait to see where F&FA go! Always available for testing :)
Comment #8
esmerel commentedDone.
http://fusiondrupalthemes.com/support/theme-developers/upgrading-subthem...
Comment #10
arski commentedYou might want to add that one should export the data from the skinr_rules and skinr_skins tables before uninstalling skinr and then import the data again into the fusion_apply_rules and fusion_apply_skinr tables.
"Make a note of any important block skins" - is simply not serious/professional.
Comment #11
sheena_d commentedarski,
Our documentation cannot assume that the Skinr and Fusion Apply database schemas are exactly the same and will remain exactly the same forever. The only way to 100% ensure that Skinr skin settings will be duplicated in Fusion Apply skin settings is to manually migrate those settings.
Comment #12
arski commentedthat's just lovely for people who have hundreds of Skinr settings.
Besides, at the moment the schemas are still the same, so you could at least write that "for people using skinr up to version x.x, you can copy paste the database tables to keep your settings" - don't see any harm in that.
Comment #13
sheena_d commentedPutting those directions into our documentation would necessitate that we support that approach to migrating Skin settings. While it's a perfectly easy and acceptable approach for users who are familiar with manipulating databases, most of our users do not have those advanced skills and would require a great deal of resources to support if/when they have problems migrating pieces of a database. Users who do have the more advanced skills necessary to easily execute this approach will come to the solution on their own.
Comment #14
arski commentedsure, but isn't the point of providing proper hook_update's on schema changes exactly that - so that the less advanced users would be able to upgrade the modules without having to manually mess around with the db. I agree that you'll probably experience quite a few support requests, but then provide at least a temporary update path with limited time support..
Anyway, I've migrated my stuff already, just finding this extremely annoying that such a huge switch needs to be done manually and that the old version is marked as "not supported" (which caused my client wanting to upgrade in the first place from a working skinr-based system.. duh)
Comment #15
cedeweyIf anyone can provide more specific directions on how to migrate the Skinr data to Fusion Apply I would be eternally grateful (and would be willing to write up some documentation for others going through the same thing). I tried both exporting the Skinr configuration and then importing it into Fusion Apply through the UI, as well as simply copying the skinr_rules and skinr_skins tables over to the fusion_apply tables, but neither worked.
I have a feeling there's some syntax issues I need to clear up with these files, but I'm pretty new to all of this so any guidance would be great. Again, I would love to contribute back with some documentation once I get this going.
Comment #16
cedeweyOK, I figured it out and here is the documentation (as promised) I used to make it happen.
Upgrading Fusion 7.x-1.x themes to Fusion 7.x-2.x
If you have already started using Fusion 1.x for Drupal 7, and want to update your themes to Fusion 2.x, the process is fairly straight forward. The major change is the conversion from 1.x use of Skinr to Fusion Accelerator. If you have already begun using skins with Skinr, you should not see anything surprising in the changes here. This is a basic step-through of the changes you’ll need to make.
1. Set default theme to Bartik
2. Backup current Fusion 1.x theme if you're using a subtheme.
3. Follow normal update procedures for Fusion (deleted the old, place the new).
4. Install and enable Fusion Apply (and Fusion Apply UI)
5. Migrate skins from Skinr to Fusion Apply
5a. Copy data from skinr_rules table to fusion_apply_rules table
INSERT INTO fusion_apply_rules SELECT * FROM skinr_rules;5b. Copy data from skinr_skins table to fusion_apply_skins table
INSERT INTO fusion_apply_skins SELECT * FROM skinr_skins;6. Update function names associated with your skins
These functions will be located in any .inc files you created for your sub-theme (ideally located in sites/all/themes/your-sub-theme/skins
The only thing you need to change would be the function name, everything else is good to go.
So, for example you would only change the first line of the code below-
function fusion_core_skinr_skin_core_info()to-
function fusion_core_fusion_apply_skin_core_info()Your new code would then be
Make sure you've done this for all functions in your .inc file(s).
7. Update your theme's .info file
In your .info file, changed the following code:
update that to:
8. Flush caches to refresh the theme list.
9. Set the default theme back to your Fusion (sub)theme.
10. If everything looks good, go ahead and disable, uninstall, and remove the Skinr module.
Congratulations! You are now leveraging the power of Fusion 2.x and Fusion Apply. oh yeah.
Comment #17
cedeweyOops! Didn't mean to change the issue name.