I have been using Drupal Commerce for a few months now, but wanted to see if there was any functionality that I was doing the hard way (bulk product creation vs commerce feeds import) so I installed Commerce Kickstart on a separate domain that was blank to start, but I am intending on using.

I noticed that the modules for this installation are located in profiles/commerce_kickstart/modules/ and would like to know how updates to these modules should be handled. Can I safely move the modules to the sites/all/modules folder? Is the Commerce Kickstart profile needed after the initial install? The reason that I am asking this is because I would like to update Drupal from 7.4 to the 7.7 version that just released. Is this profile intended just for demonstration purposes? Would I be better off deleting it and doing a fresh install of Drupal 7.7 after I have seen the intended functionality of Drupal Commerce?

Thanks,
bbjay

Comments

capnjav’s picture

I am uncertain as to best-case.

But I followed these simple steps and it worked:

1. Place site in maintenance mode.
2. Deleted all drupal files EXCEPT '/profiles/' AND '/sites/' AND their sub directories.
3. Uploaded all files from the drupal 7.7 install EXCEPT '/profiles/' AND '/sites/' AND their sub directories.
4. Ran upgrade.php at example.com/upgrade.php

Note: Backup your database and files prior to doing this.

artatac’s picture

I think related I ran the standard upgrade and it wanted to upgrade ctools > I got the following error message
- ctools cannot be in both places!
Warning: require_once(D:\xampp\htdocs\commerce03/profiles/commerce_kickstart/modules/ctools/includes/export-ui.inc) [function.require-once]: failed to open stream: No such file or directory in ctools_plugin_get_function() (line 787 of D:\xampp\htdocs\commerce03\sites\all\modules\ctools\includes\plugins.inc).

capnjav’s picture

Did you manually upload ctools to your sites/all/modules/ or did this occur via upgrade?

artatac’s picture

Via upgrade

bbjay’s picture

Thanks,
I successfully followed the steps from #2 by capnjav, but I am wondering if I will be able to move the modules from the profiles/commerce_kickstart/modules/ctools directory to the standard sites/all/modules directory. Will Drupal complain that it is not able to find ctools if it is in sites/all/modules instead of where it was originally installed at in the profiles directory? Will Drupal automatically discover that the same module is now located at the sites/all/modules location?
Thanks,
bbjay

capnjav’s picture

@artatac, having only basic working knowledge of installation profiles, this is only a guess. AND I'm going to assume you had already backed up your files/database...

Try deleting the older ctools in your 'modules' folder in 'profiles/commerce_kickstart/'

--------------------
@bbjay, I am wondering the same thing myself - and I think it shouldn't complain. Only way to find out is to backup and try moving it. Depending on @aratac's results, it should shed some light on this also.

rszrama’s picture

Status: Active » Fixed

I'll try to shed a little light here, but I think this may generally be an unexplored issue w/ Drupal distributions. The modules end up in your profiles directory because that's where the Drupal packaging script puts them. This directory is perfectly fine for you to keep any module related to the installation profile, so there's really no reason to ever move them from this directory unless you want to for organizational purposes.

As was mentioned above, if you do move them to the usual sites/all/modules location, be sure that you delete the corresponding folder from your profiles directory. Drupal's system table keeps a filepath to the various modules installed on your site, and it will only maintain that associate with a single version of the module if for some reason you have the same module in multiple valid modules directories. For this reason also you should clear your cache when you move the modules, allowing the system table to update with the new filepaths.

So really you have a choice - you can keep the Kickstart modules in the profiles directory and just remember that they need to be updated there or you can move them all into sites/all/modules with whatever other modules you install. Unless you're doing a multisite install, you don't need to use the Kickstart profile again after installation (this was asked above).

At Commerce Guys we typically put everything under sites/all/modules and use two subfolders to separate custom and contrib modules. Another valid approach I've used is to use sites/all/modules for contrib and sites/default/modules for custom. At the end of the day, it's whatever works best for you.

The one thing you don't need to do is re-download Commerce Kickstart every time a new version gets released. Once you've installed Drupal using Kickstart, you will maintain your Drupal installation and any modules as if you had built the site from scratch.

bbjay’s picture

Thanks @rszrama!
That helps a lot to clarify how to manage a profile installation. I wanted to make sure that after installation, everything could be moved and managed once again like a regular Drupal install.
Thanks for all of the work on DrupalCommerce,
bbjay

Status: Fixed » Closed (fixed)

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

bbjay’s picture

I know this issue has been closed, but I wanted to give this information to anyone reading it, to help them before they break the site.
Yes, you can move the modules from profiles/commerce_kickstart/modules to sites/all/modules, but be careful when moving ctools. You should move your other modules first, clear the cache, and then move ctools. IMPORTANT! Before you move ctools, you should navigate to you admin/config/development/performance page, so that once you move the folder, you can push the clear caches button since navigation will be practically impossible without drupal knowing where your ctools folder is located. Until the cache is cleared, the lack of ctools could break your site to an error. This step is important even if you have the administration menu toolbar installed and usually clear your cache from there, because the way the admin menu toolbar clears caches is different from the way they are cleared from the actual admin page. It seems to utilize ctools somewhere and you will get a white screen error if you try to clear your cache from there without ctools in its expected location.

tonydearaujo’s picture

Issue tags: +sites, +upgrading issues, +duplicate modules, +profiles, +commerce kickstart

Allow me to add a note since I have just updated Views which is included in the Commerce Kickstart package. After replacing the views folder with the new one, I looked at my installed list of Modules and I was glad the commerce related modules were in the profiles folder since they are so many and I can safely distinguish between commerce related modules versus all the other modules installed by me at one time or another. Having two separate folders ( profiles and sites ), seems to be a good idea.

lionsharz’s picture

Further to #11 I would also advise caution in deciding to move these modules. Also the instructions in #10 worked for me but only *some of the time*

I attempted to move the modules from the profile folder as bbjay described above. Locally that went well however it broke my site completely once I migrated it. Also over two or three sites I have experienced a difficulty in reversing the process. It proved impossible in the case of ctools and entity modules. I had to revert my whole db.

Originally I wanted my modules folder back but after a wasted afternoon I would tend towards leaving well enough alone and just update/upgrade mods from inside the profile folder