requarks / requarks/wiki

Importing from Local File System is ignoring dateCreated and date fields

Open
#4,631 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Vue
Stars
28.9k
Forks
3.3k
Avg merge
5d 20h
Merged PRs (30d)
1

Description

Actual behavior

I setup local file system storage in wiki.js settings. I created a markdown file with the following content and imported everything to wiki.js (clicked the Run button on Import Everything).
---
title: Note-1
description:
published: true
date: 2012-07-14T22:31:05Z
tags: tag1, tag2
editor: markdown
dateCreated: 2012-07-14T22:24:50Z
---
Note content

The file got imported into wiki.js as expected but the 'last edited by' time in the imported page shows the current time instead of time from the 'date' field of imported file and the page history shows the creation time as current time instead of 'dateCreated' from the imported file

Expected behavior

Imported pages should use the creation time and last edited time from the imported file instead of current time.

Steps to reproduce the behavior
  1. Enable local file system storage wiki.js (Settings > Storage > Local File System)
  2. Create a markdown file with the aforementioned content in the backup location
  3. Import the file into wiki.js by running 'Import Everything'
  4. Open the imported page in wiki.js and navigate to the page history page and note the creation and last edited times.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the local file system storage import path triggered by “Import Everything” and inspect how the markdown front matter fields date and dateCreated are handled. Reproduce the import with the example file, then verify that the imported page’s last-edited time and history creation time match those fields rather than the current time.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.