The schema for facebook publications is as follows:

/**
 * Implements hook_schema().
 */
function fb_autopost_entity_schema() {
  $schema['facebook_publication'] = array(
      ...
      'facebook_id' => array(
        'type' => 'varchar',
        'length' => 255,
        'description' => "The id returned by Facebook after a successful publication.",
      ),
      ...
   );
}

But... The FacebookPublicationEntity class is defined thusly:

/**
 * The class used for Facebook publication entities.
 */
class FacebookPublicationEntity extends Entity {
  ...
  /**
   * The ID string returned from Facebook on publication.
   *
   * @var string
   */
  public $facebookid;
  ...
  /**
   * Gets the associated facebook_id.
   *
   * @return string
   *   String representing the Facebook ID.
   */
  public function facebookid() {
    return $this->facebookid;
  }
  ...
}

It looks like the class should be modified to use facebook_id instead. Otherwise, the ID is not saved or loaded properly from the database.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GuyPaddock’s picture

Status: Active » Needs review
FileSize
523 bytes

The attached patch corrects the typos.

  • e0ipso committed 4217010 on 7.x-1.x authored by GuyPaddock
    Issue #2327435 by @GuyPaddock: Mismatch for Facebook ID field name and...
e0ipso’s picture

Status: Needs review » Fixed

@GuyPaddock Thanks a lot for contributing. Sorry it take so long to commit.

GuyPaddock’s picture

No problem. Thanks!

Status: Fixed » Closed (fixed)

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