Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get this error:
Notice: Undefined variable: keys in metatags_quick_page_build() (line 187 of /-/.....PATH_TO_SITE....../sites/all/modules/metatags_quick/metatags_quick.module).
When viewing a Panel page with a View inside .....
Any idea?
Comment | File | Size | Author |
---|---|---|---|
#21 | incorrect-multi-path-1194896.patch | 4.38 KB | valthebald |
#7 | 1194896-load-only-entities.patch | 524 bytes | valthebald |
Comments
Comment #1
moonpool CreditAttribution: moonpool commentedI get the same with the alpha-3 release
Comment #2
JOINSO CreditAttribution: JOINSO commentedThere is no problem with another Panel Pages.
In my case the problem is in a Panel Page with a View block inside...
Is your case?
Regards!
Comment #3
JOINSO CreditAttribution: JOINSO commentedHi!
I just make some debuggin on the module and i find this.
$keys is never defined in Panel Pages (almost in my case).
And why some Panel Pages works and others no?
The problem is that function:
_metatags_quick_fieldable that returns an array in some Panel Pages and a empty one in anothers....
When return the empty one everything goes fine, but not when returns with the type...., because found after the problem with $key....
I'm going to continue studying to find the underlying problem....
Regards!
Comment #4
JOINSO CreditAttribution: JOINSO commentedHi!.....
When i'm debugging i see a special behaviour:
In the case of a Panel Page with a View block inside, the function
_metatags_quick_fieldable is called first with type "node". In this case we see the error of the issue....
In a Panel Page without a View block inside...., _metatags_quick_fieldable is never called with type "node" ....
Any idea?
Regards!
Comment #5
john.oltman CreditAttribution: john.oltman commentedI get this in both alpha3 and dev, immediately after installing the module into a fresh 7.2 site. It appears at the top of the module list page. I've not defined any meta tag fields yet, just enabled the module and got the notice.
Comment #6
JOINSO CreditAttribution: JOINSO commentedI think that the problem is in Views, exactly with this function:
$keys = array_keys($router_item['load_functions']);
Where is any page with views inside, the module are called more than one time.... at least one for the page and another for the view.... and the fails....
Regards!
Comment #7
valthebaldI wanted to include that with other changes to the next release, but seems there are too many problems with this issue.
In metatags_quick_page_build() function menu object must be loaded, only if current page is an entity view page
(which is not the case).
Please use attached patch (or change line 185 from
if (!$fieldable_entity) {
to
if ($object_loadable && !$fieldable_entity) {
Comment #8
john.oltman CreditAttribution: john.oltman commented#7 worked for me, thanks much
Comment #9
JOINSO CreditAttribution: JOINSO commentedHi!
THis patch only avoids the problem....
But in this cases, the meta tags doesn't show.....
Regards!
Comment #10
amanaplan CreditAttribution: amanaplan commentedsubscribing
Comment #11
valthebaldComment #12
JOINSO CreditAttribution: JOINSO commentedHi, valthebald....
I'ts not fixed, in that cases when the error is present (keys not defined), meta tags are not showed.
Regards!
Comment #13
valthebaldIn alpha4 there is no 'keys' check. On what line do you get an error?
Comment #14
JOINSO CreditAttribution: JOINSO commentedIn normal Panel pages, meta tags works normal, but when i have a Panel Page, with a View block inside, then it seems that the module tries to check meta tags for the view..... in this case, meta tags are not showed.
Here is the page that doesn't work: http://beta.bicisprint.com/es/club/noticias/
and here one that works: http://beta.bicisprint.com/es/club/
Regards!
Comment #15
valthebaldI've tried to do the same - views block inside panels page. Worked fine.
Need more info, could not reproduce
Comment #16
moonpool CreditAttribution: moonpool commentedalpha-4 has fixed this for me
Comment #17
JOINSO CreditAttribution: JOINSO commentedOk, tomorrow i will try alpha-4 and make some tests.
Regards!
Comment #18
JOINSO CreditAttribution: JOINSO commentedDoesn't work alpha-4
This works: http://beta.bicisprint.com/club/
and this doesn't work:
http://beta.bicisprint.com/es/club/noticias/
Regards!
Comment #19
valthebaldOk, I managed to reproduce the problem. Most chance it comes from double URL-escaping of the path ('club/noticias') - first it is transformed to club%2Fnoticias, and then to club%25252noticias.
This is a definite bug, patch coming later
Comment #20
JOINSO CreditAttribution: JOINSO commentedThanks, valthebald!
We wait for the patch!
Regards!
Comment #21
valthebaldComment #22
JOINSO CreditAttribution: JOINSO commentedHi, valthebald!
The patch doesn't work for me.
When i'm on the Panel Page, i see "Meta Tags (quick) settings" link, and when i click i go to Config for Meta tags, no to edit the meta tags of the Panel Page....
Regards!
Comment #23
valthebaldYou absolutely need to clean drupal cache after applying the patch. "Meta Tags (quick) settings" link means that menu system does not see (updated) menu handlers
Comment #24
JOINSO CreditAttribution: JOINSO commentedHi!
It seems to works!
Thanks!