1
amok200
How do you uninstall a broken module ?
  • 2004/2/26 6:43

  • amok200

  • Just popping in

  • Posts: 68

  • Since: 2004/2/23


Hi,

I tried to install a module (xfsection 1.04) and it didnt install properly - I get "Module File for Not Found!" in the module list, and it's name is blank. Now, when I try to unistall it nothing happens. Actually since I tried to install it twice, I have two of these. Clicking uninstall gives:

http://mysite.com/modules/system/admin.php?fct=modulesadmin&op=uninstall&module=

As you can see the names is an empty string.

How can I remove these entries from the Modules Administration ?

Thanks !

Amok

2
carnuke
Re: How do you uninstall a broken module ?
  • 2004/2/26 9:03

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Hello Ammok,

This is my solution for this, though I should add not an official answer

Assuming the module is correctly written and intended for the XOOPS platform you are using; reinstall the module in the original location (this shold have been the modules directory under your root) restores all the files.

Go to modules administration; UNcheck ACTIVE box against the module.

click "submit" then a again at the confirmation page.

Go back to module administration page.

Now click the red middle icon against the deactivated module.

At the confirmation page, agree to uninstall the module.

Go back to module administration and make sure the module now shows at the bottom of the page. Only now is it safe to physically delete the module scripts from your server.

Richard

3
amok200
Re: How do you uninstall a broken module ?
  • 2004/2/26 15:15

  • amok200

  • Just popping in

  • Posts: 68

  • Since: 2004/2/23


Hi Richard,

Thanks for the reply. I've tried the above steps, unfortunately they did not work. I've discovered my error now.. I was supposed to rename the module folder from xfsection-104-2 to xfsection before uploading it, I suppose module installation doesnt like the dashes or numbers or something.

When I did the above, it installed fine, but now I still have 2 modules with 'blank' name that refuse to uninstall.

Do you know what the database tables and columns are where this data is held ? Perhaps I could remove them manually.

Thanks much,

Amok

4
krayc
Re: How do you uninstall a broken module ?
  • 2004/2/26 15:39

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


Amok, I had the very same problem, with the very same module. Hopefully we will get an answer soon. :)

krc

5
hsalazar
Re: How do you uninstall a broken module ?
  • 2004/2/26 15:59

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


amok200 and krayc:

Since you've already figured the correct way to install the module, let me suggest a way. Since it's a manual process, it's convoluted, but then again, you need your installation to be clean.

Here's my idea. Uninstall the correctly installed module. Then start again the install procedure. But hold your horses in the page where XOOPS tells you everything it does to install the module: you'll see tables created, blocks created, permissions set, templates copied and compiled... Make your list.

Finish installing your correct module, but now you have an imprint of the install process. Go one line at a time undoing what the bad install did. It'll eat some of your time but it'll give you two things in return: a cleaner XOOPS site and of course a fine insight into the relationships that exist within the tables. You'll be amazed, surprised and delighted, I can assure you!

Cheers.

6
amok200
Re: How do you uninstall a broken module ?
  • 2004/2/26 18:40

  • amok200

  • Just popping in

  • Posts: 68

  • Since: 2004/2/23


Hi Horacio,

Im grateful for your response ! Actually I was thinking along the same lines .. I looked thru the table list with phpmyadmin and found xoops_modules which is where I figured the module admin got its list from. I removed the two blank entries, but then was stuck on how to 'clean up' the rest of the entries until I got your mail !

I still need some advice however on how to proceed.. I did as you suggested and got the following:

Quote:
Creating tables...
Table xoops_xfs_article created.
Table xoops_xfs_broken created.
Table xoops_xfs_category created.
Table xoops_xfs_config created.
Data inserted to table xoops_xfs_config.
Table xoops_xfs_files created.
Table xoops_xfs_votedata created.
Module data inserted successfully. Module ID: 30
Adding templates...
Template xfsection_article.html added to the database. (ID: 164)
Template xfsection_article.html compiled.
Template xfsection_topten.html added to the database. (ID: 165)
Template xfsection_topten.html compiled.
Template xfsection_htmlart.html added to the database. (ID: 166)
Template xfsection_htmlart.html compiled.
Adding blocks...
Block XF-Section Article Links added. Block ID: 80
Template xfs_block.artmenu.html added to the database. (ID: 167)
Template xfs_block.artmenu.html compiled.
Block XF-Section Menu added. Block ID: 81
Template xfs_block.menu.html added to the database. (ID: 168)
Template xfs_block.menu.html compiled.
Block XF-Section Topics added. Block ID: 82
Template xfs_block_topics.html added to the database. (ID: 169)
Template xfs_block_topics.html compiled.
Block XF-Section Big Article added. Block ID: 83
Template xfs_block_bigstory.html added to the database. (ID: 170)
Template xfs_block_bigstory.html compiled.
Block XF-Section Top added. Block ID: 84
Template xfs_block_top.html added to the database. (ID: 171)
Template xfs_block_top.html compiled.
Block XF-Section Recent added. Block ID: 85
Template xfs_block_new.html added to the database. (ID: 172)
Template xfs_block_new.html compiled.
Block XF-Section downloads added. Block ID: 86
Template xfs_block_newdown.html added to the database. (ID: 173)
Template xfs_block_newdown.html compiled.
Adding module config data...
Config com_rule added to the database.
Config option added. Name: _CM_COMNOCOM Value: 0
Config option added. Name: _CM_COMAPPROVEALL Value: 1
Config option added. Name: _CM_COMAPPROVEUSER Value: 2
Config option added. Name: _CM_COMAPPROVEADMIN Value: 3
Config com_anonpost added to the database.
Setting group rights...
Added admin access right for Group ID 1
Added user access right for Group ID: 1
Added block access right. Block ID: 84 Group ID: 1
Added block access right. Block ID: 86 Group ID: 1
Added block access right. Block ID: 85 Group ID: 1
Added block access right. Block ID: 83 Group ID: 1
Added block access right. Block ID: 82 Group ID: 1
Added block access right. Block ID: 81 Group ID: 1
Added block access right. Block ID: 80 Group ID: 1
Added user access right for Group ID: 2
Added block access right. Block ID: 84 Group ID: 2
Added block access right. Block ID: 86 Group ID: 2
Added block access right. Block ID: 85 Group ID: 2
Added block access right. Block ID: 83 Group ID: 2
Added block access right. Block ID: 82 Group ID: 2
Added block access right. Block ID: 81 Group ID: 2
Added block access right. Block ID: 80 Group ID: 2

