requarks / wiki

Wiki.js | A modern and powerful wiki app built on Node.js
https://js.wiki
GNU Affero General Public License v3.0
24.25k stars 2.68k forks source link

Missing files after importing from existing Gollum git repo #384

Closed joelbarrette closed 6 years ago

joelbarrette commented 6 years ago

Actual behavior

After completing installation successfully and fetching a github remote repo that used to be connected to a Gollum wiki with 1000+ files, many of the files/pages are missing.

Most of the missing pages had hyphens in them which led me to this open issue. For example some of the names of the missing files:

Note: all of the missing files are visible in the repo when browsing via command line.

After changing "DNS-info.md" to dnsinfo.md the page appeared again after I committed the changes via git manually and restarted the wiki via "node wiki restart". However this did not work when removing hyphens for "2018-2-1.md".

I took a look at the logs and came across this as well as many other errors which references many of the hyphenated file names.

2018-01-25T04:55:06.207Z - ESC[31merrorESC[39m: [AGENT] OperationalError: Entry february/2018-2-1 does not exist! at fs.statAsync.then.catch (/home/joelb/server/libs/entries.js:164:13) at tryCatcher (/home/joelb/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/joelb/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/home/joelb/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/home/joelb/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/joelb/node_modules/bluebird/js/release/promise.js:689:18) at Async._drainQueue (/home/joelb/node_modules/bluebird/js/release/async.js:133:16) at Async._drainQueues (/home/joelb/node_modules/bluebird/js/release/async.js:143:10) at Immediate.Async.drainQueues (/home/joelb/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) at processImmediate [as _immediateCallback] (timers.js:722:5)

Expected behavior

All files in the repo should be visible.

Steps to reproduce the behavior

Unsure of what exactly is causing the problem since there are many missing files. However a good test would be to:

  1. Create github remote repo with the following folder structure. Calendar \ January \ 2018-1-1.md

  2. Copy the remote repo to the local machine after a fresh install.

  3. Check to see if files are visible


Thanks for your help! Joel

joelbarrette commented 6 years ago

Did a bit more searching and it looks like the error might be linked to this error: https://github.com/Requarks/wiki/issues/185

because of the entry in the first line of the error:

2018-01-25T04:55:06.207Z - ESC[31merrorESC[39m: [AGENT] OperationalError: Entry february"/"2018-2-1 does not exist! at fs.statAsync.then.catch

has the "/" replaced with /

NGPixel commented 6 years ago

Your files and folders structure doesn't respect the kebab-case file naming requirement:

https://docs.requarks.io/wiki/install/git#using-an-existing-repository

DNS-Info -> dns-info 2018-1-1 is valid but the containing folder isn't (January -> january) etc.

joelbarrette commented 6 years ago

Ah, thanks didn't realize the capital letters on the folders were causing it.

Super appreciate you taking the time to explain.

Joel,