Closed (fixed)
Project:
Metatag
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2014 at 16:57 UTC
Updated:
23 Oct 2014 at 03:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
das-peter commentedI think the code there should be a bit more defensive.
What about attached patch?
Comment #2
FuXXz commentedIt seems to run.
One line broke the whole Page? Cron, clear cache, pathauto..all broken :(
Did they not test any stable releases? This isnt stable
Comment #3
matthieu_collet commentedwe have a lot of problems, last dev version was better.
I don't have metatag access in the views, the options disapears
Metatag VIews isn't working anymore, no specific tags for all views, and no more for specific views...
do you have the same problem ?
Comment #4
crozilla commentedSame problem here:
Recoverable fatal error: Argument 2 passed to metatag_metatags_view() must be of the type array, null given...Comment #5
jedsaet commented#1 fixed the error for me. +1RTBC.
Comment #6
ofry commentedComment #7
agoradesign commented+1RTBC
Comment #8
pkiff commentedThanks for the quick patch, das-peter! Had a minor crisis this morning when several sites broke after what appeared to be a routine update. Patch in #1 works for me too.
Comment #9
mikelutz#1 works for me. Hopefully a update will be release soon.
Comment #10
howdytom commentedversion 7.x-1.2 breaks our webpages too.
Recoverable fatal error: Argument 2 passed to metatag_metatags_view() must be of the type array, null given, called in /path/sites/all/modules/metatag/metatag_views/metatag_views.module on line 97 and defined in metatag_metatags_view() (Zeile 1005 von /path/sites/all/modules/metatag/metatag.module).Comment #11
lias commentedDitto fatal error with update to 7x1.2
Recoverable fatal error: Argument 2 passed to metatag_metatags_view() must be an array, null given, called in path\sites\all\modules\metatag\metatag_views\metatag_views.module on line 97 and defined in metatag_metatags_view() (line 1005 of path\sites\all\modules\metatag\metatag.module).Quick fix for me was to uninstall metatag views with this version.
Comment #12
CarmyDesign commentedWorked for me.
Comment #13
AmeDSL commented#1 works for me
Comment #14
damienmckennaFirst off, I'm really sorry about not testing pages that did not contain meta tags. I'm making this a critical issue and I'll have 1.3 out either today or tomorrow.
I'm going to go with this approach instead of the original as it allows the default "views" meta tags to be loaded if none have been assigned for the current page's view.
Comment #15
damienmckennaComment #16
damienmckennaClosed a duplicate: #2351163: Metatag Views critical error
Comment #17
biigniick commentedsame issue happened to me this morning. #14 patched and fixed v7.x-1.2 and dev just fine for me. as long as the test comes back ok, i think we're RBTC
- nick
Comment #18
pkiff commentedI tested the patch in #14 against same two sites that I patched this morning using #1, and #14 seems to work just as well in my cases.
Comment #19
das-peter commented@DamienMcKenna Definitely the better approach! I should have checked the behaviour of
metatag_metatags_view()in detail before patching.I've a question regarding the condition:
Do we need the
|| empty($metatags)part?Everything that isn't an array is set to
array().And if it's an array but empty (which means it's
array(), right?) we set toarray().Comment #20
kgaut commentedHi,
Same probleme here, patched successfully with #14.
Cheers
Comment #21
damienmckenna@das-peter: It may be overly cautious to use both http://php.net/is_array">is_array() and empty(), but in the interest of ensuring I don't break something else later ;) I felt it's better to ensure the string is an array. And no, empty() isn't just for arrays.
Comment #22
damienmckennaCommitted.
Comment #24
damienmckennaClosed another duplicate: #2351835: fatal error with metatag_metatags_view() since last update(1.2)
Comment #25
jaylotta commentedIs it possible to pull the release.
Comment #26
mloveridge17 commentedI updated my dev site with the patch and Views pages are no longer throwing the fatal error. But I'm not seeing anywhere on the Views UI to set Meta tags. The Page Settings section has just Path, Menu, & Access options. Can anyone point me to where I need to go to set a canonical for a Views page?
Comment #27
pkiff commented@mloveridge17
Make sure that you have the Metatag: Views sub-module enabled as well as the main Metatag module. When the sub-module is enabled, you should see a new "Meta Tags" section appear in a View, typically at the bottom of the middle column (the same column where you find the "Page Settings" section at the top).
Comment #28
matthieu_collet commentedAs @mloveridge17 I do'nt have Metatag options in views anymore, except for one or two views...
there is still bugs to fix :(
Comment #29
mloveridge17 commented@pkiff
First, thanks for responding so quickly!
Done... both enabled.
Nope... nothing new. In the middle column, I get the following:
PAGE SETTINGS (with Path, Menu, & Access), HEADER, FOOTER, & PAGER (with Use Pager & More Link).
I tried adding the patch to the metatags_views_plugin_display_extender_metatags.inc file found at https://www.drupal.org/node/2289139 but that didn't enable the metatags on the display as hoped.
Comment #30
pkiff commentedMmmm...it seems like you and matthieu_collet are right, there is still a bug in this. I have no idea what is going on, but for whoever is troubleshooting this, I seem also to have the problem described by mloveridge17 in #26 above and by matthieu_collet in #28.
On my two installations, only views that had overridden the default Metatag setting are showing the Meta Tags section. Pre-existing views with no custom meta tags set, or newly created page views, do not show the Meta Tags options. This appears to be the case for sites using both the patch in #1 and the patch in #14.
I think if someone else can confirm this bug, then we should move this back to status Needs work.
Comment #31
plazik commentedI don't have Metatag option in Views only if there are default metatags.
Comment #32
mloveridge17 commentedIt seems to me that the main topic of this thread has actually been fixed in that the module is no longer throwing the Fatal Error that was reported, but we now have uncovered a new bug which probably warrants its own thread? I'm far from an admin here, but I think moving these to a new thread would give this issue the visibility and attention it needs?
Oh, and I updated to 7x-1.3 and still no Metatag options on my Views UI... :(
Comment #33
Leeteq commentedRight, closing. Spun off new issue at:
#2353079: not seeing anywhere on the Views UI to set Meta tags
Comment #34
damienmckennaPlease take a look at the patch I posted in #2353079: not seeing anywhere on the Views UI to set Meta tags and let me know if it works. Thanks.