cancel
Showing results for 
Search instead for 
Did you mean: 

Troubles with web forms in 2.9B

stevo
Champ in-the-making
Champ in-the-making
Hi,
after a few days of working with the latest Beta I must admit that this is another great piece of software.

However, there are some issues when using the new ecm forms feature. When you create a new form using a xsd containing complexTypes the form generator does not display the form correctly. The schema I have used contains a record in the first hierarchy and possibly several sub information in a lower level of the hierarchy.
When the form is generated everything looks fine, but if you try to hit the green plus and add another element, Alfresco shows a red loading bar in the upper right corner and stalls (for hours).

The xsd I am using looks like this:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
   <xs:simpleType name="staticInfo">
      <xs:restriction base="xs:string">
         <xs:enumeration value="one"/>
         <xs:enumeration value="two"/>
         <xs:enumeration value="three"/>
         <xs:enumeration value="four"/>
         <xs:enumeration value="five"/>
         <xs:enumeration value="six"/>
      </xs:restriction>
   </xs:simpleType>
   <xs:element name="Record" id="Record">
      <xs:complexType id="inRecord">
         <xs:sequence id="inRecordSeqeunce" maxOccurs="1" minOccurs="1">
            <xs:element name="proInfo"  minOccurs="1" maxOccurs="unbounded" id="proInfo">
               <xs:complexType id="otherInfo">
                  <xs:attribute name="title" type="xs:string"/>
                  <xs:attribute name="length" type="xs:integer"/>
               </xs:complexType>
            </xs:element>
         </xs:sequence>
         <xs:attribute name="description" type="xs:string"/>
         <xs:attribute name="name" type="xs:string"/>
         <xs:attribute name="staticInfo" type="xs:string" default="one"/>
         <xs:attribute name="year" type="xs:gYear"/>
      </xs:complexType>
   </xs:element>
</xs:schema>

Any hint what went wrong?
21 REPLIES 21

kvc
Champ in-the-making
Champ in-the-making
We did make some changes to Web Forms between 2.1 and 2.9 to enable Forms in the SpacesStore (without the presentation template registration, rendition generation, and preview, etc.).  Something related to that might be at work here.

One simple thing to try:  move your named types to the top of your XSD just below your namespace declarations.  I cannot find the forum post, but I do recall one quick discussion around this in 2.9.  While I think that would be an odd reason for repeats to not work, it's worth a quick try. 

This behavior is currently working on HEAD (available from our public SVN) and an update to Community is due this June.  Other options are to remain on 2.1 or to use one of our enterprise maintenance release (I think basic feature failure, however, is really not that value we try to build into our maintenance releases.  This should not be broken in the Community codeline, and I will also be looking into it).

Kevin

samuel_penn
Champ in-the-making
Champ in-the-making
Making changes to the XSD as you suggested doesn't appear to have made a difference. I might give the SVN version a go instead (this is my bleeding edge Alfresco install, so I'm not too adverse to the idea).

Thanks,
Sam.

kvc
Champ in-the-making
Champ in-the-making
Great.  I hope it's fixed; if not, file a JIRA ticket and I'll make certain we get fixed no later than our next Community build (and make yourself a watcher on the issue, so that when closed, you can great another nightly).

Kevin

samuel_penn
Champ in-the-making
Champ in-the-making
I posted the issue to JIRA[1] a while back, but haven't yet seen a response. I've also just tried it with 3.0, and forms still appear to be broken. Possibly it's me, but every version of 2.1 and 2.2 I've installed works, and every version of any later build doesn't work (on any platform), so I'm kind of suspicious. However, I'd expect a lot of screaming if it was affecting everyone, unless everybody else is using IE.

So… is anyone using Web Forms 2.9+ with Firefox successfully?

[1] https://issues.alfresco.com/browse/ALFCOM-268

Sam.

kabes
Champ in-the-making
Champ in-the-making
I am having similar problems - first noticed after an upgrade to Firefox3. It appears to depend on the version of Firefox rather than the version of Web Forms.

I have used the same 2.9B Web Forms installation with a few different Firefox versions.

Forms are broken in:
2.0.0.12 Windows
3.0.1  Windows & Linux

However, they work in
2.0.0.14 Linux

Web Forms 3.0 exhibits the same behaviour.

alyaissa
Champ in-the-making
Champ in-the-making
I got the same problem. When I used new ECM forms for XML creation, I was able to create XML content correctly.

robain
Champ in-the-making
Champ in-the-making
The problem exists for sure. Also I was trying to play with the XSD below

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:simpleType name="LocaleType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="en_ES" />
      <xs:enumeration value="en_US" />
    </xs:restriction>
  </xs:simpleType>

<xs:complexType name="LocaleMap">
    <xs:sequence>
      <xs:element name="Locale" type="LocaleType"     minOccurs="1" maxOccurs="1" />
      <xs:element name="translation" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

<xs:element name="DocumentList">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentURL" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="ParentTranslation" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
      <xs:element name="LocaleMap" type="LocaleMap" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
</xs:element>

</xs:schema>

the web form gives a javascript error when trying to select the checkbox for the Locale in LocaleMap. Anyone has ideas on what the problem is ?

Thanks

phaethon
Champ in-the-making
Champ in-the-making
I have the same problem with Labs 3.0 and Firefox 3.0.1. It works fine with IE. Anybody found a solution?

samuel_penn
Champ in-the-making
Champ in-the-making
I've recently spoken to some people at Alfresco about this, and they've managed to duplicate the problem, and is scheduled for fixing in 2.9E, then to be merged into 3.0. So hopefully, it'll be fixed soon. It is a bug though, so probably no workaround until it's actually fixed.

Sam.

phaethon
Champ in-the-making
Champ in-the-making
This should probably be some small quirk in javascript. It would be nice if Alfresco published the patch when it is available, before waiting 2.9E