Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link
  1. Once the content type is created, is it part of the db as if I had created it normally through the UI?
    Yes

  2. Can I safely delete the Feature generated content type code?
    No- See this Q/Athis Q/A for a more complete answer.

  3. Can I manage fields through the UI...
    Yes - once you have the content type set the way you want it, you should regenerate the feature module so that you have an up-to-date representation of your content type in code.

  4. ...or would I have to fiddle with the Feature generated code?
    Definitely no

What's the correct workflow to work with the content type from that point?

First, make sure you have a clean starting point by ensuring that all of your features in all of your environments have the "Default" status (this just means that the loaded database configuration of the Feature matches the configuration defined in code in the Features module).

  1. Make changes to the content type through the UI on dev as you normally would.
  2. Once the content type has been modified to your liking, Recreate the Feature by clicking on the "Recreate button". That will generate a tar file. Extract that file in the same directory as the existing Feature module - overwriting the previous version.
  3. Revisit the Features page on dev. The feature that was previously overridden should now be "default".
  4. Assuming you are using git or subversion or similar, commit the changes to the Feature module and pull them to staging. (If you're not using source control, just FTP the changes to the Staging server).
  5. Visit the Features page on staging. The Feature in question should now have a status of overridden. Click on the "Overridden" link, tick the checkboxes on the resulting page and click "Revert". This will update the database settings to match what is defined in the new Features module. The status of the Feature should now be "Default". (Note: sometimes the Features module automatically pulls in the new settings when you visit the Features page, but honestly, I'm not sure what triggers that or when - perhaps someone can add to that).
  6. If all goes well on staging, repeat the same steps on prod.
  1. Once the content type is created, is it part of the db as if I had created it normally through the UI?
    Yes

  2. Can I safely delete the Feature generated content type code?
    No- See this Q/A for a more complete answer.

  3. Can I manage fields through the UI...
    Yes - once you have the content type set the way you want it, you should regenerate the feature module so that you have an up-to-date representation of your content type in code.

  4. ...or would I have to fiddle with the Feature generated code?
    Definitely no

What's the correct workflow to work with the content type from that point?

First, make sure you have a clean starting point by ensuring that all of your features in all of your environments have the "Default" status (this just means that the loaded database configuration of the Feature matches the configuration defined in code in the Features module).

  1. Make changes to the content type through the UI on dev as you normally would.
  2. Once the content type has been modified to your liking, Recreate the Feature by clicking on the "Recreate button". That will generate a tar file. Extract that file in the same directory as the existing Feature module - overwriting the previous version.
  3. Revisit the Features page on dev. The feature that was previously overridden should now be "default".
  4. Assuming you are using git or subversion or similar, commit the changes to the Feature module and pull them to staging. (If you're not using source control, just FTP the changes to the Staging server).
  5. Visit the Features page on staging. The Feature in question should now have a status of overridden. Click on the "Overridden" link, tick the checkboxes on the resulting page and click "Revert". This will update the database settings to match what is defined in the new Features module. The status of the Feature should now be "Default". (Note: sometimes the Features module automatically pulls in the new settings when you visit the Features page, but honestly, I'm not sure what triggers that or when - perhaps someone can add to that).
  6. If all goes well on staging, repeat the same steps on prod.
  1. Once the content type is created, is it part of the db as if I had created it normally through the UI?
    Yes

  2. Can I safely delete the Feature generated content type code?
    No- See this Q/A for a more complete answer.

  3. Can I manage fields through the UI...
    Yes - once you have the content type set the way you want it, you should regenerate the feature module so that you have an up-to-date representation of your content type in code.

  4. ...or would I have to fiddle with the Feature generated code?
    Definitely no

What's the correct workflow to work with the content type from that point?

First, make sure you have a clean starting point by ensuring that all of your features in all of your environments have the "Default" status (this just means that the loaded database configuration of the Feature matches the configuration defined in code in the Features module).

  1. Make changes to the content type through the UI on dev as you normally would.
  2. Once the content type has been modified to your liking, Recreate the Feature by clicking on the "Recreate button". That will generate a tar file. Extract that file in the same directory as the existing Feature module - overwriting the previous version.
  3. Revisit the Features page on dev. The feature that was previously overridden should now be "default".
  4. Assuming you are using git or subversion or similar, commit the changes to the Feature module and pull them to staging. (If you're not using source control, just FTP the changes to the Staging server).
  5. Visit the Features page on staging. The Feature in question should now have a status of overridden. Click on the "Overridden" link, tick the checkboxes on the resulting page and click "Revert". This will update the database settings to match what is defined in the new Features module. The status of the Feature should now be "Default". (Note: sometimes the Features module automatically pulls in the new settings when you visit the Features page, but honestly, I'm not sure what triggers that or when - perhaps someone can add to that).
  6. If all goes well on staging, repeat the same steps on prod.
deleted 20 characters in body
Source Link
Adam Balsam
  • 3.7k
  • 15
  • 27

It doesn't sound like you have a dev or staging server in your workflow. I would suggest that you create one, but that's a different discussion. For now, once you have tweaked your content type to your liking, you should visit the Features Administration page. One or more features should now be marked as "Overriden". This means that the configuration of the feature (e.g. fields in a content type) have been modified such that they don't reflect how they are defined in the feature-generated code. You have two options now:First, make sure you have a clean starting point by ensuring that all of your features in all of your environments have the "Default" status (this just means that the loaded database configuration of the Feature matches the configuration defined in code in the Features module).

  1. RevertMake changes to the content type through the UI on dev as you normally would.
  2. Once the content type has been modified to your liking, Recreate the Feature by clicking on the "Recreate button". That will generate a tar file. Extract that file in the same directory as the existing Feature module - overwriting the previous version.
  3. Revisit the Features page on dev. The feature that was previously overridden should now be "default".
  4. Assuming you are using git or subversion or similar, commit the changes to the Feature module and pull them to staging. (If you're not using source control, just FTP the changes to the Staging server).
  5. Visit the Features page on staging. The Feature in question should now have a status of overridden. Click on the "Overridden" link, tick the checkboxes on the resulting page and click "Revert". This will update the database settings to match what is defined in the new Features module. The status of the Feature should now be "Default". (Note: sometimes the Features module automatically pulls in the new settings when you visit the Features page, but honestly, I'm not sure what triggers that or when - perhaps someone can add to that).
  6. If all goes well on staging, repeat the same steps on prod.

If you wanted to discard the changes you made through the UI, you would click on "overriden", tick the checkboxes on the next page, and click on the "Revert" button.

If you want to update the definitions in the Feature to reflect the changes you have made in the in UI (this is your case) you would recreate the Feature. To do so, click on the Recreate button. If you didn't add any content type you should be able to leave all of the defaults on this page. You might want to increment the "Version" text field. Click on "Download Feature". This will download a tar file containing the new Feature module. You'll need to upload the extracted contents of that file to the server (normally, that would be part of a CI integration or at least a git commit/pull - but in your case it might just mean FTP-ing the files and replacing the old ones.

Once you're done with that you should revisit the Features admin page. The Feature that was previously marked as "overriden" should now be marked "default".

It doesn't sound like you have a dev or staging server in your workflow. I would suggest that you create one, but that's a different discussion. For now, once you have tweaked your content type to your liking, you should visit the Features Administration page. One or more features should now be marked as "Overriden". This means that the configuration of the feature (e.g. fields in a content type) have been modified such that they don't reflect how they are defined in the feature-generated code. You have two options now:

  1. Revert
  2. Recreate

If you wanted to discard the changes you made through the UI, you would click on "overriden", tick the checkboxes on the next page, and click on the "Revert" button.

If you want to update the definitions in the Feature to reflect the changes you have made in the in UI (this is your case) you would recreate the Feature. To do so, click on the Recreate button. If you didn't add any content type you should be able to leave all of the defaults on this page. You might want to increment the "Version" text field. Click on "Download Feature". This will download a tar file containing the new Feature module. You'll need to upload the extracted contents of that file to the server (normally, that would be part of a CI integration or at least a git commit/pull - but in your case it might just mean FTP-ing the files and replacing the old ones.

Once you're done with that you should revisit the Features admin page. The Feature that was previously marked as "overriden" should now be marked "default".

First, make sure you have a clean starting point by ensuring that all of your features in all of your environments have the "Default" status (this just means that the loaded database configuration of the Feature matches the configuration defined in code in the Features module).

  1. Make changes to the content type through the UI on dev as you normally would.
  2. Once the content type has been modified to your liking, Recreate the Feature by clicking on the "Recreate button". That will generate a tar file. Extract that file in the same directory as the existing Feature module - overwriting the previous version.
  3. Revisit the Features page on dev. The feature that was previously overridden should now be "default".
  4. Assuming you are using git or subversion or similar, commit the changes to the Feature module and pull them to staging. (If you're not using source control, just FTP the changes to the Staging server).
  5. Visit the Features page on staging. The Feature in question should now have a status of overridden. Click on the "Overridden" link, tick the checkboxes on the resulting page and click "Revert". This will update the database settings to match what is defined in the new Features module. The status of the Feature should now be "Default". (Note: sometimes the Features module automatically pulls in the new settings when you visit the Features page, but honestly, I'm not sure what triggers that or when - perhaps someone can add to that).
  6. If all goes well on staging, repeat the same steps on prod.
Source Link
Adam Balsam
  • 3.7k
  • 15
  • 27

  1. Once the content type is created, is it part of the db as if I had created it normally through the UI?
    Yes

  2. Can I safely delete the Feature generated content type code?
    No- See this Q/A for a more complete answer.

  3. Can I manage fields through the UI...
    Yes - once you have the content type set the way you want it, you should regenerate the feature module so that you have an up-to-date representation of your content type in code.

  4. ...or would I have to fiddle with the Feature generated code?
    Definitely no

What's the correct workflow to work with the content type from that point?

It doesn't sound like you have a dev or staging server in your workflow. I would suggest that you create one, but that's a different discussion. For now, once you have tweaked your content type to your liking, you should visit the Features Administration page. One or more features should now be marked as "Overriden". This means that the configuration of the feature (e.g. fields in a content type) have been modified such that they don't reflect how they are defined in the feature-generated code. You have two options now:

  1. Revert
  2. Recreate

If you wanted to discard the changes you made through the UI, you would click on "overriden", tick the checkboxes on the next page, and click on the "Revert" button.

If you want to update the definitions in the Feature to reflect the changes you have made in the in UI (this is your case) you would recreate the Feature. To do so, click on the Recreate button. If you didn't add any content type you should be able to leave all of the defaults on this page. You might want to increment the "Version" text field. Click on "Download Feature". This will download a tar file containing the new Feature module. You'll need to upload the extracted contents of that file to the server (normally, that would be part of a CI integration or at least a git commit/pull - but in your case it might just mean FTP-ing the files and replacing the old ones.

Once you're done with that you should revisit the Features admin page. The Feature that was previously marked as "overriden" should now be marked "default".