The Site Meta module provides a flexible and easy method to set meta tags, such as page title, description, and keywords for nodes, views and other different pages. It also creates a field on node edit form to add custom meta for this node.

Project Link

https://www.drupal.org/project/sitemeta

Git instructions

git clone --branch 8.x-1.x https://git.drupal.org/project/sitemeta.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-sitemeta.git

Comments

nkoporec created an issue. See original summary.

nkoporec’s picture

Issue summary: View changes
nkoporec’s picture

Status: Active » Needs review
avpaderno’s picture

Category: Bug report » Task
Issue summary: View changes
avpaderno’s picture

Status: Needs review » Needs work

Thank you for your contribution! May you describe the difference between this project and the Metatag module?

nkoporec’s picture

Hi,

Well the main difference is that it offers less options and because of that is easier to use and the UI is less complicated. It is a clone of the same module for Drupal 7 called Simple Meta.

nkoporec’s picture

Status: Needs work » Needs review
abhishek.kumar’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. However there is some indentation issue in function sitemeta_form_node_form_validate. But I think this module is good enough to covered in security advisory coverage.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs work

There are just two points I find unclear.

/**
 * Implements hook_form_BASE_FORM_ID_alter().
 *
 * {@inheritdoc}
 */
function sitemeta_form_node_post_edit_form_alter(&$form, FormStateInterface $form_state) {
}

{@inheritdoc} is not used for hooks.
What form should that hook alter?

/**
 * Custom submit to save or update sitemeta entity.
 *
 * @param array $form
 *   Form object.
 * @param \Drupal\Core\Form\FormStateInterface $form_state
 *   Current form state.
 *
 * @throws \Drupal\Core\Entity\EntityStorageException
 */
function sitemeta_form_node_form_submit(array $form, FormStateInterface $form_state) {
}

That submission handler has not been added from a hook_form_alter(), hook_form_FORM_ID_alter(), or hook_form_BASE_FORM_ID_alter()implementation, so it would not be invoked.

strozx’s picture

StatusFileSize
new70 bytes

Hi, I wrote a patch that addresses the issues written above.

avpaderno’s picture

The task of reviewers is reviewing code, not providing patches to fix what reported by other users.

avpaderno’s picture

Issue summary: View changes
nkoporec’s picture

Status: Needs work » Needs review

This has been now fixed in the latest release. Thank you for reviewing!

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Needs review » Reviewed & tested by the community
/**
 * Implements hook_help().
 *
 * {@inheritdoc}
 */

{@inheritdoc} is not used for hooks.

  // Make sure we are on editing form.
  if ($node->isNew()) {
    return;
  }

Why would the code only change the node edit form when a node is edited, and when not a node is created. The settings make sense in both the cases.

  $form['sitemeta_settings'] = [
    '#type' => 'details',
    '#title' => t('Custom meta'),
    '#open' => FALSE,
    '#group' => 'advanced',
    '#access' => TRUE,
    '#weight' => 100,
  ];

#access is not necessary, in that case.

    $this->set('status', $published ? TRUE : FALSE);

It would be simpler to use $this->set('status', (bool) $published);.

I didn't find any security issue. I am going to approve this application in the next hours.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

Status: Fixed » Closed (fixed)

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