Jigsaw: Collection isn't working

Created on 24 Apr 2017  路  20Comments  路  Source: tighten/jigsaw

Hello.

The collection isn't working at all. I've tried to add path to posts in the collection array, not working. But the jigsaw console do notice the _posts folder because it would throw me an error if it isn't there, but it just won't render any item in the folder. What am I did wrong?

2017-04-24_114849

The picture note:

  1. The left editor is the 1-helloworld.md
  2. The right editor is the config.php

Most helpful comment

I believe I have fixed this bug with the pull request #126

All 20 comments

I can't see any issues with your code (although the file 1-helloworld.md is set to extend the master template, so your post template won't be used), though it's possible there's some issue relating to running on Windows. Do you get any error message when trying to build the site?

If you upload a zip of your site, or link to a repo, I can test it out more fully.

There aren't any error, it just won't render the output (For the 1-helloworld.md, it's just me hopelessly trying every possible way to make this works)

For the repo: https://github.com/imam/imamtech-jigsaw

2017-04-25_094647

Your code builds fine for me when I run it on my mac, but something is causing the collection build to fail silently when I test it on Windows. I'm not certain yet of the cause.

Actually, scratch that, it's working fine for me on Windows. At least, on Windows running the Ubuntu bash, which it _looks_ like you are running as well? (In my earlier test, I had mistakenly cleared out config.php so it had appeared to not work.) So I'm a bit stuck, since I can't reproduce the error when building from your repo.

imam-test

@imam @damiani Just hit the same problem, everything works fine but it does not generate the output files, the data is parsed because I can loop through the collection as $posts.

Do you manage to solve this?

I wasn't able to reproduce the issue. Could you post a repo of your code, as well as some details about your setup? Running on Windows, using the Ubuntu bash shell, @imam's code built fine for me. I'd love to give yours a try to see if I can recreate the problem.

@damiani Thanks for such a quick answer, this is a link to my project repo, I'm using Windows 7, git bash, jigsaw installed globally and I think that's all.

Can confirm it doesn't work using Powershell with the provided jigsaw.bat

I had to run jigsaw through my VM running debian to build successfully

I believe I have fixed this bug with the pull request #126

I have confirmed that https://github.com/tightenco/jigsaw/pull/126 fixes the issue on my Windows 10, git bash session.

hello
In regards to this, I am using Windows 10, git bash and it does not generates the output files...

@adrianR84 Did you apply the fix from #126, and it still didn't work on Windows?

Yes, I did not work. I have tried both, $parts = preg_split('/[\\/\\\]+/', $this->relativePath()); and $parts = explode(DIRECTORY_SEPARATOR, $this->relativePath()); .... This code was added to .\vendor\tightenco\jigsaw\src\File\InputFile.php file and after I tried generating the build once again with ./vendor/bin/jigsaw build command. Am I doing something wrong ?
Thank you.

@adrianR84 you also need the changes to the relativePath method of InputFile. Grab the latest changes from the below link and replace the entire InputFile with it. Also you need to make sure u are running the ./vendor/bin/jigsaw build command rather than the global jigsaw build . Please let me know your results

https://raw.githubusercontent.com/garhbod/jigsaw/efd36fd0fa7144ed1cd19528db57de2b3f035dd8/src/File/InputFile.php

@cmosguy can you please test again with the latest changes mentioned in my previous post

Hello

Considering the file that you have given to me, it is working perfectly. Thank you for your help and quick reply.

@damiani @adrianR84 I have tested the updated and it is working just fine now. I have tested on my windows 10 system.

Thanks for the updates!

Excellent, thanks for testing!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathangross picture nathangross  路  3Comments

Log1x picture Log1x  路  8Comments

mattstauffer picture mattstauffer  路  3Comments

imaje89 picture imaje89  路  3Comments

mrgodhani picture mrgodhani  路  8Comments