Jump to content

Recommended Posts

Posted

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 🙂

Posted

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

Posted

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

Posted

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();
    }
}

Posted

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 🙂

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...