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

Urls generated with full file path on Windows #107

Open
zaunaf opened this issue Mar 8, 2016 · 8 comments
Open

Urls generated with full file path on Windows #107

zaunaf opened this issue Mar 8, 2016 · 8 comments
Labels
more-information-needed Please Provide More Details pending Pending Close. Respond

Comments

@zaunaf
Copy link

zaunaf commented Mar 8, 2016

This problem #8 re-appears in 0.9.0..
The solution pretty much the same, in raneto-core\lib\raneto.js line number 146:

      var dir = raneto.config.content_dir.replace(/\\/g, "/");
      var shortPath = filePath.replace(dir, '').trim();
@ryanlelek
Copy link
Owner

Thanks zaunaf for narrowing down the issue with the file and lines.
Has something to do with filepaths and we need to normalize

If someone has time this weekend, here's an article that helps.
http://shapeshed.com/writing-cross-platform-node/
Please comment before you start working on it so we don't duplicate your efforts :)

@ryanlelek ryanlelek added help-wanted Please join the discussion up-for-grabs Not on Roadmap. PRs Welcome labels Mar 11, 2016
@Zackery
Copy link

Zackery commented Mar 17, 2016

This seemed to fix it for me. Thanks. 👍

Not sure if this is related or not, but when searching on Windows, I get Cannot read property 'excerpt' of null. Thanks for the help.

@RiverSongFox
Copy link

Hello, I ran into the issue yesterday and I'd like to take it into work.

@gallarotti
Copy link

I am also getting the "Cannot read property 'excerpt' of null" error message when searching an article.
Line 146 mentioned above is:

slug = slug.replace('.md', '').trim();

How to apply the fix?
Around line 188 I see code that addresses the shortPath:

files.forEach(function (filePath) {

  var shortPath = path.normalize(filePath).replace(content_dir, '').trim();
  var stat      = fs.lstatSync(filePath);

Is this code already supposed to account for the fix mentioned above?
If so, it doesn't resolve the "Cannot read proprty 'excerpt' when searching.

@ryanlelek
Copy link
Owner

@gallarotti this might be another issue.
Are you on the latest version of Raneto? (v0.10.1)

I'll dig into it more this weekend.
Any additional info you can provide (OS, Node version, etc) would help narrow it down

@ToasterBR
Copy link
Contributor

Hey @ryanlelek, I'm getting the same issue as @gallarotti.
The fix supplied didn't help (or I'm doing something wrong).

OS: Win10 Pro64
Node: 4.4.7
Raneto: 0.10.1

Thanks!

@ryanlelek
Copy link
Owner

Booting a Windows 10 Pro x64 VM right now to help diagnose

@ryanlelek ryanlelek reopened this Sep 11, 2016
@ryanlelek
Copy link
Owner

Ok, all booted up fine with these commands.
I was able to browse and login

Code used is the master branch as of the time of this comment.

From project directory run:

npm install
npm run start_win

@ryanlelek ryanlelek added pending Pending Close. Respond more-information-needed Please Provide More Details and removed help-wanted Please join the discussion up-for-grabs Not on Roadmap. PRs Welcome labels Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Please Provide More Details pending Pending Close. Respond
Projects
None yet
Development

No branches or pull requests

6 participants