Uninstall fails:

PHP Fatal error: Call to undefined function media_youtube_variable_default() in xxx/sites/all/modules/media_youtube/media_youtube.install on line 19, referer: http://xxx/?q=admin/modules/uninstall/confirm

This error causes uninstall to fail and script to halt forcing a reload of the page to view the site again.

This error happened AFTER uninstalling media: flickr trying to revert to the media 1.x branch for usability. This however cannot be done while unable to uninstall Media: YouTube. However I think uninstalling it first is unrelated as it caused errors with mixed uninstalls first (according to the log) and caused all other uninstalls to fail.

Modules according to drush:

 Package           Name                                             Type    Status    Version           
 Administration    Administration menu (admin_menu)                 Module  Enabled   7.x-3.0-rc1       
 Administration    Administration menu Toolbar style                Module  Disabled  7.x-3.0-rc1       
                   (admin_menu_toolbar)                                                                 
 Chaos tool suite  Chaos tools (ctools)                             Module  Enabled   7.x-1.0-rc1       
 Core              Block (block)                                    Module  Enabled   7.7               
 Core              Book (book)                                      Module  Enabled   7.7               
 Core              Color (color)                                    Module  Enabled   7.7               
 Core              Comment (comment)                                Module  Enabled   7.7               
 Core              Contact (contact)                                Module  Enabled   7.7               
 Core              Contextual links (contextual)                    Module  Enabled   7.7               
 Core              Dashboard (dashboard)                            Module  Enabled   7.7               
 Core              Database logging (dblog)                         Module  Enabled   7.7               
 Core              Field (field)                                    Module  Enabled   7.7               
 Core              Field SQL storage (field_sql_storage)            Module  Enabled   7.7               
 Core              Field UI (field_ui)                              Module  Enabled   7.7               
 Core              File (file)                                      Module  Enabled   7.7               
 Core              Filter (filter)                                  Module  Enabled   7.7               
 Core              Help (help)                                      Module  Enabled   7.7               
 Core              Image (image)                                    Module  Enabled   7.7               
 Core              List (list)                                      Module  Enabled   7.7               
 Core              Menu (menu)                                      Module  Enabled   7.7               
 Core              Node (node)                                      Module  Enabled   7.7               
 Core              Number (number)                                  Module  Enabled   7.7               
 Core              OpenID (openid)                                  Module  Enabled   7.7               
 Core              Options (options)                                Module  Enabled   7.7               
 Core              Overlay (overlay)                                Module  Enabled   7.7               
 Core              Path (path)                                      Module  Enabled   7.7               
 Core              Poll (poll)                                      Module  Enabled   7.7               
 Core              RDF (rdf)                                        Module  Enabled   7.7               
 Core              Search (search)                                  Module  Enabled   7.7               
 Core              Shortcut (shortcut)                              Module  Enabled   7.7               
 Core              System (system)                                  Module  Enabled   7.7               
 Core              Taxonomy (taxonomy)                              Module  Enabled   7.7               
 Core              Text (text)                                      Module  Enabled   7.7               
 Core              Tracker (tracker)                                Module  Enabled   7.7               
 Core              Trigger (trigger)                                Module  Enabled   7.7               
 Core              Update manager (update)                          Module  Enabled   7.7               
 Core              User (user)                                      Module  Enabled   7.7               
 Development       Devel (devel)                                    Module  Enabled   7.x-1.2           
 Media             File Entity (file_entity)                        Module  Disabled  7.x-1.x-dev       
 Media             Media (media)                                    Module  Disabled  7.x-2.0-unstable1 
 Media             Media Internet Sources (media_internet)          Module  Disabled  7.x-2.0-unstable1 
 Media             Media: YouTube (media_youtube)                   Module  Disabled  7.x-1.0-alpha5    
 OpenID Selector   OpenID Selector (openid_selector)                Module  Enabled   7.x-1.x-dev       
 Other             Entity API (entity)                              Module  Enabled   7.x-1.0-beta10    
 Other             Entity tokens (entity_token)                     Module  Enabled   7.x-1.0-beta10    
 Other             Libraries (libraries)                            Module  Enabled   7.x-1.0           
 Other             Token (token)                                    Module  Enabled   7.x-1.0-beta4     
 Rules             Rules (rules)                                    Module  Enabled   7.x-2.0-rc1       
 Rules             Rules UI (rules_admin)                           Module  Enabled   7.x-2.0-rc1       
 Userpoints        Userpoints (userpoints)                          Module  Enabled   7.x-1.0-rc1       
 Userpoints        Userpoints rules integration (userpoints_rules)  Module  Enabled   7.x-1.0-rc1       
 Views             Views (views)                                    Module  Enabled   7.x-3.0-rc1       
 Views             Views UI (views_ui)                              Module  Enabled   7.x-3.0-rc1       
 Core              Bartik (bartik)                                  Theme   Enabled   7.7               
 Core              Garland (garland)                                Theme   Disabled  7.7               
 Core              Seven (seven)                                    Theme   Enabled   7.7               
 Core              Stark (stark)                                    Theme   Disabled  7.7           

Comments

ransom’s picture

Note:
Adding this to the top of media_youtube.install seems to "patch" this problem.

include_once('includes/media_youtube.variables.inc');
aaron’s picture

Status: Active » Closed (duplicate)

this has already been fixed in 7.x-1.x.