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

Drupal 7 does not include author name/email in posts #550

Open
lyndseypadget opened this issue Oct 9, 2024 · 1 comment · May be fixed by #551
Open

Drupal 7 does not include author name/email in posts #550

lyndseypadget opened this issue Oct 9, 2024 · 1 comment · May be fixed by #551

Comments

@lyndseypadget
Copy link

OS: M1 apple chip macos, Sonoma 14.7
Ruby version: 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin23]
Jekyll version: 3.10.0
Jekyll import version: 0.24.0

Importer: drupal7

I am importing posts (nodes) from a Drupal 7 database. The local version of this DB is running in a Docker container, MySql 8.0.39.

Because the Drupal 7 blog contained thousands of posts from hundreds of authors, I need the author information. This can be found in Drupal's users table, and is cross-referenced by the uid of the node. I am not a Drupal expert but I believe this relationship (between the node and users table) is reliable in all cases, and that the users table should contain at least a name and email.

For my purpose, I only need u.name (where u is an alias to the users table, and the name value is in the format first.last). I can see how u.mail (which is email address) would also be helpful, though.

I know how to fix this, and I will make a quick PR. However, I am also not a ruby developer, and the instructions to test don't work for me because

  1. I cannot find script/console as described in the Contributing page and
  2. I get a make error for dependency hpricot-0.8.6. This is likely due to the fact that I'm on an M1 mac, or I need to do a custom install/build of hpricot, or something.

Given the simple nature of the change and the testing issues I'm facing, I am hoping that someone can guide me through the process of testing this, or provide a build for me to install and test. 🙏

lyndseypadget added a commit to lyndseypadget/jekyll-import that referenced this issue Oct 9, 2024
@lyndseypadget lyndseypadget linked a pull request Oct 9, 2024 that will close this issue
@parkr
Copy link
Member

parkr commented Oct 12, 2024

Hi! Thanks for the thoughtful issue and the pull request. Our tests and our contributing guidelines are quite old and subpar, apologies!

In general I think including the metadata about who wrote the post is a great idea. I haven't used drupal in a long time so I couldn't tell you if the table and field names are correct for either version. My general philosophy for testing these importers is that we should create mock databases or export files (whatever the system is we're importing from) and generate an output site we'd expect with all the metadata and post content. That's a relatively big lift, though, if it's not already setup.

I allowed the workflows on your PR to run for now and that should give you an environment to ensure existing tests pass & iterate on new tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants