For each block I enable I get the following:

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/openbior/public_html/run/modules/relatedlinks/relatedlinks.module on line 144.
warning: Invalid argument supplied for foreach() in /home/openbior/public_html/run/modules/relatedlinks/relatedlinks.module on line 727.

Not sure if this is something I did wrong but I can not get any block to show.

CommentFileSizeAuthor
#10 rl_settings.png35.97 KBAnonymous (not verified)

Comments

Zen’s picture

Status: Active » Postponed (maintainer needs more info)

PHP version?

-K

Kevin Ott’s picture

I get the same error. I'm using Drupal 4.7.4. PHP version is 5.1.6.

Kevin Ott’s picture

It looks like the second argument is null. I changed two occurances of this:

$links = array_merge($links, $node->relatedlinks[$type]);

to this:

    if (isset($node->relatedlinks[$type])) {
        $links = array_merge($links, $node->relatedlinks[$type]);
    }

and the problem goes away.

Zen’s picture

Version: 4.7.x-2.0 » master
Status: Postponed (maintainer needs more info) » Fixed

Committed to HEAD (which is 4.7 and can be downloaded from the project page). A new release for 4.7 should be coming RSN.

Please test and reopen if necessary.

Thanks guys.

-K

Anonymous’s picture

1.46 works for me, thanks!

Anonymous’s picture

Actually, the errors are gone, but I can't make the block for discovered links to show up either. Parsed links block works, though. The admin panel shows the active link type "parsed links" only. It is unclear to me how to add another link type (e.g. discovered links) and how to make them show up in a block. The block section only has one block available, for parsed links.

Thanks for the help,
Stephan

Anonymous’s picture

1.48 is displaying those PHP errors, so I tried both 1.46 and HEADS. Althoughte the PHP errors are gone, I too can't figure out how to display the block.

Also I had a hard time understanding what the whole "Link Types" option in the admin section. Do they control the different types of link blocks? And is the link type "m" the default Related link block? Then shouldn't the discovered links block also be there?

Thanks

Anonymous’s picture

Status: Fixed » Active

Marking bug as 'active' again, since title mentions 'block not shown', too, which has been confrmed by three people. I've forgotten to mention the php version I'm running: 5.0.4 on FreeBSD

The block I'm able to display is "Related links: Parsed links". It is unclear to me how to make the block displayed which lists links of related taxonomy terms. The related links admin note says: "These are the controls for specific link types." Since it uses the plural (types) I expect I am able to "add" a link type, but I don't know how. Switching the tab to "discovered links" allows me to configure criteria etc. but no option is either shown on this page nor on the previous page which makes another block available in the block admin menu. Furthermore, taxonomy related links are not shown in the parsed links block (which sounds reasonable).

Thanks for your help!
Stephan

Zen’s picture

Can you please provide the following:

a) A screenshot of your admin/relatedlinks settings page.
b) From the variables database table, please extract the contents of any variables beginning with "relatedlinks". Please use code tags while pasting.

To fix this issue, you will very likely just have to delete the relatedlinks_types and relatedlinks_node_types variables from your variables database table. But before doing that, please provide the requested information.

Cheers!

Anonymous’s picture

StatusFileSize
new35.97 KB
SELECT *
FROM `variable`
WHERE `name` LIKE '%relatedlinks%'
AND `value` LIKE '%relatedlinks%'

MySQL returned an empty result set. Screenshot of settings page attached (German).

Thanks a lot!

dwoodwoo’s picture

Priority: Critical » Normal

I ran into this error as well. The bug fix noted in comment #3 fixed it for me. Thanks guys!!!

Zen’s picture

@rickauer:

SELECT *
FROM `variable`
WHERE `name` LIKE '%relatedlinks%'
AND `value` LIKE '%relatedlinks%'

should be

SELECT *
FROM `variable`
WHERE `name` LIKE '%relatedlinks%'

Thanks,
-K

Anonymous’s picture

Stupid me.

in relatedlinks_node_types
a:2:{i:0;s:4:"book";i:1;s:4:"page";}

in relatedlinks_types

a:1:{i:1;a:6:{s:4:"name";
  s:12:"Parsed links";s:7:"enabled";i:1;
  s:5:"block";i:1;s:5:"title";s:15:"Verwandte Links";
  s:3:"max";s:1:"5";s:6:"weight";s:1:"1";}}

in relatedlinks_discovered

a:5:{s:7:"ranking";a:2:{i:0;s:8:"taxonomy";i:1;s:4:"node";}
  s:12:"vocabularies";a:1:{i:0;i:1;}
  s:10:"node_types";a:2:{i:0;s:4:"book";i:1;s:4:"page";}
  s:8:"keywords";i:0;s:4:"cron";s:1:"1";}

Thanks!

Anonymous’s picture

I've now deleted relatedlinks_types and relatedlinks_node_types variables from the database but the block still doesn't show up. Any help is highly appreciated. Thanks.

Zen’s picture

Did you re-setup your relatedlink types in admin/relatedlinks (and enable the appropriate block in admin/block) after you deleted those variables? Please let me know.

Cheers :)
-K

Anonymous’s picture

Status: Active » Closed (fixed)

hehe, now I did exactly that and everything works. Perfect. Thanks a lot!

Stephan