This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Pages and pieces missed on Draft Mode and error when accessing them

Hi there!
I’m having issues when trying to configure Apostrophe Workflow on my site. I need to use this module only for approvals., as the site has pieces created to work as articles to create templates, which are managed by various people in the team. I used to have some page types that have been used as page templates.

A the moment, workflow is working for a few pages including home and trash as well as some custom page types. This means, all pages and pieces are visible on LIVE MODE, but some pages and all pieces are not in DRAFT MODE. It’s like if they didn’t exits at all. Checking on the DB, pages that are not visible have the “workflowLocale”: “default”, whereas the one page visible on both modes doesn’t have either.

Pieces don’t have any information related to workflow.

Also, when trying to access any piece in DRAFT MODE, I’m getting the following error:

    if (locale.match(/-draft$/)) {
          ^

TypeError: Cannot read property 'match' of undefined
    at Object.self.draftify (/Users/../../node_modules/apostrophe-workflow/lib/api.js:566:15)
    at getTwo (/Users/../../node_modules/apostrophe-workflow/lib/api.js:272:70)
    at /Users/../../node_modules/apostrophe-workflow/node_modules/async/lib/async.js:718:13
    at iterate (/Users/../../node_modules/apostrophe-workflow/node_modules/async/lib/async.js:262:13)
    at /Users/../../node_modules/apostrophe-workflow/node_modules/async/lib/async.js:274:29
    at /Users/../../node_modules/apostrophe-workflow/node_modules/async/lib/async.js:44:16
    at /Users/../../node_modules/apostrophe-workflow/node_modules/async/lib/async.js:723:17
    at /Users/../../node_modules/apostrophe-workflow/node_modules/async/lib/async.js:167:37
    at /Users/../../node_modules/apostrophe-workflow/lib/api.js:268:16
    at /Users/../../node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:1086:18
    at /Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:52:16
    at /Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:1209:30
    at /Users/../../node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:1367:18
    at /Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:52:16
    at /Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:269:32
    at /Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:44:16
    at /Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:52:16
    at iterate (/Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:260:24)
    at Object.async.forEachOfSeries.async.eachOfSeries (/Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:281:9)
    at Object.async.forEachSeries.async.eachSeries (/Users/../../node_modules/apostrophe/node_modules/async/lib/async.js:214:22)
    at after (/Users/../../node_modules/apostrophe/lib/modules/apostrophe-areas/lib/cursor.js:89:22)
    at self.afters.(anonymous function) (/Users/../../node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:170:18)

I would really appreciate if some can help me with this, I have been trying to fix this and look for similar issues online but nothing has come up.

Thank you!

Hi dcramirezo, how-to questions like this should go to Stack Overflow tagged apostrophe-cms or, if you think it’s a bug report, you should open a github issue on the apostrophe-workflow repo, with clear instructions to duplicate your issue starting from a new site so that we can see it and fix it.

Thanks!

Hi!

I’ve just edited my previous post at Stack Overflow https://stackoverflow.com/questions/49355281/apostrophe-workflow-configuration-issues. It was also rised as an issue in Github.

Thanks
D