fresh copies of media and file-entity modules right from git.when enabling them i get this:

Notice: Undefined index: view media in user_role_grant_permissions() (line 3026 of /var/www/d7/modules/user/user.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => view media [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3028 of /var/www/d7/modules/user/user.module).

If i go back to the modules page i see them as enabled.Field UI works as expected but cant add images to nodes,since after i click the select media button i get requested page not found.

Well it might have to do with the latest commits and you are already aware of this,i m still reporting this :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ParisLiakos’s picture

Its media that causes this.
I retried this time by enabling file entity first,everything worked.but when try to enable media i get this again

tsvenson’s picture

Confirmed, happens for me too using latest git versions.

ParisLiakos’s picture

Status: Active » Needs review
FileSize
377 bytes

Its cause this permission got renamed in file_entity when moved.
we have to change it in media's .install file too.
or maybe move the whole media_install in file_entity,since it should create this types,not media?

tsvenson’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #3 seems to do the trick, the Media module now installs.

However, on line 321 in the media.install, update 7008, there is another permission where second argument is 'view media'. Just wanted to highlight that to make sure it too doesn't need to be changed to 'view file'.

davidseth’s picture

Just tested as well, Patch in #3 works for me.

Dave Reid’s picture

Status: Reviewed & tested by the community » Needs work

Actually it should be file_entity that enables this permission by default, not media. We need to move this logic from media_install to file_entity_install().

ParisLiakos’s picture

@Dave Reid just the permission or the file types creation as well?

ParisLiakos’s picture

Status: Needs work » Fixed

This is fixed now

emptyvoid’s picture

Status: Fixed » Active

Not sure if I should create a new issue or just set the current on to "active".

Environment:
Linux Ubuntu 11
PHP 5.3.2
Mysql 5.0

Fresh build - Drush list

Package               Name                                                               Type    Status         Version        
 Access control        ACL (acl)                                                          Module  Enabled        7.x-1.0-rc1    
 Access control        Content Access (content_access)                                    Module  Enabled        7.x-1.2-beta1  
 Access control        Content Access Rules Integrations (content_access_rules)           Module  Enabled        7.x-1.2-beta1  
 Administration        Administration Development tools (admin_devel)                     Module  Enabled        7.x-3.0-rc1    
 Administration        Administration menu (admin_menu)                                   Module  Enabled        7.x-3.0-rc1    
 Administration        Administration menu Toolbar style (admin_menu_toolbar)             Module  Enabled        7.x-3.0-rc1    
 Administration        Administration views (admin_views)                                 Module  Not installed  7.x-3.0-rc1    
 CCK                   CCK (cck)                                                          Module  Enabled        7.x-2.x-dev    
 CCK                   Content Migrate (content_migrate)                                  Module  Not installed  7.x-2.x-dev    
 CCK                   Multiselect (multiselect)                                          Module  Enabled        7.x-1.8        
 Chaos tool suite      Bulk Export (bulk_export)                                          Module  Enabled        7.x-1.x-dev    
 Chaos tool suite      Chaos tools (ctools)                                               Module  Enabled        7.x-1.x-dev    
 Chaos tool suite      Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)             Module  Not installed  7.x-1.x-dev    
 Chaos tool suite      Chaos Tools (CTools) Plugin Example (ctools_plugin_example)        Module  Not installed  7.x-1.x-dev    
 Chaos tool suite      Custom content panes (ctools_custom_content)                       Module  Not installed  7.x-1.x-dev    
 Chaos tool suite      Custom rulesets (ctools_access_ruleset)                            Module  Not installed  7.x-1.x-dev    
 Chaos tool suite      Page manager (page_manager)                                        Module  Not installed  7.x-1.x-dev    
 Chaos tool suite      Stylizer (stylizer)                                                Module  Not installed  7.x-1.x-dev    
 Chaos tool suite      Views content panes (views_content)                                Module  Not installed  7.x-1.x-dev    
 configuration         Default config (defaultconfig)                                     Module  Enabled        7.x-1.0-alpha2 
 Context               Context (context)                                                  Module  Enabled        7.x-3.0-beta2  
 Context               Context Breadcrumb Current Page (context_breadcrumb_current_page)  Module  Enabled        7.x-1.0-beta2  
 Context               Context Keywords (context_keywords)                                Module  Enabled        7.x-1.0-beta1  
 Context               Context layouts (context_layouts)                                  Module  Enabled        7.x-3.0-beta2  
 Context               Context No Title (context_no_title)                                Module  Enabled        7.x-1.0-beta2  
 Context               Context PHP (contextphp)                                           Module  Enabled        7.x-1.x-dev    
 Context               Context Respect (context_respect)                                  Module  Enabled        7.x-1.0        
 Context               Context SSL (context_ssl)                                          Module  Enabled        7.x-1.0        
 Context               Context UI (context_ui)                                            Module  Enabled        7.x-3.0-beta2  
 Context               Context: Menu Block (context_menu_block)                           Module  Enabled        7.x-3.1-beta2  
 Core                  Aggregator (aggregator)                                            Module  Not installed  7.8            
 Core                  Block (block)                                                      Module  Enabled        7.8            
 Core                  Blog (blog)                                                        Module  Not installed  7.8            
 Core                  Book (book)                                                        Module  Not installed  7.8            
 Core                  Color (color)                                                      Module  Enabled        7.8            
 Core                  Comment (comment)                                                  Module  Enabled        7.8            
 Core                  Contact (contact)                                                  Module  Not installed  7.8            
 Core                  Content translation (translation)                                  Module  Not installed  7.8            
 Core                  Contextual links (contextual)                                      Module  Enabled        7.8            
 Core                  Dashboard (dashboard)                                              Module  Enabled        7.8            
 Core                  Database logging (dblog)                                           Module  Enabled        7.8            
 Core                  Field (field)                                                      Module  Enabled        7.8            
 Core                  Field SQL storage (field_sql_storage)                              Module  Enabled        7.8            
 Core                  Field UI (field_ui)                                                Module  Enabled        7.8            
 Core                  File (file)                                                        Module  Enabled        7.8            
 Core                  Filter (filter)                                                    Module  Enabled        7.8            
 Core                  Forum (forum)                                                      Module  Not installed  7.8            
 Core                  Help (help)                                                        Module  Enabled        7.8            
 Core                  Image (image)                                                      Module  Enabled        7.8            
 Core                  List (list)                                                        Module  Enabled        7.8            
 Core                  Locale (locale)                                                    Module  Not installed  7.8            
 Core                  Menu (menu)                                                        Module  Enabled        7.8            
 Core                  Node (node)                                                        Module  Enabled        7.8            
 Core                  Number (number)                                                    Module  Enabled        7.8            
 Core                  OpenID (openid)                                                    Module  Not installed  7.8            
 Core                  Options (options)                                                  Module  Enabled        7.8            
 Core                  Overlay (overlay)                                                  Module  Not installed  7.8            
 Core                  Path (path)                                                        Module  Enabled        7.8            
 Core                  PHP filter (php)                                                   Module  Enabled        7.8            
 Core                  Poll (poll)                                                        Module  Not installed  7.8            
 Core                  RDF (rdf)                                                          Module  Enabled        7.8            
 Core                  Search (search)                                                    Module  Enabled        7.8            
 Core                  Shortcut (shortcut)                                                Module  Enabled        7.8            
 Core                  Statistics (statistics)                                            Module  Not installed  7.8            
 Core                  Syslog (syslog)                                                    Module  Not installed  7.8            
 Core                  System (system)                                                    Module  Enabled        7.8            
 Core                  Taxonomy (taxonomy)                                                Module  Enabled        7.8            
 Core                  Testing (simpletest)                                               Module  Enabled        7.8            
 Core                  Text (text)                                                        Module  Enabled        7.8            
 Core                  Toolbar (toolbar)                                                  Module  Not installed  7.8            
 Core                  Tracker (tracker)                                                  Module  Not installed  7.8            
 Core                  Trigger (trigger)                                                  Module  Not installed  7.8            
 Core                  Update manager (update)                                            Module  Enabled        7.8            
 Core                  User (user)                                                        Module  Enabled        7.8            
 Date/Time             Calendar (calendar)                                                Module  Enabled        7.x-3.0-alpha1 
 Date/Time             Calendar iCal (calendar_ical)                                      Module  Not installed  7.x-3.0-alpha1 
 Date/Time             Date (date)                                                        Module  Enabled        7.x-2.0-alpha4 
 Date/Time             Date API (date_api)                                                Module  Enabled        7.x-2.0-alpha4 
 Date/Time             Date Migration (date_migrate)                                      Module  Not installed  7.x-2.0-alpha4 
 Date/Time             Date Popup (date_popup)                                            Module  Enabled        7.x-2.0-alpha4 
 Date/Time             Date Repeat API (date_repeat)                                      Module  Not installed  7.x-2.0-alpha4 
 Date/Time             Date Tools (date_tools)                                            Module  Enabled        7.x-2.0-alpha4 
 Date/Time             Date Views (date_views)                                            Module  Enabled        7.x-2.0-alpha4 
 DBTNG                 DBTNG Migrator (dbtng_migrator)                                    Module  Not installed  7.x-1.0        
 Development           Devel (devel)                                                      Module  Enabled        7.x-1.2        
 Development           Devel generate (devel_generate)                                    Module  Not installed  7.x-1.2        
 Development           Devel node access (devel_node_access)                              Module  Not installed  7.x-1.2        
 Example modules       Multiselect FAPI Example (multiselect_fapi_example)                Module  Not installed  7.x-1.8        
 Features              Date Migration Example (date_migrate_example)                      Module  Not installed  7.x-2.0-alpha4 
 Features              Features (features)                                                Module  Enabled        7.x-1.0-beta4  
 Features              Features override (features_override)                              Module  Enabled        7.x-1.0-beta1  
 Features              UUID Features (uuid_features)                                      Module  Enabled        7.x-1.0-alpha1 
 Features              UUID Services Example (uuid_services_example)                      Module  Not installed  7.x-1.0-alpha2 
 Fields                Field Permissions (field_permissions)                              Module  Enabled        7.x-1.0-alpha1 
 Fields                Fieldgroup (field_group)                                           Module  Enabled        7.x-1.0        
 Fields                File Field Sources (filefield_sources)                             Module  Enabled        7.x-1.4        
 Fields                Node Reference (node_reference)                                    Module  Enabled        7.x-2.0-beta3  
 Fields                Node Reference URL Widget (nodereference_url)                      Module  Enabled        7.x-1.12       
 Fields                References (references)                                            Module  Enabled        7.x-2.0-beta3  
 Fields                References Dialog (references_dialog)                              Module  Enabled        7.x-1.0-alpha1 
 Fields                User Reference (user_reference)                                    Module  Enabled        7.x-2.0-beta3  
 Image                 Imagecache Actions (imagecache_actions)                            Module  Enabled        7.x-1.x-dev    
 Image                 Imagecache Autorotate (imagecache_autorotate)                      Module  Not installed  7.x-1.x-dev    
 Image                 Imagecache Canvas Actions (imagecache_canvasactions)               Module  Enabled        7.x-1.x-dev    
 Image                 Imagecache Color Actions (imagecache_coloractions)                 Module  Not installed  7.x-1.x-dev    
 Image                 Imagecache Custom Actions (imagecache_customactions)               Module  Not installed  7.x-1.x-dev    
 Image                 Imagecache_actions Test Suite (imagecache_testsuite)               Module  Not installed  7.x-1.x-dev    
 ImageAPI              ImageAPI (imageapi)                                                Module  Enabled        7.x-1.x-dev    
 ImageAPI              ImageAPI GD2 (imageapi_gd)                                         Module  Enabled        7.x-1.x-dev    
 ImageAPI              ImageAPI ImageMagick (imageapi_imagemagick)                        Module  Not installed  7.x-1.x-dev    
 Media                 File Entity (file_entity)                                          Module  Enabled        7.x-1.x-dev    
 Media                 IMCE (imce)                                                        Module  Enabled        7.x-1.4        
 Media                 IMCE Directory Manager (imce_dir_man)                              Module  Enabled        7.x-1.x-dev    
 Media                 IMCE File Path (imce_file_path)                                    Module  Enabled        7.x-1.x-dev    
 Media                 IMCE Rename (imce_rename)                                          Module  Enabled        7.x-1.2        
 Media                 IMCE Search (imce_search)                                          Module  Enabled        7.x-1.x-dev    
 Media                 Media (media)                                                      Module  Not installed  7.x-2.x-dev    
 Media                 Media Field (mediafield)                                           Module  Not installed  7.x-2.x-dev    
 Media                 Media Internet Sources (media_internet)                            Module  Not installed  7.x-2.x-dev    
 Media                 Media: Flickr (media_flickr)                                       Module  Not installed  7.x-1.0-alpha1 
 Media                 Media: YouTube (media_youtube)                                     Module  Not installed  7.x-1.0-alpha5 
 Other                 Backup and Migrate (backup_migrate)                                Module  Not installed  7.x-2.2        
 Other                 Context Field (context_field)                                      Module  Not installed  7.x-1.0-beta2  
 Other                 Context Layouts Extra (context_layouts_extra)                      Module  Not installed  7.x-1.0-beta2  
 Other                 Custom Permissions (config_perms)                                  Module  Enabled        7.x-2.0        
 Other                 Entity API (entity)                                                Module  Enabled        7.x-1.0-beta10 
 Other                 Entity tokens (entity_token)                                       Module  Enabled        7.x-1.0-beta10 
 Other                 Fast Permissions Administration (fpa)                              Module  Enabled        7.x-2.0        
 Other                 Features Plumber (features_plumber)                                Module  Enabled        7.x-1.0-alpha3 
 Other                 Features Plumber UI (features_plumber_ui)                          Module  Enabled        7.x-1.0-alpha3 
 Other                 Global Redirect (globalredirect)                                   Module  Enabled        7.x-1.3        
 Other                 Libraries (libraries)                                              Module  Enabled        7.x-1.0        
 Other                 LoginToboggan (logintoboggan)                                      Module  Enabled        7.x-1.2        
 Other                 LoginToboggan Rules Integration (logintoboggan_rules)              Module  Enabled        7.x-1.2        
 Other                 Menu Block (menu_block)                                            Module  Enabled        7.x-2.2        
 Other                 Menu Block Export (menu_block_export)                              Module  Enabled        7.x-2.2        
 Other                 Options element (options_element)                                  Module  Enabled        7.x-1.4        
 Other                 Pathauto (pathauto)                                                Module  Enabled        7.x-1.0-rc2    
 Other                 Strongarm (strongarm)                                              Module  Enabled        7.x-2.0-beta3  
 Other                 Token (token)                                                      Module  Enabled        7.x-1.0-beta6  
 Other                 Transliteration (transliteration)                                  Module  Not installed  7.x-3.0-alpha1 
 Rules                 Rules (rules)                                                      Module  Enabled        7.x-2.0-rc2    
 Rules                 Rules Scheduler (rules_scheduler)                                  Module  Enabled        7.x-2.0-rc2    
 Rules                 Rules UI (rules_admin)                                             Module  Enabled        7.x-2.0-rc2    
 Services - resources  UUID entity resource (uuid_services)                               Module  Not installed  7.x-1.0-alpha2 
 Styles                File Styles (file_styles)                                          Module  Enabled        7.x-2.0-alpha8 
 Styles                Styles (styles)                                                    Module  Enabled        7.x-2.0-alpha8 
 Styles                Styles UI (styles_ui)                                              Module  Enabled        7.x-2.0-alpha8 
 Taxonomy              Taxonomy Manager (taxonomy_manager)                                Module  Enabled        7.x-1.0-beta2  
 User interface        Autocomplete Deluxe (autocomplete_deluxe)                          Module  Enabled        7.x-1.0-beta5  
 User interface        Autocomplete Deluxe Node References Widget (acdx_node_reference)   Module  Enabled        7.x-1.0-beta3  
 User interface        Autocomplete Deluxe User References Widget (acdx_user_reference)   Module  Enabled        7.x-1.0-beta3  
 User interface        CKEditor Link (ckeditor_link)                                      Module  Not installed  7.x-2.1        
 User interface        IMCE Wysiwyg API bridge (imce_wysiwyg)                             Module  Enabled        7.x-1.x-dev    
 User interface        jQuery plugins (jquery_plugin)                                     Module  Enabled        7.x-1.0        
 User interface        jQuery Update (jquery_update)                                      Module  Enabled        7.x-2.2        
 User interface        Lightbox2 (lightbox2)                                              Module  Enabled        7.x-1.x-dev    
 User interface        Wysiwyg (wysiwyg)                                                  Module  Enabled        7.x-2.1        
 User Relationships    UR-Blocks (user_relationship_blocks)                               Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Defaults (user_relationship_defaults)                           Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Elaborations (user_relationship_elaborations)                   Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Implications (user_relationship_implications)                   Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Invite (user_relationship_invites)                              Module  Not installed  7.x-1.0-alpha3 
 User Relationships    UR-Mailer (user_relationship_mailer)                               Module  Not installed  7.x-1.0-alpha3 
 User Relationships    UR-Node Access (user_relationship_node_access)                     Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Panels Visibility (user_relationships_panels_visibility)        Module  Not installed  7.x-1.0-alpha3 
 User Relationships    UR-Private message integration (user_relationship_privatemsg)      Module  Not installed  7.x-1.0-alpha3 
 User Relationships    UR-Rules (user_relationships_rules)                                Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Services (user_relationship_service)                            Module  Not installed  7.x-1.0-alpha3 
 User Relationships    UR-UI (user_relationships_ui)                                      Module  Enabled        7.x-1.0-alpha3 
 User Relationships    UR-Views (user_relationship_views)                                 Module  Enabled        7.x-1.0-alpha3 
 User Relationships    User Relationships (user_relationships)                            Module  Enabled        7.x-1.0-alpha3 
 UUID                  Universally Unique ID (uuid)                                       Module  Enabled        7.x-1.0-alpha2 
 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.8            
 Core                  Garland (garland)                                                  Theme   Disabled       7.8            
 Core                  Seven (seven)                                                      Theme   Enabled        7.8            
 Core                  Stark (stark)                                                      Theme   Disabled       7.8            

Upon attempting to enable the module I promptly get:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7-base.media_type' doesn't exist: SELECT mt.* FROM {media_type} mt ORDER BY weight ASC; Array ( ) in media_type_get_types() (line 122 of /srv/distributions/drupal7/code/sites/all/modules/contrib/media/includes/media.types.inc).

I suspect the media_schema() in the media.install is wrong and doesn't build the scheme on a clean install.

DamienMcKenna’s picture

Running into the exact same problem trying to do a fresh install with the latest 7.x-2.x-dev code on D7.8.

DamienMcKenna’s picture

I grabbed the record from {batch} and this is what I see in the 'batch' field:

a:12:{
  s:4:"sets";a:1:{
    i:0;a:14:{
      s:7:"sandbox";a:0:{}
      s:7:"results";a:63:{
        i:0;s:17:"field_sql_storage";
        i:1;s:5:"field";
        i:2;s:4:"text";
        i:3;s:6:"filter";
        i:4;s:4:"node";
        i:5;s:4:"user";
        i:6;s:10:"apachesolr";
        i:7;s:6:"search";
        i:8;s:17:"apachesolr_search";
        i:9;s:6:"ctools";
        i:10;s:12:"addressfield";
        i:11;s:5:"block";
        i:12;s:7:"addthis";
        i:13;s:5:"views";
        i:14;s:6:"entity";
        i:15;s:21:"views_bulk_operations";
        i:16;s:7:"options";
        i:17;s:8:"taxonomy";
        i:18;s:24:"blog_list_item_formatter";
        i:19;s:11:"bulk_export";
        i:20;s:8:"date_api";
        i:21;s:9:"cck_phone";
        i:22;s:5:"color";
        i:23;s:8:"colorbox";
        i:24;s:4:"file";
        i:25;s:5:"image";
        i:26;s:13:"colorbox_file";
        i:27;s:29:"commaseparated_list_formatter";
        i:28;s:7:"comment";
        i:29;s:14:"community_tags";
        i:30;s:13:"compact_forms";
        i:31;s:7:"context";
        i:32;s:12:"page_manager";
        i:33;s:10:"context_ui";
        i:34;s:10:"contextual";
        i:35;s:10:"references";
        i:36;s:14:"node_reference";
        i:37;s:29:"corresponding_node_references";
        i:38;s:3:"cpn";
        i:39;s:8:"features";
        i:40;s:11:"field_group";
        i:41;s:9:"strongarm";
        i:42;s:12:"ct_blog_post";
        i:43;s:4:"list";
        i:44;s:6:"number";
        i:45;s:17:"ct_blog_post_list";
        i:46;s:6:"panels";
        i:47;s:9:"panelizer";
        i:48;s:11:"panels_mini";
        i:49;s:14:"user_reference";
        i:50;s:10:"ct_program";
        i:51;s:4:"date";
        i:52;s:15:"options_element";
        i:53;s:12:"form_builder";
        i:54;s:7:"webform";
        i:55;s:20:"form_builder_webform";
        i:56;s:4:"link";
        i:57;s:12:"entity_token";
        i:58;s:5:"rules";
        i:59;s:15:"rules_scheduler";
        i:60;s:9:"fb_social";
        i:61;s:4:"menu";
        i:62;s:11:"file_entity";
      }
      s:7:"success";b:0;
      s:5:"start";d:1318659014.3117039203643798828125;
      s:7:"elapsed";d:44656.1200000000026193447411060333251953125;
      s:5:"title";s:17:"Installing Drupal";
      s:13:"error_message";s:42:"The installation has encountered an error.";
      s:8:"finished";s:33:"_install_profile_modules_finished";
      s:12:"init_message";s:24:"Initializing.<br/>&nbsp;";
      s:16:"progress_message";s:29:"Completed @current of @total.";
      s:3:"css";a:0:{}
      s:5:"total";i:149;
      s:5:"count";i:86;
      s:5:"queue";a:2:{
        s:4:"name";s:16:"drupal_batch:1:0";
        s:5:"class";s:10:"BatchQueue";
      }
    }
  }
  s:16:"has_form_submits";b:0;
  s:11:"current_set";i:0;
  s:11:"progressive";b:1;
  s:3:"url";s:74:"http://example.local/install.php?profile=myinstaller&locale=en&op=start&id=1";
  s:11:"url_options";a:0:{}
  s:10:"source_url";s:4:"node";
  s:8:"redirect";s:52:"install.php?profile=myinstaller&locale=en&op=start&id=1";
  s:5:"theme";s:5:"seven";
  s:17:"redirect_callback";s:11:"drupal_goto";
  s:2:"id";s:1:"1";
  s:13:"error_message";s:159:"Please continue to <a href="http://example.local/install.php?profile=myinstaller&amp;locale=en&amp;op=start&amp;id=1&amp;id=1&amp;op=finished">the error page</a>";
}
DamienMcKenna’s picture

I hacked install_profile_modules() to find out what was going on, here's the list of modules & their weights before they get added to the batch:

Array
(
    [field_sql_storage] => -10
    [field] => -11
    [text] => -36
    [filter] => -123
    [node] => -220
    [user] => -245
    [apachesolr] => -1
    [search] => -2
    [apachesolr_search] => -3
    [ctools] => -6
    [addressfield] => -7
    [block] => -9
    [addthis] => -12
    [views] => -13
    [entity] => -14
    [views_bulk_operations] => -15
    [options] => -18
    [taxonomy] => -19
    [bulk_export] => -24
    [date_api] => -25
    [cck_phone] => -29
    [color] => -30
    [colorbox] => -31
    [file] => -32
    [image] => -33
    [colorbox_file] => -34
    [comment] => -37
    [community_tags] => -38
    [compact_forms] => -39
    [context] => -41
    [page_manager] => -42
    [context_ui] => -46
    [contextual] => -47
    [references] => -48
    [node_reference] => -49
    [corresponding_node_references] => -50
    [cpn] => -51
    [features] => -52
    [field_group] => -53
    [strongarm] => -54
    [list] => -56
    [number] => -57
    [panels] => -59
    [panelizer] => -60
    [panels_mini] => -61
    [user_reference] => -62
    [date] => -64
    [options_element] => -65
    [form_builder] => -66
    [webform] => -67
    [form_builder_webform] => -68
    [link] => -69
    [entity_token] => -70
    [rules] => -71
    [rules_scheduler] => -72
    [fb_social] => -73
    [menu] => -74
    [file_entity] => -75
    [media] => -76
    [date_popup] => -77
    [panel_schedule] => -78
    [download_file] => -80
    [entity_view_mode] => -81
    [mediafield] => -82
    [nodereference_url] => -83
    [votingapi] => -84
    [rate] => -85
    [styles] => -86
    [file_styles] => -87
    [profile2] => -90
    [delta] => -93
    [facetapi] => -94
    [googleanalytics] => -95
    [search_restrict] => -96
    [site_verify] => -97
    [xmlsitemap] => -98
    [xmlsitemap_engines] => -99
    [xmlsitemap_menu] => -100
    [xmlsitemap_node] => -101
    [ctools_custom_content] => -103
    [dashboard] => -104
    [fboauth] => -105
    [field_redirection] => -106
    [flag] => -107
    [google_admanager] => -108
    [location] => -109
    [mailchimp] => -110
    [mailchimp_sts] => -111
    [media_internet] => -112
    [token] => -113
    [metatag] => -114
    [overlay] => -115
    [path] => -116
    [pathauto] => -117
    [realname] => -118
    [redirect] => -119
    [revisioning] => -120
    [role_delegation] => -121
    [shortcut] => -122
    [smart_paging] => -124
    [styles_ui] => -125
    [stylizer] => -126
    [toolbar] => -127
    [twitter_block] => -128
    [views_media_browser] => -130
    [subform] => -133
    [date_repeat] => -158
    [dblog] => -162
    [devel] => -167
    [diff] => -170
    [field_ui] => -180
    [jcarousel] => -198
    [logintoboggan] => -208
    [media_flickr] => -211
    [media_vimeo] => -212
    [media_youtube] => -213
    [menu_minipanels] => -215
    [navigation404] => -219
    [panels_ipe] => -230
    [rdf] => -240
    [rules_admin] => -244
    [transliteration] => -246
    [views_content] => -247
    [views_ui] => -248
    [strongleg] => -249
    [wysiwyg] => -250
    [update] => -251
)

Based on what I was seeing of the installer running, it looks like it does fail on Media and not on file_entity() as I was suspecting.

DamienMcKenna’s picture

FileSize
661 bytes

Ok, here's the craziest thing... I changed media_install() to media_enable() and it works! No error!

DamienMcKenna’s picture

Oh, wait, I ran the installer again a few more times and it failed at exactly the same point. Oh noes.

DamienMcKenna’s picture

Completely skipping the media_install() function entirely by putting a return; on its first line causes it to work correctly. Go figure.

DamienMcKenna’s picture

Having spent ages trying to debug this..... the installation fails when module_enable() hits registry_update() before media_schema() and media_install() have executed. Aw crap.

tsvenson’s picture

Priority: Critical » Normal

I just tried enabling the Media module, several times as well as the depreciated Media Field module using the latest available 2.x-dev, Oct 16th version, on the project page, together with the currently available 2.x-dev Oct 15th version, of File Entity. They got enabled without any problems, neither on screen or in the log.

To verify everything working I also changed the Article CT Image field to use the Media browser widget and then uploaded an image to a new content. Also worked perfectly and without any issues or log error.

This is on Drupal 7.8 with Views 3.0 RC1 and CTools 1.0 RC1 on my local Win 7 Acquia Dev Desktop 7.4.4. No other modules, just a fresh install to verify it works.

