I run corn and then I noticed the error message as follow at Reports/recent log messages

Notice: Undefined property: stdClass::$module in _linkchecker_add_block_custom_links() (line 916 of C:\wamp\www\sites\all\modules\linkchecker\linkchecker.module).

CommentFileSizeAuthor
#3 screenshot.png28.94 KBDrupalDan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

Status: Active » Postponed (maintainer needs more info)

Are you really running latest DEV?

hass’s picture

This cannot happen at cron time. Please describe how to repro.

DrupalDan’s picture

FileSize
28.94 KB

Yes, I'm pretty sure I'm running the latest dev version as I downloaded it eariler today. I did nothing partcular, just followed the routine: install, enable, and configure. As far as configuration, I just checked the content types for scanning and set Check interval for links 1 day and left everything as default. To be sure everything is ok I went to reports to see if there was any error reported there, and then I found it.

I think that's pretty much the whole process. Attach a screenshot for your information.

Thanks

hass’s picture

First of all. Set the check interval back to 4 weeks, please. I should remove this bullshit setting.

Please also add the lines documented in http://drupal.org/node/1603782#comment-6049218 and run the clear all button on the bottom of the settings page. Your screenshot shows it happened in a batch, not cron.

Thanks for reporting back. Block module suxxx more and more...

DrupalDan’s picture

Hi hass, thanks for your response. After adding the lines, does it look like this?

function _linkchecker_add_block_custom_links($block_custom, $bid, $skip_missing_links_detection = FALSE) {
  // Convert custom block array to object.
  $block_custom = (object) $block_custom;
  var_dump($block_custom);
  var_dump($bid);

  // Custom blocks really suxxx as it's very inconsistent core logic (values are
  // integers or strings) and there are no usable hooks. Try to workaround this
  // bad logic as good as possible to prevent warnings/errors.
  // @todo: Only custom blocks from block.module are supported. Skip all others.
  if ($block_custom->module != 'block' || !is_numeric($block_custom->delta) || !is_numeric($bid) || $block_custom->delta != $bid) {
    return;
  }
hass’s picture

Status: Postponed (maintainer needs more info) » Fixed

This was a far larger fix than I expected, but I found the reason, refactored the logic and fixed the bug. There is no need to backport to D6. Would be great to hear; if this fixed the issue for you.

Commit: http://drupalcode.org/project/linkchecker.git/commit/a920eb0

DrupalDan’s picture

Hi hass, I just downloaded the latest dev version and after I run cron, the system didn't throw that error message anymore, so I think that means the issue has been fixed. Thank you very much for the effort.

hass’s picture

Thanks a lot for your feedback!

Status: Fixed » Closed (fixed)

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