`ignored: true` documents are showing up in collections #807

Open
robhawkes opened this Issue Feb 18, 2014 · 14 comments

Comments

Projects
None yet
2 participants
@robhawkes

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

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Feb 18, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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.

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

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Feb 18, 2014

Member

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

Member

balupton commented Feb 18, 2014

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

@robhawkes

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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.

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

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Feb 18, 2014

Member

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

Member

balupton commented Feb 18, 2014

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

@robhawkes

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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

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

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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})

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

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

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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})

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

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Feb 18, 2014

Member

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

Member

balupton commented Feb 18, 2014

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

@robhawkes

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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?

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

@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Feb 18, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@robhawkes

robhawkes 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!

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

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Mar 4, 2014

Member

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

Member

balupton commented Mar 4, 2014

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

@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Mar 4, 2014

Member

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.

Member

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/docpad-skeleton-kitchensink that referenced this issue Mar 4, 2014

balupton added a commit to docpad/documentation that referenced this issue Mar 4, 2014

pvandervelde added a commit to pvandervelde/mindvortex that referenced this issue May 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment