The module attempts to call exportables_sync_names('input_formats') when it's enabled but this is currently broken, causing the existing input_formats to not get synced until the next change is made to the input formats. This is a problem because other modules that attempt to use exportables won't see the existing formats. In particular it breaks WYSIWYG when the features patch is applied.
The issue is in the call to "drupal_write_record" in "exportables_machine_save". According to http://api.drupal.org/api/function/drupal_write_record calls to drupal_write_record fail in module enable hooks because it can't find the table in the schema yet.
Calling drupal_get_schema(NULL,TRUE) before the call to exportables_sync_names fixes the problem, but may not be the best solution.
I'm attaching a patch that adds the drupal_get_schema.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 955290-exportables-enable-input_formats-6.patch | 435 bytes | igor.ro |
| #5 | 0011-955290-Exportables-doesn-t-sync-input_formats-on-ena.patch | 709 bytes | pol |
| #2 | exportables_955290.patch | 571 bytes | drewish |
| fix_enable_sync.patch | 598 bytes | medlefsen |
Comments
Comment #1
dagmarComment #2
drewish commentedI think putting hook_enable() inside the .module file is a bad idea because most developers will expect it to be in .install but won't move it in this patch. Re-rolling to add a space after the comma to follow the coding standards.
I won't mark my own patch as RTBC but it fixed the error I was encountering:
Comment #3
drewish commentedMarked #834888: Enableing modules with exportable hooks/ drupal_write_record as a duplicate.
Comment #4
scottrigbyseems to do the trick
Comment #5
polNew patch to get it working with drush make and Jenkins.
Comment #6
igor.ro commentedHello.
I think we have this problem because of cycle dependence between input_formats and exportables http://drupal.org/node/1426950
We need to move sync to enable for module input_formats. And everything will be fine.
Here is the patch
Comment #7
dagmar#5 and #6 are two different patches.
Comment #8
igor.ro commentedI do not get how you will use patch #5, because use have to disable exportables module first,
but it is required by input_formats module.
does I miss something?