3

Upgraded this EE1 site to EE2 (not without issues but managed to get most of them fixed followed this Upgrading an EE1 site to EE2 with nGen File field as a guide but forgot 1 field). I'm stuck with 1 issue regarding 1 ngen file field that I forgot to convert to a text field.

This ngen file field sits inside a matrix field in just 1 entry in 1 channel.

I'm simply trying to delete this channel and its channel field group and recreate it without the ngen file field but I keep getting an error when I try to access the field:

    An Error Was Encountered 
Unable to load requested field type file: ft.ngen_file_field.php. 
Confirm the fieldtype file is located in the expressionengine/third_party/ directory

When I try to delete the field the error is:

A Database Error Occurred Error Number: 1091

Can't DROP 'col_id_15'; check that column/key exists

ALTER TABLE exp_matrix_data DROP col_id_15

Filename: third_party/matrix/ft.matrix.php

Line Number: 1544

Any suggestions on how to tackle this?

1

That SQL code

UPDATE exp_channel_data
SET field_id_XX = CONCAT('{filedir_YY}', field_id_XX)
WHERE field_id_XX != ''
AND field_id_XX NOT LIKE '{filedir_%' 

should work but there may be instances also where you need to manually go into the exp_ff_fieldtypes table and change the nGen instance to 'file' and the same thing for exp_channel_fields

| improve this answer | |
  • was unable to get anywhere with the sql statement, but by manually changing the offending matrix fieldtype to text I was able to access it in the control panel and delete the field group and channel. Like I said it was just 1 entry in that 1 channel - starting from scratch isn't a big deal. Thanks Steven! – erwinheiser Jan 18 '13 at 11:22
2

I had exactly the same issue you had except I hadn't converted any of my fields first, I just totally spaced them. It is a little hard to be sure what you have and haven't tried, especially browsing from my phone, but I believe the SQL query here did the trick for me. Pasting it here for your convenience:

UPDATE exp_channel_data
SET field_id_XX = CONCAT('{filedir_YY}', field_id_XX)
WHERE field_id_XX != ''
AND field_id_XX NOT LIKE '{filedir_%' 

Make sure you backup your database before you do anything like this!

| improve this answer | |

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.