After upgrading to Picture 2.0, loading any page just returns the message "The website encountered an unexpected error. Please try again later. " Looking in the watchdog table I see this error:

Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called in /path/to/sites/all/modules/contrib/picture/picture.module on line 367 and defined in picture_get_mapping_breakpoints() (line 1057 of /path/to/sites/all/modules/contrib/picture/picture.module).

Comments

attiks’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Active » Fixed

Should be fixed by #2273249: Upgrade issue 1.3 to 2.0, a new verson will be released today.

timlie’s picture

I installed version 2.1 and still have the same issue as reported here:

Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping

attiks’s picture

Did you specify a picture mapping on the field settings?
Did you ran update.php?

attiks’s picture

Priority: Critical » Major
Status: Fixed » Active
ag_design’s picture

same error..

Error message
Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called picture.module on line 367 and defined in picture_get_mapping_breakpoints() (line 1059 of picture.module).
The website encountered an unexpected error. Please try again later.

it is new install and not upgrading from previous version.
uninstall and enable again module , same error .

jstoller’s picture

Priority: Major » Critical

I concur. The line numbers have changed, but I've tried the new update on two different sites and both fail with this error on every page that uses a picture formatter.

Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called in /path/to/sites/all/modules/contrib/picture/picture.module on line 367 and defined in picture_get_mapping_breakpoints() (line 1059 of /path/to/sites/all/modules/contrib/picture/picture.module).

In at least one instance I'm also getting the error:

Notice: Undefined index: picture_mapping in picture_field_formatter_view() (line 366 of /path/to/sites/all/modules/contrib/picture/picture.module).

Given that this renders the entire system unusable and has no known workaround, I think it meets the requirements for a critical bug, but feel free to change it back again if you really disagree.

I've been trying to figure out if there's some other module that might be triggering this error. One of my sites uses image fields and the other uses the Media and File Entity modules, so I suppose that doesn't matter. Both of the sites use Display Suite. In both sites, the images are generally not directly in the node entity, but rather in some other linked entity. On one site, I have a Bean entity loaded as a block in the footer on every page, which contains some image fields rendered as picture elements. That seems to be causing the entire site to bomb, so I can't even log in. That same site also loads images in page content that's stored in field collections on the node, rather than directly on the node. My second site loads most of its images from Paragraphs bundles that make up the page content. Paragraphs is very similar to field collections. Could it be that Picture is expecting its images to always be on a node?

attiks’s picture

Can you check the field settings and if necessary save them again, if that does not help, read on

Line 366 ($picture_mapping = picture_mapping_load($display['settings']['picture_mapping']);) is getting the field settings, if this fails it returns false, hence the error on line 367.

To debug you could add dpm($display); as the first line in that function, if you get a white screen, add return; on the next line (part of the devel module). The dpm should show an array with an element settings, and inside an element picture_mapping

attiks’s picture

Output of dpm should look similar to

array (
  'label' => 'hidden',
  'type' => 'picture',
  'weight' => '1',
  'settings' => array (
    'picture_mapping' => 'sas_inline_picture',
    'fallback_image_style' => '',
    'image_link' => 'colorbox',
    'colorbox' => 'sas_content_standaard',
  ),
  'module' => 'picture',
)

ag_design’s picture

I must mention, that my error appeared when using within Views as a field "Picture"

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/view/slideshow_for_featured/preview/block/ajax
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called in picture.module on line 369 and defined in picture_get_mapping_breakpoints() (line 1066 of picture.module).

Debug:

picture_mapping (String, 20 characters ) responsive_map
$...['settings']['picture_mapping']
fallback_image_style (String, 0 characters )
$...['settings']['fallback_image_style']
image_link (String, 7 characters ) content
$...['settings']['image_link']
colorbox (String, 20 characters ) responsive_map
$...['settings']['colorbox']

jstoller’s picture

@attiks, are you perchance at DrupalCon? if so, I'm in the Coder Lounge at the Austin Convention Center right now and I'd be happy to work with you on this.

The array I get is:

Array
(
    [weight] => 0
    [status] => 1
    [settings] => Array
        (
            [picture_group] => hero
            [fallback_image_style] => 
            [image_link] => 
            [colorbox] => hero
            [picture_mapping] => 
        )

    [type] => picture
)

When I go to the file display settings for my hero image, I get this error:

Notice: Undefined index: picture_mapping in picture_field_formatter_settings_form() (line 245 of /Users/jstoller/Sites/californiasciencecenter.org/www/sites/all/modules/contrib/picture/picture.module).

If I try to change the picture mapping setting, I get the error:

Picture mapping field is required.

Then I noticed that the picture mappings on all of my file view modes are just defaulting to the first item in the list, so none of them are actually set. I thought this might be a Features problem, since all my configuration is stored in feature modules, so I created a new breakpoint group and configured its picture mappings, to try and get Features out of the picture, but that doesn't seem to have made any difference.

attiks’s picture

#9: your settings do look correct, views is given a problem with me as well (Fatal error: Nesting level too deep - recursive dependency? in /data/disk/o1/static/sas/includes/common.inc on line 7530), I'll check later today

#10: picture_group is old and should disappear after saving the settings, can you test a plain node view to see it works?

PS: I wish I was at DrupalCon but alas

attiks’s picture

"Notice: Undefined index: picture_mapping in picture_field_formatter_settings_form() (line 245 of /Users/jstoller/Sites/californiasciencecenter.org/www/sites/all/modules/contrib/picture/picture.module)" should be fixed

attiks’s picture

I tested the following, so far so good:

  • regular node view
  • node view using display suite
  • view of nodes using content, display suite, rendered entity and fields mode
  • file entity (admin/structure/file-types/manage/image/file-display) using picture and viewing the file
  • field collection item connected to a node (and using display suite on field collection), node displays ok
  • view of field collection items using rendered entity and fields
  • view based on file entities, all display modes
  • bean block using a file field and rendered file formatter (using picture)

  • Commit affe4db on 7.x-2.x by attiks:
    Issue #2274661 by jstoller: Fixed Fatal error: Argument 1 passed to...
attiks’s picture

Just to be sure, you did clear all caches, and you could try drush cc views as well, or even drush rr

attiks’s picture

Another possible solutions, edit and save all your picture mappings

timlie’s picture

I did use update.php and cleared the caches but still the same error.
Tried new dev version as well.

attiks’s picture

timlie: you have it while displaying a node? Did you re-save the picture mappings?

timlie’s picture

I disabled the module and even uninstalled it so I don't have any picture mappings anymore.
Still I get the error.

Thanks!

attiks’s picture

Timlie i assume you created a new one and assigned on the display formatter?

timlie’s picture

At first I just did an upgrade to version 2 of the module (I had picture mappings).
The error appeared.
I disabled the module now and uninstalled it as well. Now I have no picture mappings anymore but the error is still there.

attiks’s picture

timlie: can you create a new mapping and try it using an image field on a node? Make sure the select the mapping after setting the output formatter to picture

timlie’s picture

I created a mapping but still when I visit a non admin page I get on every page the error. The rest of the page doesn't load.

robcarr’s picture

I've re-saved all my breakpoints and it got rid of all but one of the Fatal errors.

The remaining error is associated with one View where Flexslider is used, which I currently cannot configure, as I get the following error when I click on 'Settings'

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/ajax/display/front_flexslider/page/style_options
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pr11.dev.flexslider_picture_optionset' doesn't exist: SELECT t__0.*, t__1.*
FROM 
{flexslider_optionset} t__0
LEFT OUTER JOIN {flexslider_picture_optionset} t__1 ON t__0.name = t__1.flexslider_optionset; Array
(
)
in ctools_export_load_object() (line 462 of .../ctools/includes/export.inc).

The table flexslider_picture_optionset doesn't exist (although table flexslider_optionsetis there). So with this problem, I'm still having WSOD on non-admin pages.

* EDIT *

My missing table is due to previous patches applied addressing #2084979: flexslider_picture broken on/after flexslider -alpha3.

