Jump to content

Featured Replies

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 🙂

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

  • Author

The author has disappeared. I'd be glad for any assistance from the community on here.

1 hour ago, abetts said:

esp_cms_database_fields

Do you have that table in the SQL?

  • Author

Nope, no idea why not (perhaps a failed uninstall already?!) 

Could contain: Page, Text

Edited by abetts

Was it a plugin which added functionality to Pages?

Have you previously used Pages, but have since uninstalled it?

  • Author

Don't think so but I've been using IPB for about 18 years so could have tried it at some point?

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

  • Author

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

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 🙂

  • Author

Perfect, worked a treat. Thank you very much 👍

Recently Browsing 0

  • No registered users viewing this page.