Thus, this problem might not be with the Media (or File Entity) module. As some of you have other modules installed, its likely some form of conflict.

Have you verified this is happening when you only enable the Media module as well?

Until we know for sure this is a bug in the Media module, I am downgrading it to Normal.

tsvenson’s picture

I also did an update of one of my dev sites that included these updates:
file_entity module

  • 7103 - Intentionally left blank.
  • 7104 - Assign view file permission when updating without the Media module.

media module

  • 7200 - Replace 'view media' perm from all users having the role with 'view file'.
  • 7201 - Enable the new Media Field module if this site uses "media" fields. File fields are now preferred for storing media.
  • 7202 - Enable the Views module if it is not already enabled.

They too went through without any complaints or errors in the log.

DamienMcKenna’s picture

tsvenson: it seems you are correct, having an installation profile with only core + Media (and its dependencies) selected doesn't run into any problems, it all works. My assortment of 164 modules (total) - it fails at item ~64 when it tries to load Media. Back to MacGDBp..

tsvenson’s picture

@DamienMcKenna Oki, then we can at least rule something out. Below is a list of all the modules that was enabled when I did the update of the Media module as described in comment #18. Hope it can help you narrow down your list a bit at least.

  • Administration menu 7.x-3.x-dev (2011-Oct-16)
  • Advanced help 7.x-1.x-dev (2011-Feb-25)
  • Chaos tool suite (ctools) 7.x-1.0-rc1
  • Devel 7.x-1.2
  • Entity API 7.x-1.x-dev (2011-Oct-07)
  • Environment Indicator 7.x-1.0
  • Features 7.x-1.x-dev (2011-Sep-25)
  • File entity (fieldable files) 7.x-2.x-dev (2011-Oct-15)
  • Global Redirect 7.x-1.x-dev (2011-May-03)
  • Media 7.x-2.x-dev (2011-Oct-16)
  • Module Filter 7.x-1.6
  • Panels 7.x-3.x-dev (2011-Oct-16)
  • Pathauto 7.x-1.0-rc2
  • Pathauto persistent state 7.x-1.1
  • Rules 7.x-2.0
  • Strongarm 7.x-2.0-beta3
  • Token 7.x-1.0-beta6
  • Transliteration 7.x-3.x-dev (2011-Oct-16)
  • Views 7.x-3.0-rc1
