Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4568926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:08:46+00:00 2026-05-21T19:08:46+00:00

I have created a custom content-type ( Resume ) and I wish to provide

  • 0

I have created a custom content-type (Resume) and I wish to provide a custom ‘edit’ view. My use-case is very simple, I simply want to show an HTML “disclaimer” box before the edit form.

First of all I have copied:

Products/ATContentTypes/skins/ATContentTypes/atct_edit.cpt
Products/ATContentTypes/skins/ATContentTypes/atct_edit.cpt.metadata

into my/product/browser/ as

my/product/browser/resumeedit.cpt
my/product/browser/resumeedit.cpt.metadata

Then I have defined a new browser:page stanza in my/product/browser/configure.zcml:

  <browser:page
   for="..interfaces.IResume"
   name="resume_edit"
   class=".resumeview.ResumeEdit"
   template="resumeedit.cpt"
   permission="cmf.ModifyPortalContent"
   />

The resume class in my/product/browser/resumeview.py is simply:

class ResumeEdit(BrowserView):
""" A customization of the Resume Edit form
"""
    __call__  = ViewPageTemplateFile('resumeedit.cpt')

Finally, I have changed the default alias for ‘edit’ in my/product/profiles/default/types/Resume.xml:

  <alias from="edit" to="resume_edit" />

When installed, adding or editing a Resume content type throws this exception:

Unauthorized: The container has no security assertions.  Access to 'id' of (Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x1e8b7a50) denied.

This is mitigated by providing a patched version of edit_macros.pt:

85c85
<             tal:attributes="action python:context.absolute_url()+'/'+template.id;
---
>             tal:attributes="action python:context.absolute_url()+'/'+path('template/getId|nothing');
203c203
<                    tal:attributes="value python:(last_referer and '%s/%s' % (context.absolute_url(), template.id) not in last_referer) and last_referer or (context.getParentNode() and context.getParentNode().absolute_url())"
---
>                    tal:attributes="value python:(last_referer and '%s/%s' % (context.absolute_url(), path('template/getId|nothing')) not in last_referer) and last_referer or (context.getParentNode() and context.getParentNode().absolute_url())"

Still, this raises the following exception (‘id-64121786’ is the id of my resume item) :

  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/zope/env26/plone-devel/eggs/Products.Archetypes-1.6.5-py2.6.egg/Products/Archetypes/skins/archetypes/widgets/field.pt
   - Line 63, Column 4
   - Expression: <PythonExpr errors.get(fieldName)>
   - Names:
      {'args': (),
       'container': <Resume at /cms/id-64121786>,
       'context': <Resume at /cms/id-64121786>,
       'default': <object object at 0x8e094c0>,
       'here': <Resume at /cms/id-64121786>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x126e7470>,
       'request': <HTTPRequest, URL=http://localhost:8081/cms/id-64121786/resume_edit>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x117da910>,
       'traverse_subpath': [],
       'user': <PloneUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /home/zope/env26/plone-devel/src/my.product/my/product/browser/resumeedit.cpt object at 0x126d8c90>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x126d8fd0>}
  Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__: errors.get(fieldName)
  Module PythonExpr, line 1, in <expression>
  Module AccessControl.ImplPython, line 688, in guarded_getattr
AttributeError: 'NoneType' object has no attribute 'get'

How can I solve this problem and provide my own customized template for the edit-view of my content-type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:08:47+00:00Added an answer on May 21, 2026 at 7:08 pm

    I would suggest not copying atct_edit.cpt. All you really need to do is configure an edit template (which it looks like you know how to do) then override the appropriate parts. See documentation here for more information.

    Also, I would start with a completely blank edit template first. Then put some valid XHTML in it e.g. <span>Hello world!</span> and make sure you can load the edit template by clicking on the edit button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom Archetypes content type called Résumé and would like to
I have created a custom content type that has a ReferenceField. When I set
I have created a custom field on a content type in Drupal 7 which
I have created a custom content type and using views2 for creating various page-views.
I have created custom jQuery UI widget called uiPopover, very similar to UI-dialog (in
I have created a custom workflow activity that copies attachments from a case to
I created a custom content type FaqEntry in OpenCMS (three fields - title, question,
I have created custom site column with type text and I included in one
I have a custom content type in drupal that I'm allowing even anonymous users
I have created a custom control for ImageButton as <Style TargetType={x:Type Button}> <Setter Property=Template>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.