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

ignored: true documents are showing up in collections #807

Closed
robhawkes opened this issue Feb 18, 2014 · 15 comments
Closed

ignored: true documents are showing up in collections #807

robhawkes opened this issue Feb 18, 2014 · 15 comments

Comments

@robhawkes
Copy link

@robhawkes robhawkes commented Feb 18, 2014

Not sure exactly what version triggered this behaviour, but at least in 6.63, ignore: true has stopped ignoring files – they generate into the out directory.

This has already resulted in near-embarrassment as draft articles have been published without my knowledge or permission.

Any idea why this is happening?


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@balupton
Copy link
Member

@balupton balupton commented Feb 18, 2014

ignored: truehttp://docpad.org/docs/meta-data#ignored

I believe in a early version of DocPad we supported aliases for ignored. But eventually it became confusing as people would ask what the differences were, so we got rid of them and just had ignored instead. There was a period I believe where we displayed a warning about the deprecated meta data headings such as ignore.

@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

Sorry, that's what I meant…

Old articles in a draft folder that have the meta ignored: true (and haven't changed) are now showing up in my output. They've never shown up before now.

@balupton
Copy link
Member

@balupton balupton commented Feb 18, 2014

That's strange, can you give me access to your repo? b@lupton.cc

@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

It's all local, no repo at the moment. All that's changed is an upgrade to the latest Docpad. I'm trying to debug it atm.

@balupton
Copy link
Member

@balupton balupton commented Feb 18, 2014

I can't reproduce this when trying myself on the html5 boilerplate skeleton.

@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

After a bit of digging I can see they're only showing up in the article listing and the RSS feed, but not actually having a file generated. I've not changed the <% for article in @getCollection('articles').toJSON(): %> loop =z

@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

The query used for the articles collection (again, unchanged):

articles: (database) ->
            database.findAllLive({url: {$startsWith: '/articles/'}, layout: $ne: 'articles.html.eco'}, {date: -1})
@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

Fixed it by explicitly telling the collection query not to include ignored files. The default behaviour must have changed recently, I never needed to define it explicitly before now…

articles: (database) ->
            database.findAllLive({url: {$startsWith: '/articles/'}, layout: {$ne: 'articles.html.eco'}, ignored: {$ne: true}}, {date: -1})
@balupton
Copy link
Member

@balupton balupton commented Feb 18, 2014

Hrmmm. What was the DocPad version you were using previously?

@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

I'm not sure. Is there a log of the upgrades, or perhaps some output somewhere that might show an older version number?

@balupton
Copy link
Member

@balupton balupton commented Feb 18, 2014

Providing the project was in version control, you could check your website's package.json before the upgrade, should have docpad listed in the dependencies.

@robhawkes
Copy link
Author

@robhawkes robhawkes commented Feb 18, 2014

Unfortunately, I'm not using version control for it (redoing the process soon) and even Dropbox hasn't kept revisions of the package.json. Not sure I'm going to be able to get the previous version number I'm afraid!

@balupton
Copy link
Member

@balupton balupton commented Mar 4, 2014

This issue is present in the kitchensink skeleton. This requires fixing.

@balupton
Copy link
Member

@balupton balupton commented Mar 4, 2014

So it turns out the file is not written to the out directory, but it is included in collections and is servable by the router. We needs tests against this, as our only tests are for the out directory, which is the 1/3 of this which is working.

balupton added a commit to docpad-archive/docpad-skeleton-kitchensink that referenced this issue Mar 4, 2014
Bugs are:

- docpad/docpad#767
- docpad/docpad#807

This would also be nice to have:

- docpad/docpad#402
balupton added a commit to docpad-archive/documentation that referenced this issue Mar 4, 2014
pvandervelde added a commit to pvandervelde/mindvortex that referenced this issue May 23, 2014
@balupton
Copy link
Member

@balupton balupton commented Jul 20, 2018

Possible dupe of #392

@balupton balupton closed this Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants