Hi,
I was trying to update fieldable_panels_panes from 7.x-1.5 to 7.x-1.8 (I executed the database updates and everything looked good in the drush output); however when I went to the fieldable_panels_panes administration page I wasn't able to see the Default bundle "Fieldable Panel Pane", and when I went to view a panel page that was using fpp items of that type, I got some notices about undefined index of fieldable_panel_pane.

I checked fieldable_panels_pane_type database table and the type fieldable_panels_pane was not present on the table.

Obviously my site is using the default bundle and thats why I experienced this bug.

I fixed the problem re-executing some code lines of the .install file, specifically

  if (!variable_get('fieldable_panels_panes_skip_default_type', FALSE)) {
    ctools_include('export');

    $item = ctools_export_crud_new('fieldable_panels_pane_type');
    $item->name = 'fieldable_panels_pane';
    $item->title = t('Panels Pane');
    ctools_export_crud_save('fieldable_panels_pane_type', $item);
  }

I'll provide a patch with this fix inside the actual hook_update_N.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rigoucr created an issue. See original summary.

rigoucr’s picture

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.09 KB

I think the bug happens because of this code in update 7108:

  $t = get_t();
  if (empty($entity_info['bundles'])) {
    $entity_info['bundles'] = array(
      'fieldable_panels_pane' => array(
          'label' => $t('Panels pane'),
      ),
    );
  }

If there's one custom entity then it won't add the default one.

Does this fix the problem?

DamienMcKenna’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
DamienMcKenna’s picture

DamienMcKenna’s picture

This adds back the update script, and adds some logic so it's only added again if it didn't already exist.

  • DamienMcKenna committed 1d03adb on 7.x-1.x authored by rigoucr
    Issue #2688577 by rigoucr, DamienMcKenna: Recover the default FPP type...
DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. Thanks.

rigoucr’s picture

Priority: Normal » Major
Status: Fixed » Active
FileSize
772 bytes

Hi DamienMcKenna,

My patch has project specific code, it was a mistake to send that patch like that. It shouldn't have made it to the release, for some reason it got there. I'm reopening the ticket.

DamienMcKenna’s picture

Status: Active » Fixed

Oh you're kidding me! I should have caught that!

Thanks for noticing it and providing a fix, which I've already committed.

Status: Fixed » Closed (fixed)

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