First time I've had a 'need to roll back' problem upgrading the core, but I'm getting the following error when I do:

Fatal error: Cannot redeclare metatag_views_views_plugins() (previously declared in /home/customer/www/mysite.com/public_html/modules/metatag/metatag_views/metatag_views.module:21) in /home/customer/www/mysite.com/public_html/modules/metatag/metatag_views/metatag_views.views.inc on line 10

This is going from 1.22.0 to 1.22.2, after which (including the database update) - the site's completely broken and shows the above error.

I've rolled back for now out of necessity (site really needs to be up during working hours) - but I'm at a loss as to how to fix this issue moving forward.  Is there a compatibility issue with the metatags module?  I am using it (including the 'Metatag: Views' option) but there doesn't appear to be any updates for the metatags module - does it need to be disabled for the core update or what should I do here?

Any thoughts much appreciated - live site and I don't want to leave it up with missing core updates!

 

Accepted answer

@greenstick - this is a very easy (even for a novice) patch to apply.  Go to https://github.com/backdrop-contrib/metatag/pull/86/files and you can see that it is just removing the duplicated function.  You can just comment out that function in that location of the `metatag_views/metatag_views.module` and the update will work.

Most helpful answers

Thanks!  Can confirm problem is solved by updating with your new release first before changing core.

I made a new release of Metatag, including the fix mentioned by @yorkshirepudding. You should be able to upgrade to fix the problem.

https://github.com/backdrop-contrib/metatag/releases/tag/1.x-1.22.2

Comments

This seems to be a known bug in the contrib module "Metatag":
https://github.com/backdrop-contrib/metatag/issues/67

There seems to be a patch (Pull Request) to fix the problem. Is that something you can use?

Otherwise, I expect this to be fixed in the next bugfix release. I'll put this issue on the agenda for the weekly Backdrop CMS developer meeting. That might accelerate an official response.

https://forum.backdropcms.org/forum/aug-4th-weekly-meeting-agenda-items#...

Anyone can attend these meetings:
https://backdropcms.org/news/meetings

 

@greenstick - this is a very easy (even for a novice) patch to apply.  Go to https://github.com/backdrop-contrib/metatag/pull/86/files and you can see that it is just removing the duplicated function.  You can just comment out that function in that location of the `metatag_views/metatag_views.module` and the update will work.

Thank you both!  I have to wait until after business hours to give it a shot but sounds simple enough based on your answers. 

Much appreciated.

Thanks!  Can confirm problem is solved by updating with your new release first before changing core.