Hi,
I have enable shortest path block, and gives this error on front page.

warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/dtesting/sites/all/modules/buddylist2/buddy_api_shortestroute/buddy_api_shortestroute.module on line 134.

----
Sharique

Comments

nodestroy’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

are you displaying your shortest route block on every page? (and not only on users profile pages?)
how many users do you have?

regards,
dominik

sharique’s picture

I have just 2 uesrs, i'm testing module in local.
yes i'm displaying block on every page. Oooh this is the thing wrong?

jackspiv’s picture

Version: 5.x-1.x-dev » 5.x-1.0-beta1

When I enable shortest path block (following the instructions for placing the following PHP snippet in the block config)

   if (arg(0) && arg(0) == 'user' && arg(1) && is_numeric(arg(1)) && !arg(2)) { return TRUE; }
   

I get the following error when visit any userprofile page except my own. (I have admin privilege if that makes a diff)
If I disable the shortest path block, the error goes away.


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@services.matrixleadership.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Any Ideas????

jackspiv’s picture

Version: 5.x-1.0-beta1 » 5.x-1.0-beta2

Hi again,

Just tried loading beta2 and FWIW, the error goes away and block seems to work as intended showing up only on users profile pages.