brb

attiks’s picture

Assigned: Unassigned » jelle_s
jstoller’s picture

After much exploration, I've managed to sort of work around this on one of my sites. It seems to more a problem with the picture formatter settings than with the picture mapping configurations. Features also seems to be complicating things. Here's what I did:

  1. Update Picture to latest 2.x-dev release.
  2. Run drush fua to update all features. This fixes the picture mappings in the features that have them.
  3. Go through the image file entity display configurations for every view mode that uses a picture formatter and reset the picture mapping. This configuration is lost in the update.
  4. Run drush fua again. This changes the file display settings to use picture_mapping instead of the old picture_group.

So, is it possible to update the picture display configuration for displays who's configuration is stored in a feature?

After all this I'm still getting one error, but I'm not sure if its related to the issue at hand:

Notice: Undefined index: width in theme_picture_formatter() (line 450 of /path/to/sites/all/modules/contrib/picture/picture.module).

Notice: Undefined index: height in theme_picture_formatter() (line 451 of /path/to/sites/all/modules/contrib/picture/picture.module).

jelle_s’s picture

Status: Active » Fixed

File displays and field formatters are fixed in the latest dev version. The flexslider issues will be addressed in #2084979: flexslider_picture broken on/after flexslider -alpha3

jstoller’s picture

I'm trying to test this, but there seems to be a problem with the download. When I update through drush it reports "File picture-7.x-2.x-dev.tar.gz_date=1401889727 is corrupt (wrong md5 checksum)." I also tried manually downloading from the project page, but what I get looks like the version from June 2.

sutharsan’s picture

Status: Fixed » Active

Re-opening the issue.
The upgrade path is still broken. I have the same error message as reported by jstoller, using the latest dev, the error still remains. I first upgrade from 7.x-1.3 to 7.x-2.1, and now to 7.x-2.x-dev. For the sort term, please describe on how to get out of this situation. But we need a solid upgrade path because currently it is badly broken.

@jstoller, this is not related to the module, but to drupal.org's packaging script. I downloaded and unpacked the dev-release the 'old-fashioned' way.

attiks’s picture

Erik did you use the git version or the dev version?

jstoller’s picture

@Sutharsan, that's what I did in my second attempt, but the downloaded module was the wrong version. I'll try pulling from the GIT repo later.

attiks’s picture

The dev version contains the latest changes now.

sutharsan’s picture

Status: Active » Fixed

