Problem with editing Profile Data

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

slusan
Posts: 6
Joined: Fri Feb 08, 2013 3:08 pm

Problem with editing Profile Data

Post 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?.
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post by maschoff »

Please describe how you want to edit profile fields and what happens exactly.
OpenEMM Maintainer
slusan
Posts: 6
Joined: Fri Feb 08, 2013 3:08 pm

Re: Problem with editing Profile Data

Post 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
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post 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.
OpenEMM Maintainer
slusan
Posts: 6
Joined: Fri Feb 08, 2013 3:08 pm

Re: Problem with editing Profile Data

Post by slusan »

Thanks for the quick reply.

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


Image
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post 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.
OpenEMM Maintainer
slusan
Posts: 6
Joined: Fri Feb 08, 2013 3:08 pm

Re: Problem with editing Profile Data

Post 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.
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post 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.
OpenEMM Maintainer
slusan
Posts: 6
Joined: Fri Feb 08, 2013 3:08 pm

Re: Problem with editing Profile Data

Post 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") %>'
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post by maschoff »

If your line 139 looks like this then you are working with OpenEMM 2011, in OpenEMM 2013 this line is #148.
OpenEMM Maintainer
slusan
Posts: 6
Joined: Fri Feb 08, 2013 3:08 pm

Re: Problem with editing Profile Data

Post by slusan »

You're right, had the old file opened. Under 2013 it's Line 148.
captainpeter
Posts: 8
Joined: Wed Feb 13, 2013 4:45 pm
Location: Vienna / Austria

Re: Problem with editing Profile Data

Post 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
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post 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.
OpenEMM Maintainer
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem with editing Profile Data

Post 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!
OpenEMM Maintainer
Post Reply