Renamed domain type and now I cant add documents outside of the structure templates

I renamed the Domain document and Studio will not allow me to rename it back to “Domain”

Now I can't add any documents to a domain except upon domain creation with the structure (Domain) templates.

How can I recover the ability to add documents, workspaces, etc to a renamed domain without creating a new domain.

It seems the original domain document is still being used to create a domain, however I no longer am able to set parent/child folders.

Renaming the document back to domain causes a schema collision and studio complains about the renaming.

0 votes

3 answers

2449 views

ANSWER



Hi Karl,

I get closer to understanding your situation: On your document database, you have some real “Domain” document instances. Somehow, (this is obscure why to me as this is not the case in a default DM), you have the “New” button displayed on the content tab of those Domain instances. The problem is that it proposes no document type to create. You can modify this in Studio by providing :

  • A/ either in “Container types” of all the types that can be created below Domain the value “Domain”.
  • B/ either in “Accepted Children” of Domain type declaration the value of all the types that you want to create below a Domain. Problem: not possible for you to rename or re-create a Domain type because of the error message you gave us.

The problem in B cannot be solved without changing Nuxeo Studio behavior, which has to be scheduled in a future release. But it seems to me that solution A is fine for your requirements

There remains to understand how you get the “New” button on Domain type instances.

0 votes



Thanks, I appreciate your prompt response.

Let me re-phrase my question.

I renamed the Document Type Domain in Studio.

On existing Domain documents in DM I have a “New” button when I enter the domain. Clicking this new button does nothing, no errors, no logged errors.

Looking at the created DM document of type Domain in Nuxeo shell shows the domain has the Type: Domain (which was the old Domain name), as it should.

In Studio, when I try to rename the document type back to Domain, I get an error stating: Invalid name: A document having a nested schema with the id 'domain_schema' already exists in this project: this document schema prefix will conflict with it.

So I can't seem to use the original id/prefix (domain_schema) on the renamed document type, even though this document type was originally name Domain.

I have extended the domain type in at least one other document type, but I am not using this type.

I hope this clears up my original question. Sorry for the confusion.

0 votes



Please prefer to change the question instead add an answer to rephrase the question. The idea of answers is to present one question and different answers… This not a Forum.
01/02/2012


Hi Karl,

To make a new Document button appear, you can add the following XML extension in Studio (Project > Advanced Settings > XML Extensions):

  <extension point="actions" target="org.nuxeo.ecm.platform.actions.ActionService"> <action icon="/icons/action_add.gif" id="newDocumentBis" label="action.new.document" link="javascript:Richfaces.showModalPanel('selectDocTypePanel');">
  <category>SUBVIEW_UPPER_LIST_HREF</category>

  <filter id="customAdditionalRuleForNewDocumentButton"><rule grant="true">
      <permission>AddChildren</permission>
      <type>Domain</type>
    </rule>
  </filter>
</action>
</extension>

I tested successfully. Note that ideally, I would have contributed a new filter to the existing “newDocument” action, but didn't find the good filter.

A few complementary remarks:

0 votes



Karl, if this answered your question, can you rename the question "how to add "New Document" button on domains ? Thank you
12/13/2011