I made this module http://drupal.org/sandbox/L-four/1603672 for one of my clients so they could quickly update there metatag using views bulk operations.

I made this Issue to merging this views bulk operations functionality with the core metatag module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

L-four’s picture

Title: Add support views bulk operations for mas updating metatags » Add support views bulk operations for mass updating metatags
FileSize
4.13 KB
L-four’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, metatag-merging metatag_vbo into metatag-1624266.patch, failed testing.

L-four’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, metatag-merging metatag_vbo into metatag-1624266.patch, failed testing.

L-four’s picture

I am guessing test bot doesn't like spaces, TT _ TT

L-four’s picture

Status: Needs work » Needs review
DamienMcKenna’s picture

Status: Needs review » Needs work

Good idea. Two things I'd like to see:

  • Please test it using the basic Drupal admin pages to ensure the actions work without the VBO module.
  • Rewrite it as a patch to the main Metatag module.
Jawi’s picture

This would be a nice feature!

any progress on testing?

Dave Reid’s picture

It would be nice if this could re-use metatag_metatags_form() which handles all the logic of filtering out values which match the default configuration for the entity. I feel like this patch is potentially duplicating a lot of code. Also agreed that this should be easy to support from the main module. Does VBO support placing its hooks inside a sub-file like metatag.vbo.inc using hook_hook_info()?

DamienMcKenna’s picture

Component: Code » Views integration
Issue summary: View changes
sahaj’s picture

This is really a must-have feature for some projects. Unfortunately, I'm getting 'An illegal choice has been detected. Please contact the site administrator.' error caused by the Robots (Advanced tags) showing '0 0 0 0 0 0 0 0 0 0'.

If I left the field empty, it don't works too. Does somebody have a fix or a workaround?

(I'm using Metatag 7.x-1.10)

sahaj’s picture

I noticed the lines 36-40 in metatag_vbo.module:

function metatag_vbo_metatag_info_alter(&$info){
  if (!empty($info['tags']['robots'])) {
    $info['tags']['robots']['form']['#type'] = 'checkboxes'; // bug in  metatag module i think
  }
}

and don't know if there is mistake there or in metatag module, but it don't do the job.

Any help is welcome.

geoffreyr’s picture

I'm looking at doing a bit of work on this. Just wondering, as far as determining a language code for localisation goes, should we derive it at entity save time, or explicitly set a language code at the form stage?

errand’s picture

Hello sahaj,
i had the same problem when i installed this module.
You wouldn't believe me but i just changed 'checkboxes'; to 'checkbox'; resaved and of course nothing happened, BUT when i changed it back and flushed caches it worked! SO ITS WORKING

But now i'm having another issue: after updating the metatags, i have to update nodes manually because node_save doesn't update metatags...

angrytoast’s picture

Status: Needs work » Needs review
FileSize
4.91 KB

There hasn't been much activity on this issue, so I took some of the work already done in the previous patches and addressed some feedback listed above:

  • Rewrite it as a patch to the main Metatag module.
  • Re-use metatag_metatags_form() within the views bulk operation.

This changes the metatag update logic within the bulk operation action to merge array() like values, such as the robots tags.

I'm actually not sure how actions work with Drupal core so I was unable to test that part.

castelar’s picture

Patch in #16 works for me! Really appreciate this @angrytoast @L-four and all that helped.

DamienMcKenna’s picture

Status: Needs review » Fixed
Parent issue: » #2891956: Plan for Metatag 7.x-1.23 release

Committed. Thanks!

DamienMcKenna’s picture

Assigned: L-four » Unassigned

Status: Fixed » Closed (fixed)

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