Since Google+ has been shut down as of April 2019, does the Metatag: Google+ submodule serve any purpose?

If not, it could be removed.

Remaining tasks

  • Update stored configuration.
  • Update per-entity values.
  • Update script to uninstall the module

Issue fork metatag-3065441

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solideogloria created an issue. See original summary.

DamienMcKenna’s picture

Title: Remove Metatag: Google+? » Remove Metatag: Google+

Agreed.

DamienMcKenna’s picture

Removing modules gets tricky. We'll need to have an update script to uninstall the module, remove all values from configuration and entities, and blanking out some of the files, which we'll actually remove later.

DamienMcKenna’s picture

Title: Remove Metatag: Google+ » Remove Metatag: Google Plus

eelkeblok made their first commit to this issue’s fork.

eelkeblok’s picture

In the issue fork I added two update hooks to the main module, the second of which is incomplete. I suppose we will also need a post_update hook to clean up content (make sure we only save config or content when it was actually updated, since this sort of stuff can take a while).

DamienMcKenna’s picture

Status: Active » Needs work

This is a good start, thank you.

The second update script needs to be refined to:

  • Have one update script for updating the default configurations; this one doesn't need a sandbox.
  • Another update script that modifies entity values stored in Metatag fields; this does need to use a sandbox.

I'm not sure how D8 handles things being deleted before the respective plugins are uninstalled, I'd be concerned at it blowing up sites. As such I think we should make the module "hidden" and physically delete the files later.

DamienMcKenna’s picture

Title: Remove Metatag: Google Plus » Remove Metatag: Google Plus (D8)
DamienMcKenna’s picture

Let's get this into Metatag 2.0.0.

DamienMcKenna’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
9.3 KB

WIP patch based upon the PR. This needs work to update the configuration and update the per-entity values.

DamienMcKenna’s picture

Issue summary: View changes
DamienMcKenna’s picture

Status: Needs review » Needs work

Needs work to finish the update scripts.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
12.6 KB

WIP on the update scripts and test coverage. Skipping test coverage, for now.

DamienMcKenna’s picture

Assigned: Unassigned » DamienMcKenna

Working on this.

DamienMcKenna’s picture

DamienMcKenna’s picture

So the update scripts don't work if metatag_google_plus has been removed already, so we might need to delete the files later in order to do the update script. Either that or move the update scripts to 8.x-1.x and delete the files in 2.0.x. Decisions, decisions.

DamienMcKenna’s picture

Does this patch apply cleanly?

solideogloria’s picture

The patch applies. However, I no longer use this module, so I have no way to test if the update script works.

DamienMcKenna’s picture

Oh, the patch doesn't apply because of the fixture file. Dangit.

  • DamienMcKenna committed cbe7b574 on 2.0.x
    Issue #3065441 by DamienMcKenna: Updated Metatag-D8 fixture file.
    
DamienMcKenna’s picture

I committed the fixture change separately so that the tests can run.

DamienMcKenna’s picture

In order to avoid the conflict between configuration schema requirements and removing the files that contain the necessary schema, we might just have to skip testing the configuration changes. Or move the uninstall to 8.x-1.x and then remove the files in 2.0.x.

DamienMcKenna’s picture

Title: Remove Metatag: Google Plus (D8) » Disable, uninstall Metatag: Google Plus (D8)
FileSize
15.86 KB

Because we can't guarantee that everyone will have updated to the newest 8.x-1.x release before upgrading to 2.0.x, we cannot assume that the update scripts would have been executed before the files disappeared. Therefore we need to hide the module in v2 and then plan for them to be removed in v3. *sigh*

However, some of the tags could be removed.

DamienMcKenna’s picture

I can remove all of the tags and just leave the info file in place, that seems to work.

DamienMcKenna’s picture

Removing even more bits!

  • DamienMcKenna committed 9803c646 on 2.0.x
    Issue #3065441 by DamienMcKenna, eelkeblok, solideogloria: Disable,...
DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

DamienMcKenna’s picture

Assigned: DamienMcKenna » Unassigned
DamienMcKenna’s picture

Status: Fixed » Needs work

Need some follow-up to make the post-update script names to be generic so they can be reused for other tags that are being removed.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
4.07 KB

Renaming stuff.

  • DamienMcKenna committed 5e810d8d on 2.0.x
    Issue #3065441 by DamienMcKenna: Follow-up to make post-update scripts...
DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 1746b23c on 8.x-1.x
    Issue #3065441 by DamienMcKenna: Updated fixtures file with more Google...

  • DamienMcKenna committed bec490b2 on 2.0.x
    Issue #3065441 by DamienMcKenna: Updated fixtures file with more Google...
DamienMcKenna’s picture

Status: Fixed » Needs review
FileSize
3.16 KB

Needed to add more meta tags to the removal list.

  • DamienMcKenna committed 1e121c09 on 2.0.x
    Issue #3065441 by DamienMcKenna: Remove all four GooglePlus meta tags.
    
DamienMcKenna’s picture

Status: Needs review » Fixed

All done.

Status: Fixed » Closed (fixed)

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