Deleted facebook_connect from phpmyadmin

How do I reinstall this module? The reason I deleted it was it was not showing up under admin for me to add the api key after reinstalling D7. Under the modules page, the error it gave me was that it could not "drop" facebook_connect from mysql so I "dropped" (deleted it) manually. Facebook_connect is listed as modules not installed but I can not reinstall it.

How do you reinstall a deleted module?

Thanks!

Quote · 5 Jan 2010

ROFLMAO... This is a good one that I'm positive we're gonna see more of.

 

Let me help ya out here with it.  You need to find what you deleted accidentally, this can be done by looking at the sql files in your install package.

 

Now FBConnect does not install with the base dolphin, it comes later.  So this is where it gets a little fun, but not impossible for you.

 

If you look at your D7 Install package that should still be zipped on your laptop/desktop system you'll find everything you need.

 

You can just go to:

 

modules/boonex/facebook_connect/install/sql/install.sql and open it with your text editor.  You'll see the following:

 

 


 

 

    --
    -- Dumping data for table `sys_objects_auths`
    --

    INSERT INTO
        `sys_objects_auths`
    (`Title`, `Link`)
        VALUES
    ('_bx_facebook', 'modules/?r=facebook_connect/login_form');

    --
    -- `sys_alerts_handlers` ;
    --

    INSERT INTO
        `sys_alerts_handlers`
    SET
        `name`  = 'bx_facebook_connect',
        `class` = 'BxFaceBookConnectAlerts',
        `file`  = 'modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php';

    SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers`  WHERE `name`  =  'bx_facebook_connect');
 
    --
    -- `sys_alerts` ;
    --

    INSERT INTO
        `sys_alerts`
    SET
        `unit`       = 'profile',
        `action`     = 'logout',
        `handler_id` = @iHandlerId;

    INSERT INTO
        `sys_alerts`
    SET
        `unit`       = 'profile',
        `action`     = 'send_mail',
        `handler_id` = @iHandlerId;

    ALTER TABLE `Profiles` ADD `FacebookProfile` INT(10) NOT NULL ;

    --
    -- `sys_options_cats` ;
    --

    SET @iMaxOrder = (SELECT `menu_order` + 1 FROM `sys_options_cats` ORDER BY `menu_order` DESC LIMIT 1);
    INSERT INTO `sys_options_cats` (`name`, `menu_order`) VALUES ('Facebook connect', @iMaxOrder);
    SET @iKategId = (SELECT LAST_INSERT_ID());

    --
    -- Dumping data for table `sys_options`;
    --

    INSERT INTO
        `sys_options`
    SET
        `Name` = 'bx_facebook_connect_api_key',
        `kateg` = @iKategId,
        `desc`  = 'Facebook api key',
        `Type`  = 'digit',
        `VALUE` = '',
        `order_in_kateg` = 1;

    INSERT INTO
        `sys_options`
    SET
        `Name` = 'bx_facebook_connect_secret_key',
        `kateg` = @iKategId,
        `desc`  = 'Facebook secret key',
        `Type`  = 'digit',
        `VALUE` = '',
        `order_in_kateg` = 2;

    --
    -- `sys_menu_admin`;
    --

    INSERT INTO
        `sys_menu_admin`
    SET
        `name`           = 'Facebook connect',
        `title`          = '_bx_facebook',
        `url`            = '{siteUrl}modules/?r=facebook_connect/administration/',
        `description`    = 'Managing the \'facebook connect\' settings',
        `icon`           = 'modules/boonex/facebook_connect/|facebook-icon_little.png',
        `parent_id`      = 2;

    --
    -- permalink
    --

    INSERT INTO
        `sys_permalinks`
    SET
        `standard`  = 'modules/?r=facebook_connect/',
        `permalink` = 'm/facebook_connect/',
        `check`     = 'bx_facebook_connect_permalinks';
       
    --
    -- settings
    --

    INSERT INTO
        `sys_options`
    (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`)
        VALUES
    ('bx_facebook_connect_permalinks', 'on', 26, 'Enable friendly permalinks in facebook connect', 'checkbox', '', '', '0', '');

    UPDATE `sys_profile_fields` SET `Max` = 500 WHERE `Name` = 'NickName' LIMIT 1;

 


Just look at it and pull the part you deleted out and run that section as an SQL Query in your phpMyAdmin Screen.  It'll go right back in for you.

 

If your not sure which one, you can always go into your admin panel and uninstall the module and then re-install the full thing.  If it's not showing up there then run this url after your logged in as admin:

 

yoursite.com/modules/boonex/facebook_connect/install/sql/uninstall.sql and that will dump the entire module and then you can run the following sql to put it back.

 

yoursite.com/modules/boonex/facebook_connect/install/sql/install.sql

 

That will re-install it for you again.

 

 

 

 

 

 

 

 

 

 

Quote · 5 Jan 2010

ROFLMAO... This is a good one that I'm positive we're gonna see more of.

Let me help ya out here with it.  You need to find what you deleted accidentally, this can be done by looking at the sql files in your install package.

