In the preview of the default content type "article", I get this error :

Notice: Undefined property: stdClass::$field_tags in _linkchecker_parse_fields() (line 1541 of .../linkchecker/linkchecker.module).

Comments

hass’s picture

Thanks for your report. Are you able to debug what field type causes this issue? I have not seen this myself yet, but I may missed this as I'm not using preview very often. field_tags is not something from linkchecker, too.

1539 foreach (field_info_instances($entity_type, $bundle_name) as $field_name => $instance) {
1540   $field = field_info_field($field_name);
1541   $entity_field = $entity->$field['field_name'];
1542
1543   switch ($field['type']) {

A repro plan on a new system would be great.

hass’s picture

Status: Active » Postponed (maintainer needs more info)
tobiasb’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

field_tags is the default field in article, but I can not reproduce.

evelien’s picture

Status: Closed (cannot reproduce) » Active

I do have the same problem. It happens will adding content. The error appears for empty reference fields. It only happens while adding the content, not while editing.

hass’s picture

@evelien: Thanks for your report. Are you able to debug it to it's root cause, please? Please also note your core versions.

federico’s picture

Same issue here, only when adding new content without tags. If I add new content with tag, issue doesn't appear.

Drupal 7.21
Link checker 7.x-1.1

hass’s picture

Status: Active » Needs review
StatusFileSize
new1.28 KB

This patch adds a workaround for this notice. For me it's not clear what core is doing here with the tags field. It may be a core bug as the tags field is completely missing in the entity if the form has been submitted with an empty tag list. This requires this bad catch logics.

I'm going to open a core issue to get an idea if this is a core fault or linkchecker need to expect this. If someone knows why - shed some light, please.

Status: Needs review » Needs work

The last submitted patch, linkchecker_Notice+Undefined+property+stdClass+field_tags.patch, failed testing.

hass’s picture

hass’s picture

Just for the notes. These notice is functionality wise harmless. Nothing is or get's broken.

hass’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

anybody’s picture

Same problem here with the current stable.

Would it perhaps make sense to release a new stable version? The patch works great for me!

Anonymous’s picture

I agree with @Anybody. Please release a new stable version with this fix. Thanks!

ndobromirov’s picture

Re-roll of the patch in #10 to apply against the current stable version of the module: 1.1.

kristen pol’s picture

Status: Closed (fixed) » Reviewed & tested by the community

#15 is working for me. Thanks.

kristen pol’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Whoops. Didn't mean to reopen.

k-mo’s picture

10# Works, thanks :)

diakon333’s picture

Status: Closed (fixed) » Needs review

Status: Needs review » Needs work
hass’s picture

Issue summary: View changes
Status: Needs work » Closed (fixed)
ddod’s picture

Re-roll of the patch from #15 to apply against the current 7.x-1.x branch.