DamienMcKenna’s picture

Further debugging.. the error occurs when media_type_get_types() is called. More debugging to follow..

DamienMcKenna’s picture

The media_type_get_types() function is called by media_file_type_info(), via CTools' _registry_update()... the battle continues.

DamienMcKenna’s picture

So it goes module_enable() -> registry_update() -> ctools_registry_files_alter() -> _ctools_registry_files_alter() -> (not sure exactly, too bored to fully test it) -> media_file_type_info() -> media_type_get_types() -> BOOM!

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
623 bytes

Here's a patch that changes media_tye_get_types() to return an empty array if an installation profile is running and the schema doesn't exist. I've tested this twice and it was able to continue on without any further problems, from Media.module at least ;-)

Please try this out on your own installation profiles and let me know how it works. FYI I'm using Drupal 7.8, Media 7.x-2.x-dev from 2011-10-13, File Entity 7.x-2.x-unstable2 and CTools 7.x-1.x-dev from 2011-09-17.

DamienMcKenna’s picture

Status: Needs review » Fixed

Apologies for taking over this thread, I'm reverting the status and have opened a separate ticket for the new problem: #1311828: Installation fails with SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.media_type' doesn't exist

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drewkeller’s picture

The patch in #3 worked for me to get past the error with install, EXCEPT that I also had to change a few other places in that same function which still referred to 'media' instead of 'file' ('view media' and 'administer media' should be 'view file' and 'administer file'). I'm not a patching expert. Maybe the patch was written against an older version where it was slightly different or something. Mine is the one that has 2013-Jun-16 as the date on drupal's media module page.

rogman_lebnh’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha1

This issue should not be closed. :-(

(Then again, that's what I get for using 2.0-alpha1 . Then again, I was having trouble using the previous release version.)

I had to make the following changes to the "media.install" file in order for the "update.php" script to work for me.

I had to comment out these lines inside the media_update_dependencies() function.

$dependencies['file_entity'][7208] = array(
  'media' => 7200,
);

I also had to comment out the entire media_update_7200() function.

I'm using Drupal 7.23 with ctools 7.x-1.3, entity 7.x-1.2, File entity 7.x-2.0-alpha1, and a few other modules.

ParisLiakos’s picture

try upgrading to alpha2, i believe you want have problems there