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

Configure Apostrophe-doc-type-manager options.name

Hello,

I’m starting with the apo cms, and I try to use apostrophe-piece-pages module.
On a first try, I just added the ‘apostrophe-pieces-pages’:{} to the modules in app.js :

Then cmd printed this error :

“Error while constructing the apostrophe-pieces-pages module
TypeError: Cannot read property ‘name’ of undefined”

I tried to restart my node app.js with only the ‘apostrophe-doc-type-manager’:{} module.
Now the error is :

Error while constructing the apostrophe-doc-type-manager module
Error: apostrophe-doc-type-manager requires name option

I tried adding this in the modules of app.js …

'apostrophe-doc-type-manager':{
  options:[{
    name:""
  }]
},

But I don’t know if it’s the right way, and I dont understand how I have to fill it !
What are this “docs” mentionned in the doc ? :sweat_smile:

Thanks


Hi again,

Sorry me for the possible dumbness of the question. I try to solve my issue but the doc seems to have a little lack of info on this particular point (maybe it’s just my rough english).

So. I’m not sure it is a good pratice, but I added this line directly in the \node_modules\apostrophe\lib\modules\apostrophe-doc-type-manager\index.js :

options.name = [ ‘txt’, ‘rtf’, ‘pdf’, ‘xls’, ‘ppt’, ‘doc’, ‘pptx’, ‘sldx’, ‘ppsx’, ‘potx’, ‘xlsx’, ‘xltx’, ‘csv’, ‘docx’, ‘dotx’ ];

Now the error have changed, but I do no more understand what i’m supposed to do :weary:


HEY DEVELOPER: the following types exist in your aposDocs collection,
but are not managed by any module. A generic manager is being stubbed in
for each one to keep your site from crashing, but you should remove these
permanently from the database OR manage them properly by:

  • Listing them as “types” for “apostrophe-pages”, OR
  • Providing an appropriate subclass of apostrophe-pieces.

apostrophe-global, apostrophe-group, apostrophe-user, csv, doc, docx, dotx, pdf, potx, ppsx, ppt, pptx, rtf, sldx, txt, xls, xlsx, xltx


Error:
doc type singular_name, field name _viewUsers:

withType property, apostrophe-user, does not match the “name” property of any doc type. Hint: this is not the same thing as a module name. Usually singular.

Hi again,

I’m sorry, it’s maybe not the appropriate space to ask questions, and it would be preferable to use stackoverflow with the cms-apostrophe tag… But I can’t delete my posts.

Nevertheless I think I’m getting less confused about my issue …
I’m creating a extends of pieces, and I added to app.js a

‘liste-unes’:{
name:“liste-unes”
},

It made an error in the cmd disapear …

Bye !