1

I'm currently in the process of transferring channel entry data from an EEv1 site into a fresh new EEv2 site. My method is to populate XML files with channel data and then, using Importer (or DataGrab), pop the channel data into the waiting channels on the new site.

The problem I'm running into is that as you'd expect, custom fields being used on the old site aren't really what I'd like to use on the new. So the example that's giving me a headache is the following;

Currently Ngen File field being used to handle images/documents on the old site and I'd like to be able to import these images into an Assets field on the new site.

Can anyone give me some steps or advice on how I would achieve this.

In my Exported XML file I have the following

<images>

 <matrix_cell_1>{filedir_1}BREEAM-CTA_1.jpg</matrix_cell_1>
 <matrix_cell_2><![CDATA[no-borders]]></matrix_cell_2>

</images>

It has brought the image path through. This image path (images/uploads/page-images) has been recreated exactly on the new site. But how can I go about taking what is essentially a text string (/images/uploads/page-images/BREEAM-CTA_1.jpg) and convert it into a functioning Assets field image.

I appreciate that it cannot be as easy as importing that image path directly into an Assets Field. I assume a few extra steps have to be taken in order to have Assets recognize that imported field string.

Thank you for any advice/answers

  • Have you creasted a file upload directory at images/uploads/page-images and then syncronized it with the EE file manager followed by indexing it with Assets? – CreateSean Feb 25 '14 at 16:47
  • I'm pretty sure I have. That directory exists on both sites as an exact copy of one another. All the images have been copied across to the new site. I have then created the necessary file upload locations in the CP and updated indexes in Assets. The images thumbnails are displaying in the correct folders in Assets. Its just importing the XML channel data, the image field on the new site remains blank, regardless of whether its set as an Assets field or standard File field (NOT Ngen File) – Adam Feb 25 '14 at 16:53
  • what does the database tell you? – Steven Grant Feb 25 '14 at 20:44
  • well...I've come to a conclusion somewhat that the way to go maybe to import the images into a standard File field, once that's done, change the field type to Assets for a seamless crossover. The only issue is that the images are not being imported at all. I have changed my XML file so that rather than the written image path, its now using {filedir_1}. If I add an image manually into the entry, the database recognises this as {filedir_1}image_name.jpg. But I cannot seem to import this same format via the XML file. The database shows nothing for the imported entries that have images. – Adam Feb 25 '14 at 21:24
1

OK...progress, enough progress to be able to post an answer anyway. Turns out using Datagrab rather than Importer seemed to do the trick. Why that would make any difference whatsoever is beyond me as they're both great EE plugins. I'm open to suggestions on that one

So, in a nutshell, I created the Image field in the new site using File as its field type. I then imported the XML file using {filedir_x}, with x being the file upload destination of choice, instead of a relative path to the image. This then populated the image in the File field.

Its then just a case of changing the field type of the image from File to Assets and the image will remain.

Its kind of a relief to know my only mistake, on the surface, was using the wrong module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.