Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Troubleshooting Help - Missing argument 5 for tep_draw_textarea_field()


Guest

Recommended Posts

Warning: Missing argument 5 for tep_draw_textarea_field(), called in /home/content/s/k/c/skcatholic/html/admin/mail.php on line 196 and defined in /home/content/s/k/c/skcatholic/html/admin/includes/functions/html_output.php on line 246

 

I get this in the order review page, and in the email a customer page.

 

I am not sure what it means, or what to do.

Link to comment
Share on other sites

I don't know if I can help, but what code do you have on mail.php, line 196?

:unsure:

 

I have this on 195, and 196:

 

				<td valign="top" class="main"><?php echo TEXT_MESSAGE; ?></td>
			<td><?php echo tep_draw_textarea_field('message', 'soft', '60', '15'); ?></td>

And it works with no error.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi Jim.

 

I have the same code on my lines 196 and 196 as you. But I am flipping back and forth between the mail.php file and the html_output.php page. After re-reading the error, it seems to be telling us that there is a field defined in the html_output.php file that has no corresponding value in the mail.php file. So it would be interesting to see what code you have in your html_output.php file on line 246.

 

I did notice that in my html_output file on line 246 (which is mentioned in the error code), I should have values on the mail.php file for $name, $wrap, $width, $height, $class, $text, and $parameters. I see that the first four categories (name, wrap, width, and height) have corresponding values in my mail.php file. The class, text, and parameters fields are not there. I am almost positivie this is what the error means. We have to input values for these fields in our html_output file or else continue to get the error message that an argument is missing.

 

here is a look ay my html_output.php code, line 246 (which is referenced in the error message):

 

function tep_draw_textarea_field($name, $wrap, $width, $height, $class, $text = '', $parameters = '', $reinsert_value = true) {

 

 

 

Compare this to the values from my mail.php file:

 

<td><?php echo tep_draw_textarea_field('message', 'soft', '60', '15'); ?></td>

 

If you would, JIM, please paste your html_output.php file :D

Link to comment
Share on other sites

Argument five is allowed to be "tep_not_null()"

 

$text = ''

 

Your function should look as follows: -

 

tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true)

Link to comment
Share on other sites

Argument five is allowed to be "tep_not_null()"

 

$text = ''

 

Your function should look as follows: -

 

tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true)

 

 

So could the problem be this little dangling bracket at the end of my code??:

