MMBase

Can not create new nodes with read only fields like created

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 1.9.0
  • Component/s: Core
  • Description:
    Hide
    MMBase - Error 500
    You cannot change the field created

     Headers
    ----------
    host: 127.0.0.1:8080
    user-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
    accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    accept-language: nl,en-us;q=0.7,en;q=0.3
    accept-encoding: gzip,deflate
    accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    keep-alive: 300
    connection: keep-alive
    referer: http://127.0.0.1:8080/bugs/mmbase/edit/my_editors/new_object.jsp?ntype=products
    cookie: mmjspeditors_liststyle=short; JSESSIONID=8244966A46C25C9872AFBB3881955CFA; mmjspeditors_liststyle=short; my_editors_sort_nodetypes=1; _utma=96992031.1978081481.1164126856.1181848234.1201778789.31; realm_cloud_mmbase=MMBase@127.0.0.1; my_editors_sorttable=nodetypes,0,0; _utmz=96992031.1201778789.31.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); my_editors_sortnodetypes=1; JSESSIONID=835634C991FC35A848EF6E38D844547F
    content-type: multipart/form-data; boundary=---------------------------6859301647360492521273971644
    content-length: 2631

    Attributes
    ----------
    javax.servlet.forward.request_uri: /bugs/mmbase/edit/my_editors/new_object.jsp
    javax.servlet.forward.context_path: /bugs
    javax.servlet.forward.servlet_path: /mmbase/edit/my_editors/new_object.jsp
    javax.servlet.forward.path_info: /mmbase/errorpages/500.jsp
    javax.servlet.forward.query_string: ntype=products
    javax.servlet.error.servlet_name: jsp
    javax.servlet.error.message: You cannot change the field created
    javax.servlet.error.exception: org.mmbase.bridge.BridgeException: You cannot change the field created
    org.mmbase.bridge.jsp.taglib.nodeStack: [created='Fri Feb 29 21:30:49 CET 2008',instock='null',owner='default',intro='null',updated='Fri Feb 29 21:30:49 CET 2008',deliverydays='null',price='-1.0',_number='U-12-14',description='',articlenr='',name='Tets',otype='45',subtitle='',number='-1'org.mmbase.module.core.MMObjectNode@ffffff81, created='Fri Feb 29 21:30:49 CET 2008',instock='null',owner='default',intro='null',updated='Fri Feb 29 21:30:49 CET 2008',deliverydays='null',price='-1.0',number='U-12-15',description='',articlenr='',name='Tets',otype='45',subtitle='',number='-1'org.mmbase.module.core.MMObjectNode@ffffff81]
    org.mmbase.cloud: BasicCloud 'mmbase' of foo @567243
    javax.servlet.error.exception_type: class org.mmbase.bridge.BridgeException
    javax.servlet.error.request_uri: /bugs/mmbase/edit/my_editors/new_object.jsp
    _node: -15
    _multipart: org.mmbase.bridge.jsp.taglib.util.MultiPart$MMultipartRequest@4fb4eb
    javax.servlet.error.status_code: 500
    org.mmbase.framework.state: state:
    org.mmbase.timezone: sun.util.calendar.ZoneInfo[id="Europe/Amsterdam",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=180,lastRule=java.util.SimpleTimeZone[id=Europe/Amsterdam,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]

    Misc. properties
    ----------
    method: POST
    querystring: ntype=products
    requesturl: http://127.0.0.1:8080/bugs/mmbase/errorpages/500.jsp
    mmbase version: MMBase 1.9.0.20080222
    status: 500

    Parameters
    ----------
    ntype: products

    Exception
    ----------

    org.mmbase.bridge.BridgeException: You cannot change the field created
    org.mmbase.bridge.BridgeException: You cannot change the field created
    at org.mmbase.datatypes.processors.Readonly.process(Readonly.java:31)
    at org.mmbase.bridge.util.AbstractNode.setDateValue(AbstractNode.java:147)
    at org.mmbase.bridge.util.NodeWrapper.setDateValue(NodeWrapper.java:56)
    at org.mmbase.bridge.util.NodeChanger.setDateValue(NodeChanger.java:63)
    at org.mmbase.bridge.jsp.taglib.typehandler.DateHandler.useHtmlInput(DateHandler.java:279)
    at org.mmbase.bridge.jsp.taglib.FieldInfoTag.useHtmlInput(FieldInfoTag.java:473)
    at org.mmbase.bridge.jsp.taglib.FieldInfoTag.doStartTag(FieldInfoTag.java:385)
    at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005ffieldinfo_005f2(new_005fobject_jsp.java:2364)
    at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005ffieldlist_005f1(new_005fobject_jsp.java:2328)
    at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005fcreatenode_005f0(new_005fobject_jsp.java:2281)
    at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005fpresent_005f4(new_005fobject_jsp.java:2218)
    at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspService(new_005fobject_jsp.java:436)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at org.mmbase.framework.FrameworkFilter.doFilter(FrameworkFilter.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    Show
    MMBase - Error 500 You cannot change the field created  Headers ---------- host: 127.0.0.1:8080 user-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 accept-language: nl,en-us;q=0.7,en;q=0.3 accept-encoding: gzip,deflate accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 keep-alive: 300 connection: keep-alive referer: http://127.0.0.1:8080/bugs/mmbase/edit/my_editors/new_object.jsp?ntype=products cookie: mmjspeditors_liststyle=short; JSESSIONID=8244966A46C25C9872AFBB3881955CFA; mmjspeditors_liststyle=short; my_editors_sort_nodetypes=1; _utma=96992031.1978081481.1164126856.1181848234.1201778789.31; realm_cloud_mmbase=MMBase@127.0.0.1; my_editors_sorttable=nodetypes,0,0; _utmz=96992031.1201778789.31.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); my_editors_sortnodetypes=1; JSESSIONID=835634C991FC35A848EF6E38D844547F content-type: multipart/form-data; boundary=---------------------------6859301647360492521273971644 content-length: 2631 Attributes ---------- javax.servlet.forward.request_uri: /bugs/mmbase/edit/my_editors/new_object.jsp javax.servlet.forward.context_path: /bugs javax.servlet.forward.servlet_path: /mmbase/edit/my_editors/new_object.jsp javax.servlet.forward.path_info: /mmbase/errorpages/500.jsp javax.servlet.forward.query_string: ntype=products javax.servlet.error.servlet_name: jsp javax.servlet.error.message: You cannot change the field created javax.servlet.error.exception: org.mmbase.bridge.BridgeException: You cannot change the field created org.mmbase.bridge.jsp.taglib.nodeStack: [created='Fri Feb 29 21:30:49 CET 2008',instock='null',owner='default',intro='null',updated='Fri Feb 29 21:30:49 CET 2008',deliverydays='null',price='-1.0',_number='U-12-14',description='',articlenr='',name='Tets',otype='45',subtitle='',number='-1'org.mmbase.module.core.MMObjectNode@ffffff81, created='Fri Feb 29 21:30:49 CET 2008',instock='null',owner='default',intro='null',updated='Fri Feb 29 21:30:49 CET 2008',deliverydays='null',price='-1.0',number='U-12-15',description='',articlenr='',name='Tets',otype='45',subtitle='',number='-1'org.mmbase.module.core.MMObjectNode@ffffff81] org.mmbase.cloud: BasicCloud 'mmbase' of foo @567243 javax.servlet.error.exception_type: class org.mmbase.bridge.BridgeException javax.servlet.error.request_uri: /bugs/mmbase/edit/my_editors/new_object.jsp _node: -15 _multipart: org.mmbase.bridge.jsp.taglib.util.MultiPart$MMultipartRequest@4fb4eb javax.servlet.error.status_code: 500 org.mmbase.framework.state: state: org.mmbase.timezone: sun.util.calendar.ZoneInfo[id="Europe/Amsterdam",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=180,lastRule=java.util.SimpleTimeZone[id=Europe/Amsterdam,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]] Misc. properties ---------- method: POST querystring: ntype=products requesturl: http://127.0.0.1:8080/bugs/mmbase/errorpages/500.jsp mmbase version: MMBase 1.9.0.20080222 status: 500 Parameters ---------- ntype: products Exception ---------- org.mmbase.bridge.BridgeException: You cannot change the field created org.mmbase.bridge.BridgeException: You cannot change the field created at org.mmbase.datatypes.processors.Readonly.process(Readonly.java:31) at org.mmbase.bridge.util.AbstractNode.setDateValue(AbstractNode.java:147) at org.mmbase.bridge.util.NodeWrapper.setDateValue(NodeWrapper.java:56) at org.mmbase.bridge.util.NodeChanger.setDateValue(NodeChanger.java:63) at org.mmbase.bridge.jsp.taglib.typehandler.DateHandler.useHtmlInput(DateHandler.java:279) at org.mmbase.bridge.jsp.taglib.FieldInfoTag.useHtmlInput(FieldInfoTag.java:473) at org.mmbase.bridge.jsp.taglib.FieldInfoTag.doStartTag(FieldInfoTag.java:385) at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005ffieldinfo_005f2(new_005fobject_jsp.java:2364) at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005ffieldlist_005f1(new_005fobject_jsp.java:2328) at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005fcreatenode_005f0(new_005fobject_jsp.java:2281) at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspx_meth_mm_005fpresent_005f4(new_005fobject_jsp.java:2218) at org.apache.jsp.mmbase.edit.my_005feditors.new_005fobject_jsp._jspService(new_005fobject_jsp.java:436) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.mmbase.framework.FrameworkFilter.doFilter(FrameworkFilter.java:189) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)

Activity

Hide
André van Toly added a comment - 2008-03-02 16:36
Seems to be in 1.8.6 also
Show
André van Toly added a comment - 2008-03-02 16:36 Seems to be in 1.8.6 also
Hide
André van Toly added a comment - 2008-03-02 16:56
Just found out you need to specificy that the field is readonly in a builders field-element with readonly="true". For example:

    <field name="created" readonly="true">
      <descriptions/>
      <gui>
        <guiname xml:lang="en">Created</guiname>
      </gui>
      <datatype xmlns="http://www.mmbase.org/xmlns/datatypes" base="created" />
    </field>

Which seems rather absurd to me and is nowhere documented.
Show
André van Toly added a comment - 2008-03-02 16:56 Just found out you need to specificy that the field is readonly in a builders field-element with readonly="true". For example:     <field name="created" readonly="true">       <descriptions/>       <gui>         <guiname xml:lang="en">Created</guiname>       </gui>       <datatype xmlns="http://www.mmbase.org/xmlns/datatypes" base="created" />     </field> Which seems rather absurd to me and is nowhere documented.
Hide
Michiel Meeuwissen added a comment - 2008-03-14 11:17
I don't think it is absurd that a readonly field should be marked readonly.

The 'ReadOnly' processor is only a way to enforce this.

Of course this attribute must be documented, if it is not.
Show
Michiel Meeuwissen added a comment - 2008-03-14 11:17 I don't think it is absurd that a readonly field should be marked readonly. The 'ReadOnly' processor is only a way to enforce this. Of course this attribute must be documented, if it is not.

People

Dates

  • Created:
    2008-02-29 21:34
    Updated:
    2008-07-15 22:30
    Resolved:
    2008-07-15 22:30