Fatal error: Call to undefined function xmlsitemap_helper_link_count() in E:\devshop\www\xxxxxx\htdocs\sites\all\modules\xmlsitemap\xmlsitemap\xmlsitemap.module on line 164
Fatal error: Call to undefined function xmlsitemap_helper_link_count() in E:\devshop\www\xxxxxx\htdocs\sites\all\modules\xmlsitemap\xmlsitemap\xmlsitemap.module on line 164
Comments
Comment #1
avpadernoThe function is defined at line 90 of xmlsitemap_helper.module.
Comment #2
webchickYeah, I think I got this the other day, too.
The issue is that if you uninstall the module as you do other modules (check off everything and click "Uninstall"), due to alphabetical sorting, xmlsitemap_helper.module comes before modules like xmlsitemap_node and xmlsitemap_user. Therefore, the module's already uninstalled at the point that these modules are running their hook_uninstall()s.
I believe there's a way to invoke a function call even in disabled modules or, failing that, the correct .inc file or whatever could just be included from the uninstall hooks for extra insurance.
Comment #3
webchickOh, hrm. Except it was in xmlsitemap.module?
Oh, I see. The xmlsitemap_helper module obviously has to be disabled in order to uninstall xmlsitemap, and therefore none of the function calls to it in uninstall hooks will work.
Comment #4
avpadernoThe
xmlsitemap_helper_link_count()function should only be called from the functions that generate the site map content; the error message can be ignored while uninstalling the project modules.I can add some code lines to verify the module is enabled. Would the code help in someway?
Comment #5
Anonymous (not verified) commented@webchick: Yes, you are correct.
@Kiam: This is a complete uninstall. The xmlsitemap_helper module has been deactivated. The hook_uninstall functions require functions from xmlsitemap_helper but Drupal doesn't load them because it has been deactivated. Reactivating the module wouldn't be nice to the user expecting it to have been uninstalled.
Comment #6
avpadernoI checked the code as it is after my last commits, and I don't find any call to functions declared in xmlsitemap_helper.module. The function reported in the error message you wrote is only called from the menu callback for sitemap.xml (or from a function called from that menu callback).
Comment #7
avpadernoI am changing the status, as the uninstall code doesn't call any functions defined in another module.
If I am missing something, please re-open the issue.
Comment #9
Anonymous (not verified) commentedThe uninstall code might not but the sitemap.module does causing the whole uninstall process to just quit. I think that the fix might be as easy as changing the weight of the xmlsitemap_helper module to be
lowerhigher than the rest of the modules so it is uninstalled last; but that is just an assumption.Comment #10
EkaMei commentedIs there anyway to resolves this issue at the moment? Or is this uninstallation issue a 'harmless' bug that I can safely ignore?
Comment #11
Anonymous (not verified) commentedThe workaround I've used is to reinstall the xmlsitemap_helper module, uninstall the modules not uninstalled by this bug and then uninstall xmlsitemap_helper again.
Comment #12
avpadernoI think your assumption is correct; if the module is the last to be uninstalled, the functions it declares will be still be available when the other modules are uninstalled.
Comment #13
avpadernoI added the code to change the module weight to 15. I hope this helps.
Comment #14
avpaderno- Duplicated comment -
Comment #15
EkaMei commentedThis certainly helped. Thank you!
Comment #16
avpadernoI think the issue can be considerate fixed.