Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

550 drupal 7 does not import author name email #551

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/jekyll-import/importers/drupal7.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ def self.build_query(prefix, types, engine)
n.created,
n.status,
n.type,
u.name,
u.mail,
#{tag_group}
FROM #{prefix}node AS n
LEFT JOIN #{prefix}field_data_body AS fdb
ON fdb.entity_id = n.nid AND fdb.entity_type = 'node'
RIGHT JOIN #{prefix}users AS u
ON u.uid = n.uid
WHERE (#{types})
QUERY

Expand Down
4 changes: 4 additions & 0 deletions lib/jekyll-import/importers/drupal8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ def self.build_query(prefix, types, engine)
n.created,
n.status,
n.type,
u.name,
u.mail,
#{tag_group}
FROM #{prefix}node_field_data AS n
LEFT JOIN #{prefix}node__body AS nb
ON nb.entity_id = n.nid
RIGHT JOIN #{prefix}users AS u
ON u.uid = n.uid
WHERE (#{types})
QUERY

Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-import/importers/drupal_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def process(options)
data, content = post_data(post)

data["layout"] = post[:type]
data["name"] = post[:name]
data["mail"] = post[:mail]
title = data["title"] = post[:title].strip.force_encoding("UTF-8")
time = data["created"] = post[:created]

Expand Down