Now FBConnect does not install with the base dolphin, it comes later.  So this is where it gets a little fun, but not impossible for you.

If you look at your D7 Install package that should still be zipped on your laptop/desktop system you'll find everything you need.

You can just go to:

modules/boonex/facebook_connect/install/sql/install.sql and open it with your text editor.  You'll see the following:


--
-- Dumping data for table `sys_objects_auths`
--

INSERT INTO
`sys_objects_auths`
(`Title`, `Link`)
VALUES
('_bx_facebook', 'modules/?r=facebook_connect/login_form');

--
-- `sys_alerts_handlers` ;
--

INSERT INTO
`sys_alerts_handlers`
SET
`name`  = 'bx_facebook_connect',
`class` = 'BxFaceBookConnectAlerts',
`file`  = 'modules/boonex/facebook_connect/classes/BxFaceBookConnectAlerts.php';

SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers`  WHERE `name`  =  'bx_facebook_connect');

--
-- `sys_alerts` ;
--

INSERT INTO
`sys_alerts`
SET
`unit`       = 'profile',
`action`     = 'logout',
`handler_id` = @iHandlerId;

INSERT INTO
`sys_alerts`
SET
`unit`       = 'profile',
`action`     = 'send_mail',
`handler_id` = @iHandlerId;

ALTER TABLE `Profiles` ADD `FacebookProfile` INT(10) NOT NULL ;

--
-- `sys_options_cats` ;
--

SET @iMaxOrder = (SELECT `menu_order` + 1 FROM `sys_options_cats` ORDER BY `menu_order` DESC LIMIT 1);
INSERT INTO `sys_options_cats` (`name`, `menu_order`) VALUES ('Facebook connect', @iMaxOrder);
SET @iKategId = (SELECT LAST_INSERT_ID());

--
-- Dumping data for table `sys_options`;
--

INSERT INTO
`sys_options`
SET
`Name` = 'bx_facebook_connect_api_key',
`kateg` = @iKategId,
`desc`  = 'Facebook api key',
`Type`  = 'digit',
`VALUE` = '',
`order_in_kateg` = 1;

INSERT INTO
`sys_options`
SET
`Name` = 'bx_facebook_connect_secret_key',
`kateg` = @iKategId,
`desc`  = 'Facebook secret key',
`Type`  = 'digit',
`VALUE` = '',
`order_in_kateg` = 2;

--
-- `sys_menu_admin`;
--

INSERT INTO
`sys_menu_admin`
SET
`name`           = 'Facebook connect',
`title`          = '_bx_facebook',
`url`            = '{siteUrl}modules/?r=facebook_connect/administration/',
`description`    = 'Managing the \'facebook connect\' settings',
`icon`           = 'modules/boonex/facebook_connect/|facebook-icon_little.png',
`parent_id`      = 2;

--
-- permalink
--

INSERT INTO
`sys_permalinks`
SET
`standard`  = 'modules/?r=facebook_connect/',
`permalink` = 'm/facebook_connect/',
`check`     = 'bx_facebook_connect_permalinks';

--
-- settings
--

INSERT INTO
`sys_options`
(`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`)
VALUES
('bx_facebook_connect_permalinks', 'on', 26, 'Enable friendly permalinks in facebook connect', 'checkbox', '', '', '0', '');

UPDATE `sys_profile_fields` SET `Max` = 500 WHERE `Name` = 'NickName' LIMIT 1;


Just look at it and pull the part you deleted out and run that section as an SQL Query in your phpMyAdmin Screen.  It'll go right back in for you.

If your not sure which one, you can always go into your admin panel and uninstall the module and then re-install the full thing.  If it's not showing up there then run this url after your logged in as admin:

yoursite.com/modules/boonex/facebook_connect/install/sql/uninstall.sql and that will dump the entire module and then you can run the following sql to put it back.

yoursite.com/modules/boonex/facebook_connect/install/sql/install.sql

That will re-install it for you again.

Glad I could liven some ones day up this morning. My good deed has been done for the year ;)

Ok, here's what I did:

1) I removed the entire row from phpmyadmin (thinking this is what dolphin was recommending since it would not uninstall via the admin panel.

2) I ran http://kernbits.com/socialnet/modules/boonex/facebook_connect/install/sql/uninstall.sql which did nothing but download the uninstall.sql file

3) I then ran http://kernbits.com/socialnet/modules/boonex/facebook_connect/install/sql/install.sql which downloaded install.sql

Facebook_connect is showing up as list of modules that is not install but I can not delete and it is showing up on the list of modules in the admin panel (not the installed modules where all the others are located for install/uninstall/delete).

WHen I try to install the module (after it has been downloaded) I get a message stating,"Cannot upload the package".

What should I try now? Do I need to authenticate using FTP to upload the package? I have this and it doesn't make a difference.

Thanks!

Quote · 5 Jan 2010

Run this query:

 

 

Okay, your server should of run those sql's no problem and not just downloaded them, but it did download them so let's do it a different way.

 

Log in to your cPanel and go to phpMyAdmin.  Select your database.

 

Next up, run this sql: 

 

 
    --
    -- Dumping data for table `sys_objects_auths`
    --

    DELETE FROM
        `sys_objects_auths`
    WHERE   
        `Title` = '_bx_facebook';
 
    --
    -- `sys_alerts_handlers` ;
    --

    SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers`  WHERE `name`  =  'bx_facebook_connect');

    DELETE FROM
        `sys_alerts_handlers`
    WHERE
        `id`  = @iHandlerId;

    --
    -- `sys_alerts` ;
    --

    DELETE FROM
        `sys_alerts`
    WHERE
        `handler_id` =  @iHandlerId ;

    ALTER TABLE `Profiles`
        DROP `FacebookProfile`;
   
    --
    -- `sys_menu_admin`;
    --

    DELETE FROM
        `sys_menu_admin`
    WHERE
        `title` = '_bx_facebook';

    --
    -- `sys_options_cats` ;
    --

    SET @iKategId = (SELECT `id` FROM `sys_options_cats` WHERE `name` = 'Facebook connect' LIMIT 1);
    DELETE FROM `sys_options_cats` WHERE `id` = @iKategId;

    --
    -- `sys_options` ;
    --

    DELETE FROM `sys_options` WHERE `kateg` = @iKategId;

    --
    -- permalink
    --

    DELETE FROM
        `sys_permalinks`
    WHERE
        `standard`  = 'modules/?r=facebook_connect/';

    --
    -- settings
    --

    DELETE FROM
        `sys_options`
    WHERE
        `Name` = 'bx_facebook_connect_permalinks'
            AND
        `kateg` = 26;

 

 

 


 

