I used emimport with Drupal 5.2 without problems. Today, I try to use it on 5.3 but there's no way to show the content type in admin/content/emfield/import and, consequently, in /emimport. I checked all the right import checkbox in admin/content/types/foto/fields/FIELDNAME and in emfield/import, but something going wrong. I try to disable and re-enable the module and uncheck and check again any related checkbox, but the issue persists.

CommentFileSizeAuthor
#2 emfield_force_pass.patch757 byteschirale

Comments

chirale’s picture

  • New Content type + New Field = Works
  • Old Content type + New Field = Not Works
  • New Content type + Old Field = Works

I try this in different sites onto two multisite installation, two different servers and 5.2 / 5.3 Drupal codebase, but all results are still maddening.

Trying to force $types['image_ncck']['TYPE_ID']['FIELD_ID'] = TRUE; in
emfield.module make the content type visible in the list, permits parsing, but when it imports set it returns a "Cannot access empty property [...] on line 532".

Any idea of what going wrong? There's a method to restore normal module functions without removing the content type or the field?

chirale’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new757 bytes

Brutally solved putting in emfield.module the following lines:

             if ($field_types[$field['type']]['module'] == $module) {
               // settings per content type per module
               $types[$module][$content_type][$field_type] = $field;
+		if(($content_type = "foto") && ($field_type = "field_foto") &&  ($module = "image_ncck")){
+			$store_the_field = $field;
+
+		}
             }
           }
         }
       }
     }
   }
-
+# BRUTE FORCE PASS
+  $types['image_ncck']['foto']['field_foto'] = $store_the_field;
   cache_set('emfield_implement_types', 'cache', serialize($types), CACHE_PERMANENT);
   return $types;
 }

Where:

  • $content_type = "foto"
  • $field_type = "field_foto"
  • $module = "image_ncck"

Before do that, I set also the widget_settings field on node_field_instance to a:0:{} to reset to default the widget settings.

Since the "autodetection" fails for some old fields, before detection is repaired an override function should be implemented.

The import module is great but now is also not well documented, and I found the code quite obscure (but perhaps this is a fault of mine). Please take care of this issue and try to solve it.

aaron’s picture

Assigned: Unassigned » aaron
Status: Postponed (maintainer needs more info) » Needs work
alex ua’s picture

Status: Needs work » Closed (fixed)

Emimport is deprecated in favor of Feeds or FeedAPI. Closing.