[importexport] how to get rid of a module

dracula

Joined: 2005-10-14
Posts: 61
Posted: Thu, 2006-03-23 21:49

Quite a while ago I installed the importexport module. now since I don't need it anymore at it's not under development I want to get rid of this module.
But this seems to be a complicated task.
I uninstalled it from the modules in the admin page, but still when I add an Item I have the option to use the import.
I then deleted the directory ... the result is that I can't add any Items since it complains about the missing importexport files

Quote:
Error (ERROR_BAD_PATH) : Invalid path: modules/importexport/ItemAddFromBackup.inc

* in modules/core/classes/helpers/GalleryFactoryHelper_simple.class at line 205 (gallerystatus::error)
* in modules/core/classes/helpers/GalleryFactoryHelper_medium.class at line 59 (galleryfactoryhelper_simple::newinstance)
* in modules/core/classes/GalleryCoreApi.class at line 121 (galleryfactoryhelper_medium::newinstancebyid)
* in modules/core/ItemAdd.inc at line 355 (gallerycoreapi::newfactoryinstancebyid)
* in modules/core/ItemAdmin.inc at line 147 (itemaddview::loadtemplate)
* in modules/core/classes/GalleryTheme.class at line 688 (itemadminview::loadtemplate)
* in modules/core/classes/GalleryView.class at line 285 (matrixtheme::loadtemplate)
* in main.php at line 288 (itemadminview::doloadtemplate)
* in main.php at line 88
* in main.php at line 81

I searched the database and found a entry in the g2_FactoryMap, removed it and still have the entry in the add item ( after putting the directory back )
how on earth do I get rid of this module?? I want to upgrade to 2.1 and can't because of this module.
Please help !


Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.4.2-1 apache
Webserver = Apache/1.3.34 (Debian) PHP/4.4.2-1 mod_ssl/2.8.25 OpenSSL/0.9.8a
Database = mysql 4.1.15-Debian_1-log
Toolkits = ArchiveUpload, Exif, ImageMagick, NetPBM, Thumbnail, Gd, Dcraw, Ffmpeg
Operating system = Linux lcx.at 2.4.31-grsec #21 SMP Fri Dec 2 08:49:48 CET 2005 i686
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.1) Gecko/20060214 Camino/1.0

 
dracula

Joined: 2005-10-14
Posts: 61
Posted: Thu, 2006-03-23 22:05

ok kind of solved it ...
don't know quite how but I can guess :)
first remove the entry out of the database ( weird delete statement has been created by phpmyadmin )

Quote:
DELETE FROM `g2_FactoryMap` WHERE CONVERT(`g_classType` USING utf8) = 'ItemAddPlugin' AND CONVERT(`g_className` USING utf8) = 'ItemAddFromBackup' AND CONVERT(`g_implId` USING utf8) = 'ItemAddFromBackup' AND CONVERT(`g_implPath` USING utf8) = 'modules/importexport/ItemAddFromBackup.inc' AND CONVERT(`g_implModuleId` USING utf8) = 'restore' AND CONVERT(`g_hints` USING utf8) = 'N;' AND CONVERT(`g_orderWeight` USING utf8) = '5' LIMIT 1;

then remove the direcotry
from you gallery installation root do:

Quote:
rm -rf g2data/cache/importexport
rm -rf modules/inportexport

go to the support page ( http://foo.bar.com/gallery2/lib/support/ )
remove cache

finish ! finaly !

 
Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Sat, 2006-04-01 03:46

I have the same problem when trying to install Gallery 2.1 from 2.02.2

Quote:
Upgrading the Gallery Core Module

The Gallery Core Module is the heart of the Gallery application. You can upgrade most other modules using the Site Administration interface, but this module must be handled separately in order for the upgrade to go smoothly.
Currently installed 1.0.0.2
New version 1.1.0
Config.php upgrade Required

Your upgrade cannot begin because some of your active modules/themes are incompatible or missing. You must either locate more recent versions of these modules or themes, or revert to your original version of Gallery. No changes have been made so it's safe to revert. If you have many incompatible modules listed below, it's possible that you downloaded a smaller distribution of Gallery than what you originally installed. You can download a larger distribution from the Gallery website.

* Module importexport is incompatible

Download replacement modules from the Gallery website

I tried to delete the entry from database by phpMyAdmin and delete the folder as guided by Dracula, however I cannot do anything with the g2data/cache/importexport, maybe this need cell admin but I do not have the rights. Though I deleted the modules/inportexport, the above warning came again.

Quote:
* Module importexport is missing

Pls help me solve this.

Iced Coffee

Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.4.1
Database = mysql 4.1.13-standard
Toolkits =
Operating system = Linux
Browser = Firefox 1.5

 
dracula

Joined: 2005-10-14
Posts: 61
Posted: Sat, 2006-04-01 09:02

I had some problems to delete it with phpmyadmin so I did it manualy with mysql.
I noticed that one path is wrong ... it should be g2data/cache/modules/importexport
and on one I installation I had to do the mysql delete twice ( don't ask why ... no clue ) Just try it again.

 
Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Mon, 2006-04-03 08:04

I removed the G2.1's file and put back the G2.0.2 files. After upgrading it work again. Then I uninstalled the ImportExport module. Dunno if it is safe for me to install G2.1 or not? Someone advise me on this? Thanks.

Iced Coffee
http://www.myweddinglife.info

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-04-04 16:00

if all your G2.0.x-only modules/themes are uninstalled then 2.1 upgrade should be fine.

 
Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Thu, 2006-04-06 06:45

I followed the instruction by removing entry out of the database with the above querry, then both of the importexport folders in cache and module folders. However, I still have this warning:

Quote:
Your upgrade cannot begin because some of your active modules/themes are incompatible or missing. You must either locate more recent versions of these modules or themes, or revert to your original version of Gallery. No changes have been made so it's safe to revert. If you have many incompatible modules listed below, it's possible that you downloaded a smaller distribution of Gallery than what you originally installed. You can download a larger distribution from the Gallery website.

* Module importexport is missing

What else I can do?

Iced Coffee
http://lanhanh.myweddinglife.info

 
dracula

Joined: 2005-10-14
Posts: 61
Posted: Thu, 2006-04-06 08:12

@mindless: not realy. I had the same problem. Uninstalled it in gallery 2.0 and tried to upgrade. worked actualy but then I couldn't add any Items because there was something left in the database.

@iced coffee: did you look if there isn't anything left in the database from the importexport module?
try to go back to gallery 2.0 and try everything again.
Before starting to upgrade to 2.1 try to add an item an the gallery. If you get an error, or still see the tab "from backup" then it didn't work.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-04-06 17:53

dracula, the importexport module? modules are supposed to remove ALL their data from the DB on uninstall, so if that's the case, it's a bug in that module. (just deactivating a module doesn't remove stuff from db)

 
dracula

Joined: 2005-10-14
Posts: 61
Posted: Thu, 2006-04-06 19:32

yes. the impostexport modules leaves some stuff in the DB and since it's not under development anymore I don't think anyone will fix this bug. It's just bad for people upgrading to G2.1 if the module is installed.
My instrunction helped me to clear the stuff out of the DB so I could install it.

 
Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Fri, 2006-04-07 04:36

So any of you can work out where it remains in the database and tell us how to drop them off the table. Thanks.

Anyway, it worked with one of my G2 (I multi-installed 2 G2 on the same site) that I just uninstall it from G2.0.2 and upgrade to 2.1 I have problem with the other because I forgot to uninstall it. Now if I roll back to G2.0.2 to uninstall this, it will effect the first G2. That's why I want instruction to delete the ImportExport manually from the database.

Thanks.

Iced Coffee
http://www.myweddinglife.info