Can´t creat a document

  • Robert

    Robert - 2011-08-03

    Hello…I´m getting started to test a little bit with plomino and plone.
    when i try to create an document I get an error on saving it….and don´t know why
    i hope you understand the problem and somebody can help me ;-)

    URL: file:/Applications/Plone/buildout-cache/eggs/Plomino-1.10.3-py2.6.egg/Products/CMFPlomino/skins/cmfplomino_templates/
    Line 41, Column 3
    Expression: <PythonExpr>
    {'container': <PloneSite at /Plone>,
     'context': <PlominoDocument at /Plone/datenbank/plominodocument.2011-08-03.9065013389>,
     'default': <object object at 0x3206e0>,
     'here': <PlominoDocument at /Plone/datenbank/plominodocument.2011-08-03.9065013389>,
     'loop': {},
     'nothing': None,
     'options': {'args': ()},
     'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x547ecc0>,
     'request': <HTTPRequest, URL=http://localhost:8080/Plone/datenbank/plominodocument.2011-08-03.9065013389/checkBeforeOpenDocument>,
     'root': <Application at >,
     'template': <FSPageTemplate at /Plone/OpenDocument used for /Plone/datenbank/plominodocument.2011-08-03.9065013389>,
     'traverse_subpath': [],
     'user': <PropertiedUser 'admin'>}
  • Eric Brehault

    Eric Brehault - 2011-08-03


    Apparently, something is wrong with the form.

    To create a document, you must create a form first.
    Once a form is created, you use it to produce documents.
    (you cannot add new documents with the Plone "Add" menu as usual Plone content-types)


  • Robert

    Robert - 2011-08-04

    hm okey that make more sense ;-) my mistake
    but i have another question. i have 2 tables. person and pictures.
    i combined them with da "doclink" field in the "pictures" table. so i can map every new picture to a person.
    when i try to build a view, i see not the person it self but rather the url of the person like this "plone/name_of_database/2403203940"
    can i get the name behind that link? i try a little bit with the methods from here ( but no success ;-)

  • Eric Brehault

    Eric Brehault - 2011-08-04


    The doclink field stores the targeted document path into the item.
    So in your view, that's what you see (the actual item value).
    To obtain the rendering provided by the field, you can use this formula into your view column):

    or you can produce your own rendering yourself:
    target_doc_path = plominoDocument.getItem("my_doclink")
    db = plominoDocument.getParentDatabase()
    target_doc = db.getDocument(target_doc_path)
    return """<a href="%s">%s</a>""" % (target_doc.doc_url(), target_doc.getItem("person_name")


  • Robert

    Robert - 2011-08-05

    thanks…works great :)


Log in to post a comment.