Deprecated, please use https://www.drupal.org/project/publication_date instead
1
stars
5
forks
source link
Recoverable fatal error: Object of class Drupal\Core\Field\EntityReferenceFieldItemList could not be converted to string in publication_date_form_node_form_alter() (line 94 of modules/contrib/publication_date/publication_date.module). #5
if (isset($form['published_at'])) {
// Check if the user has permission to edit the publication date.
$form['published_at']['#access'] = $account->hasPermission('set any published on date') || $account->hasPermission('set ' . $node->type . ' published on date');
$form['published_at']['#group'] = 'revision_information';
}
Solution : Replace $node->type with $node->bundle().
Solution : Replace $node->type with $node->bundle().