When accesing nodes without related links, an error appears:

Notice: Trying to get property of non-object en _relatedlinks_update_discovered_links() (línea 651 de E:\uniserver\www\comfacauca\sites\all\modules\relatedlinks\relatedlinks.module).

Comments

madri2’s picture

i modified the line from:
$links = _relatedlinks_get_discovered_links($node, $tracker->keywords);
to
$links = _relatedlinks_get_discovered_links($node, $tracker?$tracker->keywords:null);

i don't know if it's correct but i don't have the error anymore

however, it didn't shows me any similar object

leyan’s picture

I had the same notice after installing kcfinder and inserting images in pages with wysiwyg & ckeditor.
'Trying to get property of non-object in locale_language_url_rewrite_url()'
I read elsewhere that this comes from the url() function that needs a language object.

To remove that notice, I changed the kcfinder_library_path_url() function as follows :

from

function kcfinder_library_path_url() {
	return url(variable_get('kcfinder_library_path'), array('absolute' => TRUE, 'language' => FALSE));
}

to

function kcfinder_library_path_url() {
	return url(variable_get('kcfinder_library_path'), array('absolute' => TRUE));
}

and the notice disappeared.

mesr01’s picture

@madri2, have you tried : $links = _relatedlinks_get_discovered_links($node, isset($tracker->keywords) ? $tracker->keywords : null); ?

madri2’s picture

i tried :
$links = _relatedlinks_get_discovered_links($node, $tracker?$tracker->keywords:null);
which is almost the same and it seems to work

Zen’s picture

Status: Active » Fixed

Thanks for the report. This has been fixed.

-K

Status: Fixed » Closed (fixed)

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