Module XFsection installed successfully.


Which tables or directories do these entries all go into ? I'd like to clean up without reinstalling everything (have lots of things in XOOPS now) so that my installation is clean and secure.

Thanks !!

amok

7
hsalazar
Re: How do you uninstall a broken module ?
  • 2004/2/26 19:23

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


Amok:

Are you ready for a long while of delicate work? Grab a cup of coffee or something that keeps you awake, fire up your XOOPS site, launch phpMyAdmin and goooooo!:

Let's proceed one thing at a time.

1. I don't think you have a problem with tables. You need to drop the following:
+ xoops_xfs_article
+ xoops_xfs_broken
+ xoops_xfs_category
+ xoops_xfs_config (this will also delete the data)
+ xoops_xfs_files
+ xoops_xfs_votedata

2. Then you need to delete the module's id in table xoops_modules. In your example, the module was created with id = 30. You'll need to find (and note down) the IDs for your bad modules.

3. Next, you have templates added to the database and compiled. The compiled ones are written into templates_c so they're easy to delete. The ones written to the database need more work.
a. Open your table xoops_tplfile. There you have references to every template in your XOOPS system. Each template has an ID (first column) and is associated to a module (third column, tpl_module). In your case, I'd erase every line pointing to the xfsection module. But be careful: you need to take note of every tpl_id you erase, because you need to also erase the source for that template.
b. Once you've finished erasing from xoops_tplfile every reference to templates associated to the module xfsection, open your table xoops_tplsource. From there, very carefully, delete every record whose Id you noted down in the previous step.

4. Remember you saved the IDs of your bad modules? Open your table xoops_block_module_link and there you'll see associations between block numbers (block_id) and module numbers (module_id). Look for the records of your bad modules and note down the block_id numbers. Then delete the records.

5. Go now to your table xoops_newblocks. The first column (bid) holds the blocks numbers, so you'll be able to delete those blocks associated to the bad modules, using the block_id numbers you noted down in the previous step. The block templates should by now be deleted (you erased them in step number 3).

6. Now it's time to get rid of the module's configuration data. Open your table xoops_config and there locate every record whose conf_modid corresponds to the bad modules' ids. You'll need to delete all those records, but before doing that, note down their IDs (first column, conf_id). Armed with those values, open your xoops_configoption table and delete there the records whose value confop_id matches the values of the conf_id you just noted.

7. Time to take care of permissions. Look for the records whose gperm_modid matches the IDs of the bad modules. You'll see a lot of values, because you have permissions for each group, both at the module and the block level (you can identify the blocks looking at the gperm_itemid value. Once you delete all the records for gperm_modid, you'll be done.

Whew! That was complicated, right? It's hard to do it by hand, and it should give each one of us reasons enough to have more respect for the developers of this excellent piece of software, because all this is usually hidden from us so we just have to worry about using the software.

Cheers.

8
amok200
Re: How do you uninstall a broken module ?
  • 2004/2/26 23:17

  • amok200

  • Just popping in

  • Posts: 68

  • Since: 2004/2/23


Wowsers !

Thanks ! Everything looks clean now. I really appreciate your time and help - I really feel like I have learned a lot about XOOPS from all of this, and feel much better about using it.

I have two lessons I learned from this experience to pass onto the XOOPS new users like myself

1) Read all installation instructions carefully (twice) !
2) Don't be afraid to ask questions because you can find really helpful decent folks here !

Cheers again hsalazar,

Amok

Login

Who's Online

424 user(s) are online (306 user(s) are browsing Support Forums)


Members: 0


Guests: 424


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits