Hi,
First off, nice module, I've used this on a good few projects now and my users seem to like it, thanks for all the hard work.
For a project I'm doing at the moment I have a real server on 1&1 and a test server on my PC using WAMP.
I disabled and uninstalled the Ubercart Addresses module (trying the Ubercart Checkout Tweaks module) on the test server and noticed some of my images had stopped working. I tried to edit a node where images had stopped working and got this error:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'tv_node_form' was given in C:\Users\Dave\Documents\Clients\B\Bido Lito\Website\includes\form.inc on line 377.
When I went to the Content types page 7 of 11 content types had been deleted (hence the error)!!
These missing Types include the page and blog node types and some of the ones we've created so not just CCK or System types.
I've disabled and uninstalled the module on the real live server (I should have error checked more but thought this mod would only effect the checkout) and this has not happened (yet) but I'm worried in case it destroys the site on a cron job or cache refresh.
I first posted this here: http://drupal.org/node/365793#comment-5358214
But, I think this could be an issue with Ubercart Addresses and uninstall more that anything.
Any help would be appreciated
Cheers
Dave.
Comments
Comment #1
megachrizThe Ubercart Addresses module does not delete content types. When you uninstall it, the following will be removed from the database:
- the tables "uc_addresses" and "uc_addresses_defaults".
- all variables from the variables table which name starts with "uc_addresses" (for example "uc_addresses_require_address").
Can it be that you moved around module folders? I sometimes have "invalid callback" errors, when I move a module folder. Most of the times the problem is solved when I go to admin/build/modules and flush the menu cache. When you go to the module page, all modules are re-indexed. Flushing the menu cache after that will update the file locations of the menu callbacks.
In some cases the module page can't be reached, and then I manually empty (truncate) all the "cache" tables in the database (tables which name starts with "cache"). In very rare situations this is also not enough and then the best idea is to move the module folder back to the original location (and after that eventually disable or even uninstall the module before moving it).
Why I sometimes move a module folder? If I alter the original module's code, I usually move this module folder from "contrib" to "edited", so I remember the module does not contain the original code.
Anyway, I'm pretty sure this problem is not caused by Ubercart Addresses.
Comment #2
megachrizYeah, I know the Ubercart Addresses module and the Ubercart Checkout Tweaks module don't work well together. I have tried Ubercart Checkout Tweaks myself. Maybe I'm able to solve this incompatibility with Ubercart Addresses 6.x-2.x someday.
Comment #3
dave_______1 commentedHi MegaChriz,
Thanks for the info, but no, I didn't change any of the folder structure, the Addresses module is still in there in the same place too.
I simply went to the modules page, unticked the box next to Ubercart Addresses and saved. Once this was done I clicked the uninstall tab, ticked the box next to the module, clicked the button and clicked again (I was sure I wanted to uninstall).
Once that was all disabled and uninstalled I want through the and tested the checkout process and it all worked fine (the saved addresses from the Tweaks mod had kicked in which was already enabled???) so I decided to uninstall from the Live server.
Once I had done the same on the live server I went beck to the local server and refreshed the home page, that is when I noticed the missing images, next I edited the node with the missing images and found the above error. After a quick check of the site I found over half of the content types where missing!
This was the point I did some searching for the error, wrote a comment (address above) then came here and wrote the above comment.
If you need anything else let me know, it's just really strange.
I've since ran a cron and cleaned the cache on the Live server and fingers crossed it all seems ok.
I have a presentation on it tonight so if its going to go wrong it'll be then :(
Any help would be great
Cheers
Comment #4
freixas commentedI agree with Chris. The odds of uc_addresses deleting your content types is about zero. Take a look at uc_addresses.install.
The fact that you disabled and uninstalled the module on the live server and had no problem also suggests that uc_addresses is not the culprit. There are probably over 2,000 sites using the 6.x-1.0 version. The fact that none of them has reported missing content nodes also indicates that your problem lies elsewhere.
Given the very high likelihood that this is unrelated to uc_addresses, I would suggest that it is your responsibility to provide a series of steps that someone else can follow to reproduce the problem. An alternative would be to look at uc_addresses.install and describe a mechanism whereby the uninstall code would delete content nodes. The only thing I can think of is some sort of cascading delete on an InnoDB type of database, but there is no association between an address and a content type. In any case, uc_addresses doesn't create any cascading delete options—you would have to have added that on your own.
Comment #5
megachrizHm, you probably don't have a backup of your local (test) site before you uninstalled Ubercart Addresses? (My local machine for websites is a Mac with Time Machine enabled, so every hour a new backup is created.) If you have a backup, you could set up a third environment (using that backup), uninstall Ubercart Addresses there and check if you loose the content types again. Or maybe the content types were already gone before you uninstalled Ubercart Addresses.
Maybe it can also be some rare kind of permission issue. Check the node_types table of your test environment. If the types are still there, then it can be some module had restricted the access of your content types. It's a bit far fetched, but it is possible.
About moving module folders: a module folder don't have to be moved or deleted to cause an "invalid callback" error error. If the file permissions are for some reason incorrect it can be that the webserver can't read it. A module folder that can't be read by the webserver has the same effect as if the module folder was deleted. Check if all file permissions for all module folders are correct. You can also chmod 777 the sites/all/modules folder (recursively) to be sure all folders and files can be read by the webserver. Only do this locally! Chmod 777 is a bad idea for a production environment, as you then give everyone with access to the local filesystem read & write permissions.
Comment #6
megachrizThis problem couldn't be reproduced and is probably caused by something else.