Hi = keep trying to get this working, it's a great idea. it seems to work fine with rules, just can't get my content types to unlink. may have something to do with the conditional fields being present. in any case it broke the site pretty bad = content type and fields were deleted entirely and i reinstalled from a different backup...

Comments

perelman.yuval’s picture

hi alibama, the content types unlink process is complex, and it is not supported right now.
i will try to add this functionly as soon has posible.

alibama’s picture

hey, thanks for the heads up, let's get a running list of what works and what breaks - as when it breaks it can be kinda nasty. conceptually though this is what features has needed all along, definitely look forward to seeing it further along. am going to test against feeds, feed tampers and several views later today, i'll let you know how it goes. if we know something is going to not work is there a hook that might warn the user?

perelman.yuval’s picture

hi
right now we only support views ,rules and boxes.
we can add the other elements (menus,cck etc...)
but i need to know there is a real need for it.
if your php is good maybe we can add them together.

alibama’s picture

perelman.yuval = Ha! I'm going to do you and the drupal community a (big) favor and not code a module for at least the next several months while I get my head around the drupal coding standards. seriously. I appreciate the complexity of unlinking content types as it stands to run in to all sorts of issues - probably along the line of issues that were tackled here http://drupal.org/project/role_export - essentially addressing issues that are inherent in features and drupal to begin with. From what I gather that is what makes it a bear - there's no globally unique ID for a lot of values and thus references get messed up? i'm not much of a d7 user, however it's my understanding that some of this is addressed there? if so i think it makes a good case for - "hey, it's time you upgrade" however if the same issues are in d7 then i would say it is still a compelling project in d6.

while it may be a bit before i get under the hood it's a very interesting conversation that you've started. Features Tools in a sense tests drupal's compatibility in the best senses - ie if it can go in to a feature that's a good sign in my book, and if it can come out on the other end as an unlinked feature that's a new gold standard in modular design = thanks again.

vcrkid’s picture

I've found the easiest way to pull a content type out of a Feature is the use the content type import/export function. However, it may take some trial and error to get it down right. I hope that's helpful!

jasonawant’s picture

@vcrkid,

Can you elaborate on your technique to export/import a content type to "unlink" it from a Feature? Was this before or after there was content associated with a content type?

Thanks, Jason.

vcrkid’s picture

@c4jwant

Hi Jason,

It was a few months ago now since I did this and it was part of a larger project to upgrade my drupal installation from 6 to 7 (I took many approaches, one of which was to disable Features... I ended up abandoning the project, but more because D7 doesn't really have a good Content Profile equivalent, in my opinion).

To answer your question: Using a CCK module called Content Copy, you can import/export content types http://drupal.org/node/322675

So, I believe I clicked "Export" in the content type admin section, copied the code and pasted it into a text doc, then got rid of the Feature sub-module in question (i.e., the "feature") and then re-imported the content type (I had to do a little tweaking here and there, but it worked). I believe the data was safe in the SQL database and untouched by the whole process. So, it seemed to work.

I'm not sure if that's exactly it, so be wary (remember to back up the code and the database!), let us know if you try it out and if it works.

jasonawant’s picture

Hi,

Thanks for responding. I figured as much and attempted to do just that. However, it didn't work as I completed it. Your tweaking her and there is probably what I'm missing.

From my observations, I imagine the I need to make the following changes to the code before importing.

from
'module' => 'features',
to
'module' => 'node',

However, my team here used another approach. Leaving our Features enabled, we updated Drupal core. Before using CCK's content_migrate module, we're executing an installation script in a custom module.

This installation script updates the node_type table as follows. This worked for us. Thanks again, Jason.

function custom_module_update_7000() {
  // Make node types available again
  $fields = array(
      'base' => 'node_content',
      'custom' => '1',
      'modified' => '1',
      'disabled' => '0',
      'locked' => '0',
  );
  db_update('node_type')
  ->fields($fields)
  ->condition('module', array('features'), 'IN')
  ->execute();
}
farald’s picture

Please state under 'unlink files' on the front page which items it supports (views, rules and boxes).
Might save somebody else some hours, and inspire people to write new patches :)

In my case, things halted with ftools at unlinking fieldgroups :)

roynilanjan’s picture

Version: 6.x-1.x-dev » 7.x-1.5

Hi,

Unlink page is blank after removing component(default node-view of page-manager) after safe auto create...
Can you please tell me what are components are supports on that particular functionality??? seems to me a bug...

perelman.yuval’s picture

hi, the unlink feature is working right now only with views, rules and boxes modules.
If there is a real need to add support to other modules it can be done.
I really need help becuase i am short in time.
If oyu want to help me it will be nice.

roynilanjan’s picture

Ok then let me go-through the existing code & let u know if anything problem to me!
yes it's better if it's support at-least for page-manager/panel

perelman.yuval’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Hi all.
We now have panels + mini panels unlink support.
@see https://drupal.org/node/2108323