I have noes with related links defined, and they are fine until there are two language pages. As soon as I create the second language page my links on the first page are lost. Is this a known problem?

Comments

walwyn’s picture

Status: Active » Closed (fixed)

Grrr. This seems to be a pathauto problem. If I turn off the node alias updates the links are retained.

walwyn’s picture

Status: Closed (fixed) » Active

Sorry I should have got back to this earlier, the problem persists even if the node alias updates are turned off.

I just have MANUAL links enabled.

Suppose I have a two pages in a translation group (node:20, and node:30) then when one of the pages is updated relatedlinks_nodeapi() is called on both nodes. For example suppose node:20 is updated the sequence of calls to the relatedlinks_nodeapi() function

node: 20 load
node: 20 validate
node: 20 presave
node: 20 update
node: 30 load
node: 30 presave
node: 30 update 

The upshot is that whatever manual links had been set for node:30 are lost. The reverse happens in node:30 was is the page that is updated:

node: 30 load
node: 30 validate
node: 30 presave
node: 30 update
node: 20 load
node: 20 presave
node: 20 update 

and any manual links set for node:20 are lost. It seems that the second time through:

            case 'insert':
              // Handle manual links.
              if (_relatedlinks_get_type_property(RELATEDLINKS_MANUAL, 'enabled')) {
                preg_match_all('#\s*([^\ \s]+)\ *(.*)$#im', $node->relatedlinks_fieldset['relatedlinks'], $matches);
                $links = _relatedlinks_check_links($matches[1], $matches[2]);
                _relatedlinks_add_links($node->nid, $links, RELATEDLINKS_MANUAL);
              }

Doesn't work as the updates that are being called on the translation node groups $node->relatedlinks_fieldset['relatedlinks']' is empty. How to fix this?

Zen’s picture

Somebody who has experience with multilinguality needs to look at this.

-K