Page 1 of 1

Property group creation problem

PostPosted:Tue Oct 09, 2012 9:41 pm
by sidtupper
I've installed OpenKM Version 5.1.10 (build: 7564) With Community Extension 5.1 on Ubuntu 12.04.1. Everything seems fine so far, except when I click on Property Groups in the Administration screen I get this error:

Application error
Class: com.openkm.core.ParseException
Message: Attribute "value" must be declared for element type "input".

Here is my /home/ecoadapt/openkm-5.1/jboss-4.2.3.GA/PropertyGroups.xml file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.0.dtd">
<property-groups>
  <property-group label="EcoAdapt" name="okg:ecoadapt">
    <input label="Autor" type="text" name="okp:ecoadapt.autor" value=""/>
    <input label="Fecha" type="date" name="okp:ecoadapt.fecha" value=""/>
    <textarea label="Resumen" name="okp:ecoadapt.resumen" value=""/>
    <input label="Numero" type="text" name="okp:ecoadapt.numero" value="RBMCH-0000"/>
  </property-group>
</property-groups>


and PropertyGroups.cnd:
Code: Select all
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>

[okg:EcoADapt] mixin
- okp:consulting.autor (string) = '' autocreated
- okp:consulting.fecha (string) = '' autocreated
- okp:consulting.resumen (string) = '' autocreated
- okp:consulting.numero (string) = '' autocreated
Strangely, I get the same error if I replace PropertyGroups.xml with the example file at
http://wiki.openkm.com/index.php/Proper ... definition

Do I have to restart the server when I change these files? I'd be grateful if someone would point out where the problem is.

Re: Property group creation problem

PostPosted:Tue Oct 09, 2012 11:04 pm
by macjaeger
You name the items "okp:ecoadapt.xxx" in the xml-file, but you reference "okp:consulting.xxx" in the cnd-file (probably the "consulting" is a leftover from the samples?). Though i'm new to OpenKM myself, i'd guess that the names have to match.

Re: Property group creation problem

PostPosted:Wed Oct 10, 2012 1:57 pm
by sidtupper
Thanks, macjaeger, you're right! How could I have looked at it so long and not seen that? I made the corrections, so the cnd file looks like this now:
Code: Select all
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>

[okg:ecoadapt] mixin
- okp:ecoadapt.autor (string) = '' autocreated
- okp:ecoadapt.fecha (string) = '' autocreated
- okp:ecoadapt.resumen (string) = '' autocreated
- okp:ecoadapt.numero (string) = '' autocreated
But I still get the same error, even after restarting jboss.

Re: Property group creation problem

PostPosted:Thu Oct 11, 2012 2:42 pm
by macjaeger
Sorry, can't help you further. Maybe your first experiment inserted data into the database which now conflicts with the new definitions? I'd try to change the xml-file to match the previous (wrong) cnd-file, i.e. rename "ecoadapt" to "consulting" in xml-file - but that's only a wild guess, fishing for straws.

Re: Property group creation problem

PostPosted:Thu Oct 11, 2012 8:31 pm
by sidtupper
I think you're right, macjaeger, and because I read in the documentation that you can't change properties once they're registered, I fear that my errors are indelible and the only remedy is to reinstall OpenKM.

Re: Property group creation problem

PostPosted:Thu Oct 11, 2012 9:35 pm
by macjaeger
I don't think so, but I believe that you need some basic knowledge of OpenKM's database-structure to get rid of the malformed entries. After all, properties have to be some sort of additional fields in document-records, thus it should be possible to wipe them clean. Maybe one of the OpenKM-Gurus could provide a magic sql-statement that drops all extra fields from the database?

Re: Property group creation problem

PostPosted:Sat Oct 13, 2012 8:05 am
by jllort
Remove or change metadata keys is not allowed in 5.x ( jackrabbit limitation ) but can be done in 6.x ( where we have full control )