Gossamer Forum
Home : Products : DBMan : Installation :

TEXTAREA and infamous newline characters

Quote Reply
TEXTAREA and infamous newline characters
Hello there,

I've spent almost years (no, in fact days) to figure out why !?&%! newline characters are added in the following conditions:


If I enter one 'A' followed by a Carriage Return and then one 'B' on the second line, all is OK. The 'modify_successful' page displays the data correctly.

If I return in the Modify and I generate an invalid format in one field to get the 'modify_failure' page, the textarea field shows an empty line between the 'A' and the 'B'!!!

Then each time I validate the form, another newline character is added. It is a bug ?

When I put data patterns in this textarea with a validate_record returning OK, all is going well and all complicate positionning of the characters is retained in the 72x4 textarea.

Please, HHEEEELLLLLLLLPPPPPPPPPPPPPPPP !!!!

Cheers,
Germain
Quote Reply
Re: TEXTAREA and infamous newline characters In reply to
Hi Alex,

If I'm using the LIVE DEMO on your pages with "admin" user and if I modify one record by puting 1 2 3 in one column of the Description field and changing the URL so it doesn't start with 'http://', an error is displayed. But the data in the Description field looks vertically aligned without line spacing as I have entered them.

If I'm using the default files when DBman is unzipped and with the same scenario as above, I got space lines between 1 2 3 !!!

What did you change on the downloadable files versus the on-line demo ones ?

What do you think causes this problem ?

Thanks in advance for your needed help !

Cheers,
Germain

[This message has been edited by Germinator (edited March 10, 1999).]
Quote Reply
Re: TEXTAREA and infamous newline characters In reply to
I'm completely locked with this problem !
Surely I will become mad till it is not fixed ! Please could you inform me when the previous version used with the demo will be again released... Or an older one...

[This message has been edited by Germinator (edited March 10, 1999).]
Quote Reply
Re: TEXTAREA and infamous newline characters In reply to
I wanted to assure you that your question has not been ignored. It's just that I haven't a clue as to what to tell you about it.

Sorry.


------------------
JPD



Quote Reply
Re: TEXTAREA and infamous newline characters In reply to
Hi,

Turn on $db_debug in the config file, and post/email me a URL to the site where I can see it in action. I can't reproduce this even with the latest version..

Cheers,

Alex
Quote Reply
Re: TEXTAREA and infamous newline characters In reply to
Dear JPD and Alex,

Thank you for your appreciated attention despite you are already quite busy.

Alex, I've sent you an email with all details and I made my server available from the Net with your demo files showing the problem.

I really appreciate if you could debug this one. It should be something logical and it shouldn't be too long to trace because these files that you know well were just modified to have the correct path accessed, nothing else !

Cheers,
Germain
Quote Reply
Re: TEXTAREA and infamous newline characters In reply to
Hello there !

Finally I got it and, of course, the correction was madly simple:

Simply add the following line:

$in{'Text'} =~ s/\n//g;

at the beginning of the html_add_failure + html_modify_failure subroutines in html.pl.

In my case, I'm using only one TEXTAREA field named "Text".

Alex, I suggest you to include a better than this code in your next release to handle automatically all fields containing \n characters and so fix this annoying problem.

Thank anyway for your site visit !

As ones said in french: "Each pain desserves a salary". I will be glad to pay $100 at soon I'm finished with my web pages.

I invite all of you to do the same, in order to permit to maintain and develop in the future these successful scripts and forums !

Cheers,
Germain