Hard Return Truncates Textarea Data

Discuss, research, share, find, and solve bugs

Hard Return Truncates Textarea Data

Postby RationalRabbit » 10:33am, Thu 23 Aug, 2007

I noticed that someone posted this problem over a year ago and never got a reply. :shock:

When a hard return is used in an attribute textarea, the remaining data is truncated - apparently when inserting into the database.
The user is totally unaware their text is not all making it to its intended destination.
I've never incurred this problem with PHP or MySQL, and I haven't looked at the db. Perhaps it is the field type being used?

This is not cool - I have people sending me comments and I am having to e-mail them and ask them what the comments were, and these are potential web clients.

:?: Can anyone lend some insight, and maybe a hack, if necessary?
RationalRabbit
PL Nut
 
Posts: 15
Joined: 8:40am, Thu 23 Aug, 2007
Location: Seattle, Washington

Postby H2B2 » 3:47am, Fri 24 Aug, 2007

Seems related to this report: http://mantis.phplist.com/view.php?id=5880

This should have been fixed in the current 2.10.4 release. If not in your case -assuming you have 2.10.4- you'd best add a feedback note to the above report, giving sufficient server/system details to help reproduce the problem.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Yes - Current version

Postby RationalRabbit » 7:24am, Sat 01 Sep, 2007

Yes, I'm running 2.10.4. I will do that.
RationalRabbit
PL Nut
 
Posts: 15
Joined: 8:40am, Thu 23 Aug, 2007
Location: Seattle, Washington

Storing in Database okay

Postby RationalRabbit » 7:45am, Wed 31 Oct, 2007

5880 wasn't really related, and my ticket was commented as resolved when it wasn't but oh well - when I have time I'll fix it and post it.

Just a quick correction, since I am here.
I'm surprised this hasn't been discussed more. Perhaps not many use textarea fields in their subscribe pages.

The full text of textarea comments IS storing in the database. The problem is in the routine that saves the text to the variable that is displayed in the e-mail sent to admin, or in the processing of that variable in the e-mail.

A second interesting problem with using a textarea field - Even though I have required set to "off", the check still looks upon the textarea as a required field. (And here I thought my subscribers were all just dying to communicate something!)
RationalRabbit
PL Nut
 
Posts: 15
Joined: 8:40am, Thu 23 Aug, 2007
Location: Seattle, Washington

I realize this an old thread but...

Postby Guest » 11:00pm, Thu 27 Nov, 2008

I am experiencing the same issue, I am using 2.10.4

I have a textarea for subscribers to enter their address, the address goes in fine when they sign up but when they review their information and push the update button any text in the textarea that was wrapped to the second line is clipped off.

I checked and even if a hard return is used on the initial sign up all the text goes into the database. The process of writing it a second time fails to write anything after the new line return.

Anyone else experiencing this? any solutions...

Thanks
Guest
 

Postby H2B2 » 2:49am, Fri 28 Nov, 2008

I don't believe this has been fixed yet. The issue has been reported by several users, e.g.:
http://mantis.phplist.com/view.php?id=11231
http://mantis.phplist.com/view.php?id=5880
http://forums.phplist.com/viewtopic.php?p=42115#42115

However, it seems the developers were not able to reproduce it at the time (see http://mantis.phplist.com/view.php?id=5880 ).

It might be a good idea to add a note on your experiences to the above mantis reports, and include some info on your server setup. In short, enough info to allow developers to reproduce and fix the issue.

If you are only using the textarea to register user addresses, you could consider using several textfields instead of one textarea, as a workaround.

I'll move this thread to the 'bug discussion' forum.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby Guest » 3:47am, Fri 28 Nov, 2008

Thanks for the reply,I have a question though. If I remove the textarea address attribute and add text input fields what will happen with the data in the textareas?

The best fix for me would be a proper fix since the data has gone into the database intact and it has only been compromised by the subscribers who have changed something.
Guest
 

Postby H2B2 » 3:59am, Fri 28 Nov, 2008

Morecoffee wrote:If I remove the textarea address attribute and add text input fields what will happen with the data in the textareas?
I'm not quite sure, but there's a fair chance you will loose the data. You should probably only consider using this workaround if you do not yet have a populated production install.

I agree entirely this issue should be fixed. Hence the importance of providing developers with feedback notes and reports that will allow them to reproduce the problem on their installations. :wink:
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby Guest » 4:23am, Fri 28 Nov, 2008

I did the Mantis post, at least I think I did. I joined and then submitted the post. I have not found it yet however.

I think it must have something to do with the new line character. It must stop the write to the database when the subscriber edits their info. I had a bit of a look but I do find it hard to read others code. I do write PHP but not at the level required to edit the PHPList code.

Cheers
Last edited by Guest on 11:46pm, Fri 28 Nov, 2008, edited 1 time in total.
Guest
 

Postby Guest » 11:01pm, Fri 28 Nov, 2008

Ok my post is on the list. I am now wondering how long it usually takes to correct an issue like this. I realize it is open source so it may be a while. I have 450 on the list now and am wondering if I should just bite the bullet and change my form over to all text input fields and manually re-enter all the address info. The address field was not mandatory, not sure at this point how many actual entries I will need to do...
Guest
 

Postby RationalRabbit » 8:13am, Wed 14 Jan, 2009

Keep this comment in mind:

The full text of textarea comments IS storing in the database. The problem is in the routine that saves the text to the variable that is displayed in the e-mail sent to admin, or in the processing of that variable in the e-mail.


So the problem seems to be in the outgoing mail system or the method PHPList is using to handle that data in processing it to the outgoing mail.
RationalRabbit
PL Nut
 
Posts: 15
Joined: 8:40am, Thu 23 Aug, 2007
Location: Seattle, Washington

Postby Guest » 5:47pm, Wed 14 Jan, 2009

The problem is not in the write to the email. There is actual clipping of everything after the first line when the user reviews and updates their information.
Guest
 


Return to Bug Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron