Page 1 of 1

Problem with editing Profile Data

Posted: Fri Feb 08, 2013 3:31 pm
by slusan
After the update to 2013 I have the problem that i can't edit any custom Data Fields (Numeric) for an receipient. I used the manual method to update from 2011 to 2013. Everything else seems to work fine just can't edit.

Looking at the Source Code reveals that he creates the input fields with maxlength=0. And i get two javascript errors (see image).

Javascript Error:
Image


Inputfield Maxlength:
Image

Did something went wrong during update, or is it something else?.

Re: Problem with editing Profile Data

Posted: Tue Feb 12, 2013 11:07 pm
by maschoff
Please describe how you want to edit profile fields and what happens exactly.

Re: Problem with editing Profile Data

Posted: Thu Feb 14, 2013 1:12 pm
by slusan
On the second screenshot you can see the field "Interessent", after selecting this field and trying to enter an number (1 in this case), it won't show up. No matter if I want to enter a number or letter it just won't let me enter anything. Only possibility is to leave the field empty or with the default value (0 in this case).

It can be reproduced for every Numeric field in the list not just "Interessent". The default fields like creation_date, email, firstname etc. can be edited without problems.

Here is a screen from fields managment:

Image

Re: Problem with editing Profile Data

Posted: Thu Feb 14, 2013 1:51 pm
by maschoff
Best would be to log into MySQL and check custom field settings directly with

Code: Select all

DESC customer_1_tbl;
-> lists all custom fields at the end

Code: Select all

SELECT * FROM customer_field_tbl;
-> lists parameters of all custom fields

You can find the description of the OpenEMM database schema in the Extension Development Guide.

Re: Problem with editing Profile Data

Posted: Thu Feb 14, 2013 2:14 pm
by slusan
Thanks for the quick reply.

As far as I can see read and write for the fields is enabled.


Image

Re: Problem with editing Profile Data

Posted: Thu Feb 14, 2013 3:34 pm
by maschoff
I do not understand how you ended up with custom fields of type "double" instead of type "int" (maybe a bug in an old version of OpenEMM ...). I think this is the problem. Maybe there is a way to convert the field types. Or you do an export, create new fields (hopefully of type "int") an re-import the field values.

Re: Problem with editing Profile Data

Posted: Fri Feb 15, 2013 4:07 pm
by slusan
This field are being used since OpenEMM 6.3 (maybe even older), maybe that's why they are double.

Anyway, I don't think that it's a Problem with the double value. You can see in the mysql output that there is a Field "test", I created this one under 2013 because I had a similar guess, but the test field has the same problem. I checked under OpenEMM 2011 were it still worked and the Fields there were double too.

But I will try to convert them to int to narrow down the problem.

Re: Problem with editing Profile Data

Posted: Fri Feb 15, 2013 4:20 pm
by maschoff
If you have the same problem when you create a new custom field of a numeric type with OpenEMM 2013 I have no idea, because OpenEMM 2013 (and 2011) works fine for us. If you set up a new OpenEMM 2013 from scratch do you have the same problem? If not, you could dump the database from your current OpenEMM 2013 and import them into the new installation.

Re: Problem with editing Profile Data

Posted: Tue Feb 19, 2013 9:36 am
by slusan
I worked around the problem by removing the maxLength definition in Line 139 from

/home/openemm/webapps/openemm/recipient/recipient-view.jsp

maxlength='<%= (String) pageContext.getAttribute("_agnTbl_data_length") %>'

Re: Problem with editing Profile Data

Posted: Tue Feb 19, 2013 9:53 am
by maschoff
If your line 139 looks like this then you are working with OpenEMM 2011, in OpenEMM 2013 this line is #148.

Re: Problem with editing Profile Data

Posted: Tue Feb 19, 2013 10:01 am
by slusan
You're right, had the old file opened. Under 2013 it's Line 148.

Re: Problem with editing Profile Data

Posted: Tue Mar 12, 2013 6:05 pm
by captainpeter
I just encountered the same issue on a server updated from v2011 to v2013.
The same fix in line 148 worked for me as well.

cheers
Peter

Re: Problem with editing Profile Data

Posted: Sun Mar 17, 2013 8:05 pm
by maschoff
Your solution works, but it is a hack, because it allows the user to enter values for alphanumeric fields which are longer than the corresponding database field. We will provide a new JSP for replacement soon.

Re: Problem with editing Profile Data

Posted: Mon Mar 18, 2013 5:40 pm
by maschoff
I uploaded a fixed version of recipient-view.jsp here:

https://sourceforge.net/projects/openem ... /Bugfixes/

Please check if this works for you too, thanks!