Images Disappeared After Table Name Changes

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 28, 2011   (RSS)

Re: [newmediachoice] Images Disappeared After Table Name Changes

By Damon - April 28, 2011

Hi,

This happens because the uploads table stores the tables name and uses this to make sure certain records only appear in certain sections.

There are a couple of solutions to this.

Easy solution: You can change the section's label without changing it's actual table name. This would keep all of your upload record where they are. Change the actual table name back to what it was previously and update the templates and everything will work

Technical solution: If you absolutely need to change the name of the table, you can run an SQL query to change all the upload records with the old name to the new name.

EXAMPLE
UPDATE cms_uploads SET tableName = 'NEW NAME' WHERE tableName = 'OLD NAME'

NOTE: Only attempt this if you are comfortable with MySQL. It is important to ALWAYS backup your database before attempting executing queries like this.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] Images Disappeared After Table Name Changes

Hi Damon

Many thanks for your help. I took the easy route as it wasn't entirely necessary to change the table names - I was just trying to be neat :).