Project:Conditional Fields
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've just exported a large content type which had many conditional fields. When I re-imported, all of the conditional relationships had been lost. Would be cool if the conditional relationships could export too.

Comments

#1

Status:active» fixed

The latest version has content_copy compatibility!
Importing and exporting of conditional fields settings should work now!

#2

Title:Conditionality information lost on content type export» Import/export compatibility

Please report here any issues with import/export.

KNOWN LIMITATIONS:
- General Conditional Fields options for individual content types (those found in the tab admin/content/node-type/TYPE_NAME/conditional) are not exported/imported
- The data is not checked: so use with care if you edit manually the exported data.

#3

Cool! That just seems to work when I export the custom content type, right?

Anyway, I'm now putting the feature to use in my other issue, http://drupal.org/node/453204.

#4

Status:fixed» closed (fixed)

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

#5

I cant seem to get this to work when importing fields.

#6

@loze: Could you share your exported data so that I can test? Thanks.

#7

Status:closed (fixed)» active

#8

I've successfully moved conditional fields when manually importing / exporting content-type definitions, however, packaging up a content-type as part of a feature as per the features module doesn't seem to keep conditional field settings.

I'm not sure if this is a conditional fields issue, or a features issue.

Cheers and thanks for the awsome module

Patrick

#9

Title:Import/export compatibility» Features compatibility

Updating to reflect current status: Works when manually exporting / importing node types, but there is no features integration (http://drupal.org/project/features).

#10

subscribe

#11

subscribe

#12

subscribe

#13

Status:active» needs work

Built this rough patch. It's just an approach and needs some work and debugging, but I think it's a good start.

I also tried implementing ctools api, but I thought this was a better approach since no db tables modifications are needed.

Anyway, I think the folloowing issue should be solved to in order to have a complete features integration.
728004: Allow abitrary modules to alter the pipeline

AttachmentSize
conditional_fields-368143.patch 3.49 KB

#14

Version:6.x-1.x-dev» 6.x-2.x-dev

The patch is for 2.x-dev

#15

interested in features compatibility as well, thx for the efforts!

#16

Status:needs work» needs review

I'm testing this. If I find anything wrong I'll add a comment.

#17

Actually, I think that solving issue http://drupal.org/node/784470 should fix features integration.

#18

mani.atico, I tested the latest patch and it did exported correctly. What kind of issue is going on in exportability?

#19

I've been working with patch #13 in a production site for a while and features are exported/imported correctly. Currently I haven't found any bugs either. The hook mentioned in #13 could be implemented to export conditional fields automatically when a node type is exported.

On the other hand, if the module was coded as suggested on the issue referenced on #17, conditional fields would be saved as field settings and no fetures integration code will be needed since data would be managed by cck.

#20

#728004: Allow abitrary modules to alter the pipeline: is now resolved. So we can go ahead and have this auto-appended to content-type exports.

#21

#17 is better in the long run, but it would require a more substantive re-write. #13 should be committed right now, as it gets features integration immediately and does not require any rewrite of anything.

#22

Status:needs review» reviewed & tested by the community

#23

phayes, this issue you mentioned is not resolved yet. And how does it affect the current patch? I can't really understand what you want from here, commit as it is or rewrite so that settings are auto-appended to content-type exports?

#24

The issue is resolved, but is not closed.

@gordon the patch has been committed with a few tweaks
Setting this to needs work so that you can update the integration patches you have above. Feel free to close when you are done.

However, you are correct, this issue does not affect the current patch. The current patch works well, but does not auto-append. I would recommend committing the patch now as is (it's ready, useful, and tested). We can work on the auto-append magic later.

#25

Clear as water now! =)

#26

Status:reviewed & tested by the community» needs work

Whoops. Found a bug. It looks like with multiple feature reverts, conditional field settings don't replace eachother, but start adding up.

See attached image

AttachmentSize
Conditional_Field_error.png 47.97 KB

#27

Status:needs work» fixed

Reviewed, modified export render to user var_export, fixed bug mentioned in #26, and committed. Thanks to all!

#28

Status:fixed» closed (fixed)

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

#29

can someone confirm if this is right:

  • this is only in the dev build, not in beta2
  • to get conditional_fields settings to export in a feature, we have to explicitly export them - add features[conditional_fields][] = "our_content_type_name" to the info file, or some such step - they do not get exported as part of the content type

thanks

#30

Hi, I'm looking for documentation on this as well but am not finding it. I did find, that once I installed the latest dev, cleared my cache, and tried to re-create my feature with the exported content type, that Conditional Fields was now an option in Edit Components dropdown:

This added dependencies[] = "conditional_fields" and features[conditional_fields][] = "article" to my .info file, and a new file called [modulename].features.conditional_fields.inc

#31

Version:6.x-2.x-dev» 7.x-3.x-dev

This is not in 7.x is it?

#32

Version:7.x-3.x-dev» 6.x-2.x-dev

Please do not hijack the thread.

If the version was 6.x, it is not in 7.x

#33

Fine. New issue created at #1191248: Port features compatibility to 7.x-3.x. Maintainer can decide if he wants to close that as a dupe and use this thread instead.

#34

sorry, mstrelan, I mistook your comment. Now I understand it's purpose to reopen the issue for D7 (if you had changed the sate of it would be clearer) =(

#35

hmm just applied the patch which worked fine but now seeing these errors

Error: Cannot redeclare conditional_fields_features_api() (previously declared in
/var/www/sites/all/modules/conditional_fields/conditional_fields.module:1341) in
/var/www/sites/all/modules/conditional_fields/conditional_fields.module, line 1448

Fatal error: Cannot redeclare conditional_fields_features_api() (previously declared in /var/www/sites/all/modules/conditional_fields/conditional_fields.module:1341) in /var/www/sites/all/modules/conditional_fields/conditional_fields.module on line 1448