I had to go today from stable to dev version of the module - mainly because of Features integration provided by #578442: "File path" is not kept across an export/import.
I was able to export the filefield_paths settings to the feature via the Features UI, but I was unable to revert the filefield_paths settings from the feature on the integration server (using Drush).
$ drush fd feature_content
Component: info
features[content][] = "timeline_event-field_timeline_event_image"
features[ctools][] = "strongarm:strongarm:1"
< features[filefield_paths][] = "page-field_page_attachments"
< features[filefield_paths][] = "page-field_page_image"
< features[filefield_paths][] = "project-field_project_attachments"
< features[filefield_paths][] = "project-field_project_image"
< features[filefield_paths][] = "project-field_project_image_gallery"
< features[filefield_paths][] = "publication-field_publication_attachments"
features[imagecache][] = "page_header"
features[imagecache][] = "page_link"
Component: dependencies
'8' => 'emvideo',
'9' => 'features',
< '10' => 'filefield_paths',
'11' => 'imagecache',
'12' => 'media_youtube',
$ drush fr feature_content
Current state already matches defaults, aborting. [ok]
WTF? When running features-revert with the --force option I got following:
$ drush fr --force feature_content
Do you really want to revert content? (y/n): y
Reverted content.
Do you really want to revert imagecache? (y/n): y
Reverted imagecache. [ok]
...
After the content should go the filefield_paths component, but it is missing...
First I though it is because hook_features_api isn't in the main module file, since features_includes() didn't return the filefield_paths module in the list. However placing the features_api to the main module body changes anything... But I got it... patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1185918-1_features_api_not_found.patch | 493 bytes | wojtha |
#1 | 1185918-1_features_api_not_found.patch | 493 bytes | wojtha |
Comments
Comment #1
wojtha CreditAttribution: wojtha commentedEdit: seems that the patch file wasn't attached
Comment #2
wojtha CreditAttribution: wojtha commentedI tested if the filefields_paths is recognised by the features and the module system with the following code:
I got the error (filefield_paths was missing in the module_implements('features_api') listing) until I ran following code (which could be found e.g. in features_includes():
module_implements('features_api', FALSE, TRUE);
I tried to search further to answer the question why this line fixed the issue, since the module_implements() function doesn't change anything in the database itself, but I don't know to be honest... probably later some other function stores something in the cache.
I placed the function to the update hook, but on my sites I ran the code directly using the Devel, so the patch is untested and needs further evaluation.
Comment #3
wojtha CreditAttribution: wojtha commentedComment #4
Deciphered CreditAttribution: Deciphered commentedNo longer supporting Drupal 6 issues for this module.