function tep_draw_textarea_field($name, $wrap, $width, $height, $class, $text = '', $parameters = '', $reinsert_value = true) {

Link to comment
Share on other sites

function tep_draw_textarea_field($name, $wrap, $width, $height, $class, $text = '', $parameters = '', $reinsert_value = true) {

One has to wonder where that came from?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

yeah. that's what I was wondering about JIM. Maybe that is the culprit. well, I'll tinkle with it when I return from work at around 4AM. Have to leave out. But that Class thingy migh be it. Do you have that category in your html_output.php???

Link to comment
Share on other sites

Argument five is allowed to be "tep_not_null()"

 

$text = ''

 

Your function should look as follows: -

 

tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true)

 

 

So FWR MEDIA. I reviewed your post again, and see that the CLASS category should not be there. That is probably the bogeyman. There is no corresponding value for CLASS in my mail.php file. So I will remove the $class from my html_output.php file.

Link to comment
Share on other sites

And how to I put my code in that nice bordered pink box when I reply???

I do it this way.

 

Type or paste the text into the reply box.

 

Use the arrow keys to position the cursor to the beginning of the text you want to put in a CODE or TEXT box.

 

Hold down the shift key whill pressing the down arrow. The text appears in "inverse video" ( white text on a a dark background).

 

After you have all the text highlighted click the appropriate icon above the input box.

 

rte-code-button.png for a CODE box

 

rte-quote-button.png for a TEXT box.

 

And I have the same code Robert does, no $class

 

I've been told before that I have no class, I guess this proves it!

:lol:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

So FWR MEDIA. I reviewed your post again, and see that the CLASS category should not be there. That is probably the bogeyman. There is no corresponding value for CLASS in my mail.php file. So I will remove the $class from my html_output.php file.

 

That's the one.

Link to comment
Share on other sites

I figured the second syntax error by myself. The person who designed this template sure did a hatchet job with the HTML code!! And to think I paid 145 bucks for it. I have found OVER ten errors/problems since uploading my site. I had to work so hard to get answers for each one, and figured out others myself. I have lost so much time fixing coding errors with this template, that I have very little time left to actually upload items to my store!! My store should have been open a MONTH ago!

Link to comment
Share on other sites

I discovered what the $Class function is for. After deleting it, It took away the tool bar that sits on top of the Products Description Box, in the Admin panel :( So I had to put it back.

 

It turns out, my original guess was right: The $Class function can stay there, however, it simply needs to have an argument defining it in the mail.php file. That was the problem.

 

So I added '$message' to the: tep_draw_textarea_field of the mail.php file and VOILA!!

 

Whew! What a learning experience.

Link to comment
Share on other sites

I discovered what the $Class function is for. After deleting it, It took away the tool bar that sits on top of the Products Description Box, in the Admin panel :( So I had to put it back.

 

It turns out, my original guess was right: The $Class function can stay there, however, it simply needs to have an argument defining it in the mail.php file. That was the problem.

 

So I added '$message' to the: tep_draw_textarea_field of the mail.php file and VOILA!!

 

Whew! What a learning experience.

 

 

Hey, I also paid $145 for my template and I am very disappointed. Where did you add $message? I tried putting it in, I am still getting that error.

Link to comment
Share on other sites

Alright, so this is what I have got: Argument 5 is missing. Argument 5 is class.

 

When I removed it, it fixed everything. Now I don't see that anything disappears. What is that box above Product Description that you say disappears?

 

Here is my code with the error. By simply removing the $class, the problem goes away, but I am not sure that is good. How do I define $class?

 

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $class, $text = '', $parameters = '', $reinsert_value = true) {
$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';
if (tep_not_null($class))  $field .= ' ' .  'class="' . tep_output_string($class) . '"';
if (tep_not_null($parameters)) $field .= ' ' . $parameters;
$field .= '>';

 

			  <tr>
			<td valign="top" class="main"><?php echo TEXT_MESSAGE; ?></td>
			<td><?php echo tep_draw_textarea_field('message', 'soft', '60', '15'); ?></td>
		  </tr>

Link to comment
Share on other sites

Catholic:

 

 

I am outside responding to your message from my phone. As soon as I get home, I'll check to see exactly where I located the mail.phph file and exactly where, within the file, I added '$message'.

 

Also, is your error message EXACTLY the same??

 

 

Please post the actual error message if you can, as well as the part of the admin panel your error message shows up in.

Link to comment
Share on other sites

That's what I thought at first too. That simply deleting $Class did the trick. Then, when I logged into my administration panel to add a product description, I noticed that the toolbar was gone. It's the bar above the text box, like on here, that allows you to bold, underline, italicize, etc letters. Like when you write in the box to post on here. Check to make sure your Products Description box in still working correctly.

 

Did you by chance get yours from easytemplates, too??

 

Anyway, if your text box is OK, it might have removed some other function so put it back!

 

Take a look at this piece of your coding:

($name, $wrap, $width, $height, $class, $text = '', 

 

Now take a look at this piece:

('message', 'soft', '60', '15')

 

You will see that each item in the top code box has a corresponding value in the bottom box except class. So....

 

'$name' corresponds to 'message';

'$wrap' corresponds to 'soft';

'$width' corresponds to '60'; and so on.

 

For $class, input $message after the number '15' (dont forget to put your comma first AND to put the single quotes around $message).

 

P.S. Don't worry that 'text' appears to have no corresponding value. It actually has a null value.

Link to comment
Share on other sites

  • 11 months later...
Warning: Missing argument 5 for tep_draw_textarea_field(), called in /home/content/s/k/c/skcatholic/html/admin/mail.php on line 196 and defined in /home/content/s/k/c/skcatholic/html/admin/includes/functions/html_output.php on line 246

 

I get this in the order review page, and in the email a customer page.

 

I am not sure what it means, or what to do.

 

 

I am not sure if this will help anybody anymore, but I found out that this problem was not letting my site send emails out to customers. I found a fix, and tested it.

 

Replace the relevant line in HTML Output (the version in the admin section ofcourse) with this:

 

function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {

global $HTTP_GET_VARS, $HTTP_POST_VARS;

Link to comment
Share on other sites

  • 7 months later...

 

For $class, input $message after the number '15' (dont forget to put your comma first AND to put the single quotes around $message).

 

P.S. Don't worry that 'text' appears to have no corresponding value. It actually has a null value.

 

 

I had this problem after installing the TinyMCE in Products desc contrubution. the fix above worked a treat, thanks blueenigma.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...