Hello everybody!

 

This is the use case I tried on a new CPS Default Site using CPS 3.3.8:

 

1.- Publish any document into any section.

2.- Go to the published document in the section

3.- Unpublish the document.

 

The document is unpublish correctly but after doing this, "content_submit_form" is showed again with the portal_status_message "You must choose at least one section for publication. Publication aborded !".

 

I've created a ticket with the solution I propose: http://svn.nuxeo.org/trac/pub/ticket/1191

 

I think that the problem is in this snippet as this is done no matter what the workflow_action is:

 

#####################################################

# No section has been specified

# XXX We should get a list in here

if REQUEST and len(REQUEST.form) < 3:

    psm = 'psm_you_must_select_sections_for_publishing'

#####################################################

 

what I did to fix it is to move the code to the next else statement:

 

#####################################################

 

else:

   # No section has been specified

   # XXX We should get a list in here

    if REQUEST and len(REQUEST.form) < 3:

       psm = 'psm_you_must_select_sections_for_publishing'

    else:

      # publishing: copy and initalize proxy into one or more sections

      allowed_transitions = wftool.getAllowedPublishingTransitions(context)

      for transition in allowed_transitions:

          rpaths = kw.get(transition)

          if rpaths:

              if same_type(rpaths, ''):

                  rpaths = (rpaths,)

              for rpath in rpaths:

                  wftool.doActionFor(context, workflow_action,

                                   dest_container=rpath,

                                   initial_transition=transition,

                                   comment=comments)

 

#####################################################

 

Thank you very much.

 

JoseLuis de la Rosa Triviño
Becario Área de Sistemas de Información
FUNDACIÓN IAVANTE
[EMAIL PROTECTED]
Tel. 951 015 300

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.

 

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to