Skip to content

Commit 406a987

Browse files
550 drupal 7 does not import author name email (#551)
Merge pull request 551
1 parent a8bdf68 commit 406a987

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

lib/jekyll-import/importers/drupal7.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ def self.build_query(prefix, types, engine)
3434
n.created,
3535
n.status,
3636
n.type,
37+
u.name,
38+
u.mail,
3739
#{tag_group}
3840
FROM #{prefix}node AS n
3941
LEFT JOIN #{prefix}field_data_body AS fdb
4042
ON fdb.entity_id = n.nid AND fdb.entity_type = 'node'
43+
RIGHT JOIN #{prefix}users AS u
44+
ON u.uid = n.uid
4145
WHERE (#{types})
4246
QUERY
4347

lib/jekyll-import/importers/drupal8.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ def self.build_query(prefix, types, engine)
3434
n.created,
3535
n.status,
3636
n.type,
37+
u.name,
38+
u.mail,
3739
#{tag_group}
3840
FROM #{prefix}node_field_data AS n
3941
LEFT JOIN #{prefix}node__body AS nb
4042
ON nb.entity_id = n.nid
43+
RIGHT JOIN #{prefix}users AS u
44+
ON u.uid = n.uid
4145
WHERE (#{types})
4246
QUERY
4347

lib/jekyll-import/importers/drupal_common.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def process(options)
9898
data, content = post_data(post)
9999

100100
data["layout"] = post[:type]
101+
data["name"] = post[:name]
102+
data["mail"] = post[:mail]
101103
title = data["title"] = post[:title].strip.force_encoding("UTF-8")
102104
time = data["created"] = post[:created]
103105

0 commit comments

Comments
 (0)