@attiks, I used the dev release (sometimes I'm only human ;) ). The current dev release fixes the problem. Thanks so much!

jelle_s’s picture

Assigned: jelle_s » Unassigned
jstoller’s picture

Status: Fixed » Needs review
StatusFileSize
new1.66 KB

I'm still getting the fatal error. The source seems to be that picture_update_7201() is using "picture_mappings" instead of "picture_mapping." The attached patch should fix this.

attiks’s picture

Status: Needs review » Fixed

Thanks, I'll create a new release in a sec

tgshannon’s picture

I'm still seeing this issue with the 2.3 release. I just started to use the picture and breakpoints module yesterday on a new installation local site. I started with the Bootstrap 3 theme, and did not see it work. So, today I started to use an Omega sub-theme. The error only shows on the home page, but the node pages are not being responsive. I started out with 2.0, updated to 2.2 today, and noticed you just released 2.3. I disabled the picture and breakpoint modules and uninstalled. Removed my test image styles, and then reenabled the picture and breakpoint theme. Created the breakpoints, generated the image styles using the large (480) image styles. Edit the new image styles to various settings, mapped the picture settings for the breakpoints to the appropriate image styles. Assigned the Article image field to picture using my new picture mappings group. Still seeing the error on the home page.

If you need I can start with a fresh install and database to help?

Which is correct? From picture module project page:
You have to order your breakpoints from the "largest" to the "smallest", but keep in mind that it depends if you use min or max queries, the picture element (and the polyfill) will use the first matching source tag.

From breakpoint module project page:
It is incredibly important to order the Breakpoints correctly before creating any Breakpoint groups.

Breakpoints need to be arranged from smallest to largest (from top to bottom). E.g. "mobile" at the top and "wide" below it.
If you create a Breakpoint group with the Breakpoints in the wrong order, the group becomes "locked" to the order that the Breakpoints were set in at its creation and your responsive images will not render properly.
If you find yourself in this situation, you should delete the broken Breakpoint group and re-create it after you've set your Breakpoints to the proper weighted order.

attiks’s picture

Priority: Critical » Normal
Status: Fixed » Needs work

Can you paste your error message?
Starting from scratch might be a good idea

tgshannon’s picture

I am starting from scratch. I updated my first post with a question about the order of the breakpoints. What is the correct order? Mobil to Wide as breakpoint module suggests, or largest to smallest as the picture module suggests? I'm using an Omega sub-theme if that matters.

UPDATE: I started from scratch. I am not getting the error. However, using the mobil first order the pictures are not being responsive. I think this is because the mobile media query (min-width: 0) is matched first. I think I also need to set a max-width parameter on the breakpoints, or perhaps order from largest to smallest order as the picture module suggests, but the breakpoint module cautions against.

attiks’s picture

Picture will use the first match, so when using min width make sure the smallest is last, when using max width make sure smallest is first.

attiks’s picture

BTW you don't have to delete the breakpoint group, you can re order them and save, next you have to re save the mapping

tgshannon’s picture

Working. I tried to reorder and save, but the old order returns after I loaded the node again. I needed to change the order in the theme.info file also i think. So, I think the picture module is correct about the order from "largest" to "smallest", but all of the examples and videos have it wrong. There are several ways to fix this I think: order largest to smallest using min-width media queries. Order smallest to largest using max-width media queries?? Include both the min and max width in the media query?

Since this is all a little new to me, I guess I didn't recognize a solution right off.

attiks’s picture

Status: Needs work » Fixed

You're right you have to change them in the theme, or override them first using the UI. Theme is the better approach.

  • Commit fb51bd8 on 7.x-2.x by Jelle_S:
    Issue #2274661 by jstoller: Fixed Fatal error: Argument 1 passed to...

Status: Fixed » Closed (fixed)

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

aanjaneyam’s picture

Status: Closed (fixed) » Active

I user aegir stack from omega8.cc. I just upgaded my entire site (via migration). During the courese of this upgrade I upgraded Picture module from 7.x-1.2 to 7.x-2.4 and I am getting this error. I cannot even access any page of the site so there is no way reordering any mapping or doing anything else. I cannot log in to the site. I there a certain upgrade process that should be followed fro picture 1.x to 2.x. I tried the 7.x-2.x+3-dev too but to no avail.

jstoller’s picture

@aanjaneyam, I assume your picture mappings are in features. Can you manually edit the configuration in your feature, changing 'picture_group' to 'picture_mapping'? Then try reverting the feature via drush. I think that might work.

aanjaneyam’s picture

@jstoller , I have a feature which may have picture_mappings I will check that. But, I have many content types with each having few core image fields and they have picture_group as mapping in their displays. How would that get handled in upgrade.

aanjaneyam’s picture

I tried it. I have one feature with only one of its file making a single mention of the word picture_group. I changed this instance of picture_group to picture_mapping ran drush fr , drush cc all. The fatal error is still there preventing me from doing nything. The content of the file that contantained word picture_group (now edited) is:

<?php
/**
 * @file
 * conjurenet_beans.features.field_instance.inc
 */

/**
 * Implements hook_field_default_field_instances().
 */
function conjurenet_beans_field_default_field_instances() {
  $field_instances = array();

  // Exported field_instance: 'bean-forms-field_form_reference'
  $field_instances['bean-forms-field_form_reference'] = array(
    'bundle' => 'forms',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'entityreference',
        'settings' => array(
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
          'links' => 0,
          'view_mode' => 'full',
        ),
        'type' => 'entityreference_entity_view',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_form_reference',
    'label' => 'Form Reference',
    'required' => 1,
    'settings' => array(
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(),
      'type' => 'options_select',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-google_map-field_map_address'
  $field_instances['bean-google_map-field_map_address'] = array(
    'bundle' => 'google_map',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'simple_gmap',
        'settings' => array(
          'iframe_height' => 330,
          'iframe_width' => 400,
          'include_link' => 1,
          'include_map' => 1,
          'include_text' => 0,
          'information_bubble' => 0,
          'langcode' => 'en',
          'link_text' => 'View larger map',
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
          'map_type' => 'h',
          'zoom_level' => 14,
        ),
        'type' => 'simple_gmap',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_map_address',
    'label' => 'Map Address',
    'required' => 0,
    'settings' => array(
      'linkit' => array(
        'enable' => 0,
        'insert_plugin' => '',
      ),
      'text_processing' => 0,
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'text',
      'settings' => array(
        'size' => 60,
      ),
      'type' => 'text_textfield',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-image-field_image'
  $field_instances['bean-image-field_image'] = array(
    'bundle' => 'image',
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'picture',
        'settings' => array(
          'fallback_image_style' => '',
          'image_link' => '',
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '[bean:field-image-link:url]',
            'linked' => 1,
          ),
          'picture_mapping' => '',
        ),
        'type' => 'picture',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_image',
    'label' => 'Image',
    'required' => 0,
    'settings' => array(
      'alt_field' => 1,
      'default_image' => 0,
      'file_directory' => 'images/beans/image',
      'file_extensions' => 'png gif jpg jpeg',
      'max_filesize' => '',
      'max_resolution' => '',
      'min_resolution' => '',
      'title_field' => 1,
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'media',
      'settings' => array(
        'allowed_schemes' => array(
          'feed' => 0,
          'http' => 0,
          'https' => 0,
          'private' => 'private',
          'public' => 'public',
          'vimeo' => 0,
          'youtube' => 0,
        ),
        'allowed_types' => array(
          'audio' => 0,
          'document' => 0,
          'image' => 'image',
          'video' => 0,
        ),
        'browser_plugins' => array(
          'media_default--media_browser_1' => 0,
          'media_default--media_browser_my_files' => 0,
          'media_internet' => 0,
          'remote_file' => 0,
          'upload' => 0,
          'youtube' => 0,
        ),
        'progress_indicator' => 'throbber',
      ),
      'type' => 'media_generic',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-image-field_image_link'
  $field_instances['bean-image-field_image_link'] = array(
    'bundle' => 'image',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'settings' => array(),
        'type' => 'hidden',
        'weight' => 1,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_image_link',
    'label' => 'Image Link',
    'required' => 0,
    'settings' => array(
      'attributes' => array(
        'class' => '',
        'configurable_title' => 0,
        'rel' => '',
        'target' => 'default',
        'title' => '',
      ),
      'display' => array(
        'url_cutoff' => 80,
      ),
      'enable_tokens' => 1,
      'linkit' => array(
        'enable' => 1,
        'insert_plugin' => 'raw_url',
      ),
      'rel_remove' => 'default',
      'title' => 'none',
      'title_maxlength' => 128,
      'title_value' => '',
      'url' => 0,
      'user_register_form' => FALSE,
      'validate_url' => 1,
    ),
    'widget' => array(
      'active' => 0,
      'module' => 'link',
      'settings' => array(),
      'type' => 'link_field',
      'weight' => 3,
    ),
  );

  // Exported field_instance: 'bean-links-field_quick_links'
  $field_instances['bean-links-field_quick_links'] = array(
    'bundle' => 'links',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'link',
        'settings' => array(
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
        ),
        'type' => 'link_default',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_quick_links',
    'label' => 'Quick Links',
    'required' => 0,
    'settings' => array(
      'attributes' => array(
        'class' => '',
        'configurable_title' => 0,
        'rel' => '',
        'target' => 'default',
        'title' => '',
      ),
      'display' => array(
        'url_cutoff' => 80,
      ),
      'enable_tokens' => 1,
      'linkit' => array(
        'enable' => 0,
        'insert_plugin' => '',
      ),
      'rel_remove' => 'default',
      'title' => 'optional',
      'title_maxlength' => 128,
      'title_value' => '',
      'url' => 0,
      'user_register_form' => FALSE,
      'validate_url' => 1,
    ),
    'widget' => array(
      'active' => 0,
      'module' => 'link',
      'settings' => array(),
      'type' => 'link_field',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-slideshow-field_image'
  $field_instances['bean-slideshow-field_image'] = array(
    'bundle' => 'slideshow',
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'flexslider_picture',
        'settings' => array(
          'caption' => 0,
          'flexslider_reference_img_src' => NULL,
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
          'optionset' => 'default',
        ),
        'type' => 'flexslider',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_image',
    'label' => 'Image',
    'required' => 0,
    'settings' => array(
      'alt_field' => 0,
      'default_image' => 0,
      'file_directory' => 'images/beans/slideshow',
      'file_extensions' => 'png gif jpg jpeg',
      'max_filesize' => '',
      'max_resolution' => '',
      'min_resolution' => '',
      'title_field' => 0,
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'media',
      'settings' => array(
        'allowed_schemes' => array(
          'feed' => 0,
          'http' => 0,
          'https' => 0,
          'private' => 'private',
          'public' => 'public',
          'vimeo' => 0,
          'youtube' => 0,
        ),
        'allowed_types' => array(
          'audio' => 0,
          'document' => 0,
          'image' => 'image',
          'video' => 0,
        ),
        'browser_plugins' => array(
          'media_default--media_browser_1' => 0,
          'media_default--media_browser_my_files' => 0,
          'media_internet' => 0,
          'remote_file' => 0,
          'upload' => 0,
          'youtube' => 0,
        ),
        'progress_indicator' => 'throbber',
      ),
      'type' => 'media_generic',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-table-field_table_body'
  $field_instances['bean-table-field_table_body'] = array(
    'bundle' => 'table',
    'default_value' => array(
      0 => array(
        'tablefield' => array(
          'cell_0_0' => '',
          'cell_0_1' => '',
          'cell_0_2' => '',
          'cell_0_3' => '',
          'cell_0_4' => '',
          'cell_1_0' => '',
          'cell_1_1' => '',
          'cell_1_2' => '',
          'cell_1_3' => '',
          'cell_1_4' => '',
          'cell_2_0' => '',
          'cell_2_1' => '',
          'cell_2_2' => '',
          'cell_2_3' => '',
          'cell_2_4' => '',
          'cell_3_0' => '',
          'cell_3_1' => '',
          'cell_3_2' => '',
          'cell_3_3' => '',
          'cell_3_4' => '',
          'cell_4_0' => '',
          'cell_4_1' => '',
          'cell_4_2' => '',
          'cell_4_3' => '',
          'cell_4_4' => '',
          'import' => array(
            'rebuild_field_table_body_0' => 'Upload CSV',
            'tablefield_csv_field_table_body_0' => '',
          ),
          'rebuild' => array(
            'count_cols' => 5,
            'count_rows' => 5,
            'rebuild' => 'Rebuild Table',
          ),
        ),
        'format' => 'full_html',
      ),
    ),
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'tablefield',
        'settings' => array(
          'conditions' => array(),
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
        ),
        'type' => 'default',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_table_body',
    'label' => 'Table Body',
    'required' => 0,
    'settings' => array(
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 0,
      'module' => 'tablefield',
      'settings' => array(),
      'type' => 'tablefield',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-text-field_body'
  $field_instances['bean-text-field_body'] = array(
    'bundle' => 'text',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'text',
        'settings' => array(
          'conditions' => array(),
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
        ),
        'type' => 'text_default',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_body',
    'label' => 'Body',
    'required' => 0,
    'settings' => array(
      'better_formats' => array(
        'allowed_formats' => array(
          'filtered_html' => 'filtered_html',
          'full_html' => 'full_html',
          'plain_text' => 'plain_text',
          'wysiwyg_editor' => 'wysiwyg_editor',
        ),
        'allowed_formats_toggle' => 0,
        'default_order_toggle' => 0,
        'default_order_wrapper' => array(
          'formats' => array(
            'filtered_html' => array(
              'weight' => 0,
            ),
            'full_html' => array(
              'weight' => -10,
            ),
            'plain_text' => array(
              'weight' => 10,
            ),
            'wysiwyg_editor' => array(
              'weight' => -9,
            ),
          ),
        ),
      ),
      'linkit' => array(
        'enable' => 0,
        'insert_plugin' => '',
      ),
      'text_processing' => 1,
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'text',
      'settings' => array(
        'rows' => 5,
      ),
      'type' => 'text_textarea',
      'weight' => 2,
    ),
  );

  // Exported field_instance: 'bean-video-field_video_file'
  $field_instances['bean-video-field_video_file'] = array(
    'bundle' => 'video',
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'file',
        'settings' => array(
          'conditions' => array(),
          'linked_field' => array(
            'advanced' => array(
              'class' => '',
              'rel' => '',
              'target' => '',
              'text' => '',
              'title' => '',
            ),
            'destination' => '',
            'linked' => 0,
          ),
        ),
        'type' => 'file_default',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'bean',
    'field_name' => 'field_video_file',
    'label' => 'Video File',
    'required' => 0,
    'settings' => array(
      'description_field' => 0,
      'file_directory' => '',
      'file_extensions' => 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp mp3 mov m4v mp4 mpeg avi ogg oga ogv wmv ico',
      'max_filesize' => '',
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'media',
      'settings' => array(
        'allowed_schemes' => array(
          'private' => 0,
          'public' => 0,
          'vimeo' => 'vimeo',
          'youtube' => 'youtube',
        ),
        'allowed_types' => array(
          'audio' => 0,
          'document' => 0,
          'image' => 0,
          'video' => 'video',
        ),
        'browser_plugins' => array(
          'media_default--media_browser_1' => 'media_default--media_browser_1',
          'media_default--media_browser_my_files' => 0,
          'media_internet' => 'media_internet',
          'upload' => 0,
          'youtube' => 0,
        ),
        'progress_indicator' => 'throbber',
      ),
      'type' => 'media_generic',
      'weight' => 2,
    ),
  );

  // Translatables
  // Included for use with string extractors like potx.
  t('Body');
  t('Form Reference');
  t('Image');
  t('Image Link');
  t('Map Address');
  t('Quick Links');
  t('Table Body');
  t('Video File');

  return $field_instances;
}
aanjaneyam’s picture

I disabled the feature but still no change. There is no documentation on upgrade process???

attiks’s picture

The update process is just running update.php or drush updb, did you try running drush updb on the migrated site to see if all updates are processed?

What kind of error do you get?

aanjaneyam’s picture

@attiks, yes did drush updb again after migration despite the migration process itself runs drush updb to upgrade the site from one platform version to other. The error I am geeting is:

Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called in /data/disk/c1/static/mop-prod-7.28.1-p001/sites/all/modules/contrib/picture/picture.module on line 528 and defined in picture_get_mapping_breakpoints() (line 1364 of /data/disk/c1/static/mop-prod-7.28.1-p001/sites/all/modules/contrib/picture/picture.module).

aanjaneyam’s picture

Just getting WSOD.

attiks’s picture

Do you have the same problem if you do a manual update to picture 2?

aanjaneyam’s picture

I havent' tried manual update. I can try that. Is it possible to downgrade picture to 1.x and the manually upgrade to 2.x.

jstoller’s picture

@aanjaneyam: Looking at your code from #49, the picture_mapping property of bean-image-field_image is empty. Try manually setting it to the machine name of the picture mapping configuration you want to use for that field and reverting the feature again.

aanjaneyam’s picture

@jstoller thanks!!! Your advice #56 fixed the fatal error and I can now see the site. I don't know how the picture_mapping was empty even though in the previous version of the site picture_group was showing selected in the UI.

attiks’s picture

Status: Active » Fixed

Closing this, in case of problems open a new issue

Status: Fixed » Closed (fixed)

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