abetts Posted November 10, 2022 Share Posted November 10, 2022 I'm trying to remove the CVH Country Fields plugin as it appears to no longer be support but when I click on uninstall I get this... SELECT * FROM `esp_cms_database_fields` AS `cms_database_fields` WHERE field_type='CountryFieldCvh' IPS\Db\Exception: Table 'dzxlgzyz_tlf.esp_cms_database_fields' doesn't exist (1146) #0 /home/dzxlgzyz/public_html/forums/system/Db/Select.php(388): IPS\_Db->preparedQuery('/*dzxlgzyz_tlf:...', Array, true) #1 /home/dzxlgzyz/public_html/forums/system/Db/Select.php(446): IPS\Db\_Select->runQuery() #2 /home/dzxlgzyz/public_html/forums/plugins/cvhcountryfield/uninstall.php(18): IPS\Db\_Select->rewind() #3 /home/dzxlgzyz/public_html/forums/system/Plugin/Plugin.php(592): require_once('/home/dzxlgzyz/...') #4 /home/dzxlgzyz/public_html/forums/system/Node/Controller.php(1333): IPS\_Plugin->delete() #5 /home/dzxlgzyz/public_html/forums/system/Dispatcher/Controller.php(107): IPS\Node\_Controller->delete() #6 /home/dzxlgzyz/public_html/forums/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #7 /home/dzxlgzyz/public_html/forums/applications/core/modules/admin/applications/plugins.php(48): IPS\Node\_Controller->execute() #8 /home/dzxlgzyz/public_html/forums/system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\applications\_plugins->execute() #9 /home/dzxlgzyz/public_html/forums/admin/index.php(13): IPS\_Dispatcher->run() #10 {main} Is there a workaround please? TIA 🙂 Link to comment Share on other sites More sharing options...
Marc Posted November 10, 2022 Share Posted November 10, 2022 You would need to contact the author of that item to ask the question there. We are unable to assist with the removal of 3rd party items unfortunately Link to comment Share on other sites More sharing options...
abetts Posted November 10, 2022 Author Share Posted November 10, 2022 The author has disappeared. I'd be glad for any assistance from the community on here. Link to comment Share on other sites More sharing options...
DawPi Posted November 10, 2022 Share Posted November 10, 2022 1 hour ago, abetts said: esp_cms_database_fields Do you have that table in the SQL? Link to comment Share on other sites More sharing options...
abetts Posted November 10, 2022 Author Share Posted November 10, 2022 (edited) Nope, no idea why not (perhaps a failed uninstall already?!) Edited November 10, 2022 by abetts Link to comment Share on other sites More sharing options...
Nathan Explosion Posted November 10, 2022 Share Posted November 10, 2022 Was it a plugin which added functionality to Pages? Have you previously used Pages, but have since uninstalled it? Link to comment Share on other sites More sharing options...
abetts Posted November 10, 2022 Author Share Posted November 10, 2022 Don't think so but I've been using IPB for about 18 years so could have tried it at some point? Link to comment Share on other sites More sharing options...
Daniel F Posted November 10, 2022 Share Posted November 10, 2022 I guess the CMS table is hardcoded in the uninstall file. Could you post its content here? If you're not sure about the path => /home/dzxlgzyz/public_html/forums/plugins/cvhcountryfield/uninstall.php Link to comment Share on other sites More sharing options...
abetts Posted November 10, 2022 Author Share Posted November 10, 2022 Thanks for the help folks. Here it is... <?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } if ( !defined( 'CVH_COUNTRYFIELD_DONT_DELETE' ) or !CVH_COUNTRYFIELD_DONT_DELETE ) { foreach ( \IPS\Db::i()->select( '*', 'core_pfields_data', array( 'pf_type=?', 'CountryFieldCvh' ) ) AS $countryField ) { $field = \IPS\core\ProfileFields\Field::load( $countryField[ 'pf_id' ] ); $field->delete(); } foreach ( \IPS\Db::i()->select( '*', 'cms_database_fields', array( 'field_type=?', 'CountryFieldCvh' ) ) AS $countryField ) { $field = \IPS\cms\Fields::load( $countryField[ 'field_id' ], $countryField[ 'field_database_id' ] ); $field->delete(); } } Link to comment Share on other sites More sharing options...
Daniel F Posted November 10, 2022 Share Posted November 10, 2022 Yea, just remove this part: foreach ( \IPS\Db::i()->select( '*', 'cms_database_fields', array( 'field_type=?', 'CountryFieldCvh' ) ) AS $countryField ) { $field = \IPS\cms\Fields::load( $countryField[ 'field_id' ], $countryField[ 'field_database_id' ] ); $field->delete(); } then it should work 🙂 abetts 1 Link to comment Share on other sites More sharing options...
abetts Posted November 10, 2022 Author Share Posted November 10, 2022 Perfect, worked a treat. Thank you very much 👍 Link to comment Share on other sites More sharing options...
Daniel F Posted November 10, 2022 Share Posted November 10, 2022 abetts 1 Link to comment Share on other sites More sharing options...
Recommended Posts