I'm using latest dev version of views and dev version of location. When I have a view with Location: Distance / Proximity block attached to the node I got this error:

warning: Missing argument 1 for views_handler_argument::get_value(), called in \home\mydomain.loc\www\sites\all\modules\location\location.views.inc on line 517 and defined in Z:\home\mydomain.loc\www\sites\all\modules\views\handlers\views_handler_argument.inc on line 795.

Any help is highly appreciated.

In http://drupal.org/node/1122728 similar problem was described and views' guys said that is the issue for that a module which has made a call to Views in an incorrect way.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gdbwb05’s picture

I have this problem to. Is it a Views issue though?

gittosj’s picture

Looking at this, I think its probably a simple fix as suggested in this discussion on the 'Signup' module:

http://drupal.org/node/1122906#comment-4833108

We need to pass a null argument to the proximity view as its called so suppress the error message. AFAIK this is a 'warning message bug' rather than an actually issue with functionality since all my proximity blocks and pages work fine but the error message is generated:

I think its the lines in views/handlers/views_handler_argument.inc that start:


/**
793    * Get the value of this argument.
794    */
795   //function get_value(NULL, $field = NULL) {
796   function get_value($values, $field = NULL) {
797     // If we already processed this argument, we're done.
798     if (isset($this->argument)) {
799       return $this->argument;
800     }

that need tweaking but none of my unskilled attempts have worked - anyone able to have a look. I'll offer a $100 bounty to fix it if anyone cares to add to that? Views3 adds a lot of useful functions I'd like to use on a production site but this is a blocker.

Sinovchi’s picture

Status: Active » Needs review

It seems I found a solution.
change the line 518 in location.views.inc

old line
$nid = $nodehandler->get_value();
new code
$nid = $nodehandler->get_value(NULL);

Sinovchi’s picture

This solution is working for me. Please, confirm if it is also working for you.

gittosj’s picture

Definitely is! I tried something similar but called it in the wrong place - much appreciated - pm me for the bounty. Can you roll it as a patch so we can pass it to the maintainers?

Sinovchi’s picture

OK, I'm not at my desk now so I'll submit a patch later, in the next week.

rutiolma’s picture

A very good solution!!

Sinovchi’s picture

Here is the patch for #3

gittosj’s picture

Hi Biarr

Sorry for the delay and thanks for the patch - I've sent you an email on the bounty - speak later

podarok’s picture

Status: Needs review » Active

bot recall

podarok’s picture

Status: Active » Needs review

bot

podarok’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs review » Fixed

#8 commited pushed to both 6.x-3.x and 7.x-3.x branches
Thanks!

Status: Fixed » Closed (fixed)

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