link is not getting imported to url_alias table

Created on 13 April 2017, about 8 years ago
Updated 26 November 2024, 5 months ago

When importing from a WXR file with path module enabled, link values for pages and posts are not getting imported as url alias. Path value for these items is empty. The link xml element is present in the correct place in the WXR and I have selected "Set path aliases to their original WordPress values"

After reviewing the code, the cause is that when adding the path/link field mapping (_construct method of wordpress_item.inc) the xpath has been omitted.

I will post a patch for this shortly. If this patch doesn't fit your version, look for
switch ($this->arguments['path_action'])
and in case 1:, change
$this->addFieldMapping('path', 'link');
to
$this->addFieldMapping('path', 'link')->xpath('link');

πŸ› Bug report
Status

Closed: outdated

Version

2.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Lams

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024