Next up, you should be able to re-install via your admin panel.  I'm assuming that you only deleted part of the FB from your DB tables and not the whole thing.  If you get an error, please report the error back here (the full error) so it can be broken down and we can help you fix it.

 

Quote · 5 Jan 2010

If you deleted the table for FB connect from the sys_modules table then you need to rebuild the table before you can install. All the install does is an Insert into:

 

Your sys_module is still there just missing the following? You might or should be able to run this as a query and insert the info back in. The you should be able to reinstall FB connect. The install for facebook connect does not build tables, it will only insert information required throughout the system database to run the connection. When you try to install its looking for the table below.

 

INSERT INTO `sys_modules` ('Facebook connect', 'Boonex', '1.0.0', '', 'boonex/facebook_connect/', 'facebook_connect', 'BxFaceBookConnect', 'bx_facebook_', '', 1262614540);

Quote · 5 Jan 2010

How do I reinstall this module? The reason I deleted it was it was not showing up under admin for me to add the api key after reinstalling D7. Under the modules page, the error it gave me was that it could not "drop" facebook_connect from mysql so I "dropped" (deleted it) manually. Facebook_connect is listed as modules not installed but I can not reinstall it.

How do you reinstall a deleted module?

Thanks!

Dont bother man because this is the worse MOD ever created. Save yourself time and headaches. RUN form this mod! Seriously.

Quote · 5 Jan 2010

Run this query:

Okay, your server should of run those sql's no problem and not just downloaded them, but it did download them so let's do it a different way.

Log in to your cPanel and go to phpMyAdmin.  Select your database.

Next up, run this sql:


--
-- Dumping data for table `sys_objects_auths`
--

DELETE FROM
`sys_objects_auths`
WHERE   
`Title` = '_bx_facebook';

--
-- `sys_alerts_handlers` ;
--

SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers`  WHERE `name`  =  'bx_facebook_connect');

DELETE FROM
`sys_alerts_handlers`
WHERE
`id`  = @iHandlerId;

--
-- `sys_alerts` ;
--

DELETE FROM
`sys_alerts`
WHERE
`handler_id` =  @iHandlerId ;

ALTER TABLE `Profiles`
DROP `FacebookProfile`;

--
-- `sys_menu_admin`;
--

DELETE FROM
`sys_menu_admin`
WHERE
`title` = '_bx_facebook';

--
-- `sys_options_cats` ;
--

SET @iKategId = (SELECT `id` FROM `sys_options_cats` WHERE `name` = 'Facebook connect' LIMIT 1);
DELETE FROM `sys_options_cats` WHERE `id` = @iKategId;

--
-- `sys_options` ;
--

DELETE FROM `sys_options` WHERE `kateg` = @iKategId;

--
-- permalink
--

DELETE FROM
`sys_permalinks`
WHERE
`standard`  = 'modules/?r=facebook_connect/';

--
-- settings
--

DELETE FROM
`sys_options`
WHERE
`Name` = 'bx_facebook_connect_permalinks'
AND
`kateg` = 26;


Next up, you should be able to re-install via your admin panel.  I'm assuming that you only deleted part of the FB from your DB tables and not the whole thing.  If you get an error, please report the error back here (the full error) so it can be broken down and we can help you fix it.

Thanks for the help but I think I am just going to wipe the install clean and start over. I looked through phpmyadmin and I didn't see anything referencing iHandlerID. I would hate to waste anyone's time when this is a trivial matter to me right now. If it comes up in the future, I will definitely revisit this link. Thanks again!

Quote · 5 Jan 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.