Help - Search - Members - Calendar
Full Version: Customfields Plugin Error
Movable Type Community Forum > Additional Resources > Plugin Development and Usage
danieldyl
I'm running into a problem after creating new datasources under the settings for Custom Fields 2.1b4.

After creating the datasources and hitting Save Changes, I am prompted to upgrade the database. This is the error I get:

Upgrading database...

Upgrading table for CustomAds records...
Upgrading table for CustomAds records...
Error during upgrade: failed to execute statement CREATE TABLE mt_CustomAds_upgrade AS SELECT * FROM mt_CustomAds: Table 'mt_CustomAds_upgrade' already exists at lib/MT/Upgrade.pm line 1855.

CustomAds is the name of the datasource I created. I think my mistake is assigning multiple system objects in the drop-down (Entry, Page and Category) the same CustomAds table name.

I would like to start over and this time not create a new datasource and use the default datasource that CustomFields uses (mt_plugindata table). The problem is I am prompted to always upgrade the database whenever I go to /mt/mt.cgi.

I deleted the plugin and I was able to get into the admin section again. I was also thinking that deleting the plugin would make the upgrade prompt go away. But when I put the CustomFields back in the plugins folder, the problem came back.

I went as far as going into PHPMyAdmin and deleting the CustomAds table but hitting the Begin Upgrade button would always recreate the table.

The same SQL query is being sent and I don't know where from (databases are not my forte).

Thanks for your help.
danieldyl
Ok, I found the fix at the movalog forums:

http://plugins.movalog.com/forums/viewtopic.php?id=731

Essentially, one has to run this SQL command:

CODE
delete from mt_plugindata where plugindata_plugin = 'CustomFields';

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.