We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Changing field types - do you lose existing info?

Development and Programming

In Like A Lion's avatar
In Like A Lion
47 posts
16 years ago
In Like A Lion's avatar In Like A Lion

I’m wondering what happens if I’ve been using a plugin for a field type, like an image uploader, for several months and the client has uploaded lots of files, then we find it necessary to change the plugin.

Does all the uploaded info in the DB get lost? As in, if one plugin had fields saving the url to an uploaded picture and I change the field type to a text field, will it print that url string, or will all the info be borked in the DB? And then if I realize the field type change (or plugin change) don’t work as needed or expected, would switching back to the original restore the original functionality.

In my example, I’ve got a hodge-podge of plugins going on that may not be compatible with 1.6.8, or could be handled better with the FieldFrame. If I find out that the existing plugins don’t work under 1.6.8 and have to change what I’m using, I want to know if I’ll be looking at re-uploading all the files used with the old plugin.

Moved to the Extensions forum by Moderator

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

It depends.

For instance:

a:1:{s:9:"file_name";s:14:"chalkboard.jpg";}

One of my image file fields stores this info in it. If I convert it to a textarea or text field, that content won’t be automagically changed to have a link with chalkboard.jpg in it.

In my example, I’ve got a hodge-podge of plugins going on that may not be compatible with 1.6.8, or could be handled better with the FieldFrame. If I find out that the existing plugins don’t work under 1.6.8 and have to change what I’m using, I want to know if I’ll be looking at re-uploading all the files used with the old plugin.

Plugins are strictly front end items. I think you’re comparing apples and oranges.

Could you be more specific?

       
In Like A Lion's avatar
In Like A Lion
47 posts
16 years ago
In Like A Lion's avatar In Like A Lion

Sorry for the sloppy post. I did mean extensions, not plugins. For example, I’m using the Mark Huot File ext for a custom field that the client uses to upload pdf’s and images. However, it doesn’t do exactly what I need for some new functionality (client needs to be able to be able to indefinitely add new upload fields).

When I add a new extension to cover this functionality and switch the custom entry field to use the new extension, will that potentially screw up the months of uploads my client has already made, or is it safe to swap between extensions/custom entry fields?

I realize I’m not explaining this very well, and apologize ahead of time.

       
In Like A Lion's avatar
In Like A Lion
47 posts
16 years ago
In Like A Lion's avatar In Like A Lion

My question is 2 fold:

  1. Philosophically, so I can grasp what is possible/suggested with regard to this in future development (ie understanding best practice).

  2. Practical: I (may) need to transition my File (Mark Huot) extension custom field to being a FieldFrame + nGen File Field custom field.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

Practical solution - ask nGen author. 😊 This is a third party conversation, moving there so the authors can chime in.

       
eyevariety's avatar
eyevariety
158 posts
16 years ago
eyevariety's avatar eyevariety

@inlikealion - I had no trouble converting 1000+ entries in the MH File format to nGen’s field. They made this compatibility in a recent point update.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

Thanks for posting that update, eyevariety. Good to know!

       
In Like A Lion's avatar
In Like A Lion
47 posts
16 years ago
In Like A Lion's avatar In Like A Lion

Thanks, eyevariety for that info. Sue, thanks again for the help and moderation.

So, I still don’t have an answer for the #1. Philosophical question. Should you on principal never change extension types for custom fields with existing entries for fear of losing the data and not being able to switch back to the original extension if the new one doesn’t work out?

       
Ingmar's avatar
Ingmar
29,245 posts
16 years ago
Ingmar's avatar Ingmar

Speaking philosophically as we do, I place a lot of trust in working backups… That said, if you switch the field type to an extension that does not support some features, yes, you’ll probably lose some data.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.