I have "Fatal error: Call to undefined function db_resultl() in weblinks.module on line 761" when i open http://www.mysite.org/?q=weblinks

I replace:

$unclassed_count = db_result(_weblinks_get_query(0, 'count'));

by

$unclassed_count = db_query(_weblinks_get_query(0, 'count'))->fetchField();

Is it ok ?

Comments

ballombert’s picture

Title: Fatal error: Call to undefined function db_resultl() in weblinks.module on line 761 » Fatal error: Call to undefined function db_result() in weblinks.module on line 761
Starminder’s picture

Priority: Major » Critical

Fatal error: Call to undefined function db_result() in /home/hoslot5/public_html/sites/all/modules/weblinks/weblinks.module on line 761

Starminder’s picture

Also getting this when trying to check for updates:

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?render=overlay&id=591&op=do StatusText: OK ResponseText: {"status":true,"percentage":"14","message":"Trying to check available update data ...\u003cbr \/\u003eChecked available update data for \u003cem class=\"placeholder\"\u003eLibraries\u003c\/em\u003e."} Fatal error: Call to undefined function db_fetch_object() in /home/hoslot5/public_html/sites/all/modules/weblinks/contribs/weblinks_checker/weblinks_checker.module on line 323

LarryTX’s picture

I'm getting a similar result in:

Fatal error: Call to undefined function db_result() in F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module on line 192

I notice that db_result is used multiple times in weblinks.module. It appears that it's removed in Drupal 7 (http://api.drupal.org/api/drupal/includes--database.pgsql.inc/function/d...) and replaced by:

$val = db_query({...})->fetchField();

I'd love to post a patch, but (a) I want to be sure I'm on the right track and (b) I'm not up on how to do such things. (If anyone can give a resource for learning about creating and using patches in the Windows environment, it would help me along toward doing such things!)

Just a bit later

Actually, I tried replacing db_result() with db_query() in the way suggested above. It's clearly not as simple as that because it produced the following error message:

    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Use of undefined constant FILTER_FORMAT_DEFAULT - assumed 'FILTER_FORMAT_DEFAULT' in weblinks_get_tree() (line 739 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Use of undefined constant FILTER_FORMAT_DEFAULT - assumed 'FILTER_FORMAT_DEFAULT' in weblinks_get_tree() (line 739 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Use of undefined constant FILTER_FORMAT_DEFAULT - assumed 'FILTER_FORMAT_DEFAULT' in weblinks_get_tree() (line 739 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Undefined index: path in weblinks_init() (line 91 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    Notice: Use of undefined constant FILTER_FORMAT_DEFAULT - assumed 'FILTER_FORMAT_DEFAULT' in weblinks_get_tree() (line 739 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).
    PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "meme_vocabulary" does not exist LINE 1: SELECT vid FROM meme_vocabulary WHERE module='weblinks' ^: SELECT vid FROM {vocabulary} WHERE module='weblinks'; Array ( ) in _weblinks_get_vocid() (line 192 of F:\xampp\htdocs\memehope\sites\all\modules\weblinks\weblinks.module).

Oh well, Drupal has a way of humbling those of us who think they've go it wired.

nancydru’s picture

LarryTx: go to the project page and click on "Version control".

nancydru’s picture

Status: Active » Closed (duplicate)

At the moment there is no real "D7 build" - it is just a non-functional branch. Therefore, this issue is a duplicate of #1362878: Port Weblinks to D7.