Advertisement:

Author Topic: Header error when trying to Post Item  (Read 5657 times)

hirokamitai

  • Newbie
  • *
  • Posts: 14
Header error when trying to Post Item
« on: November 18, 2010, 10:12:58 pm »
Good work on all of the hard work put into Osclass. So far it has been a really good tool. Currently I am having trouble posting items. I am using OSClass-2139d76 with default theme. I have no trouble registering and logging in users, but when a user tries to post an item from the item page I get this error:

Invalid address: You must provide at least one recipient email address.
Warning: Cannot modify header information - headers already sent by (output started at/public_html/cullmanlist/oc-includes/phpmailer/class.phpmailer.php:464) in /public_html/cullmanlist/oc-includes/osclass/utils.php on line 36

Any ideas?

Jacob

  • Newbie
  • *
  • Posts: 17
Re: Header error when trying to Post Item
« Reply #1 on: November 19, 2010, 01:34:44 am »
I second this. Although when re-entering the site, items are actually in the system.
I get the same message but the first line is "message empty" (and it's not obviously).

I am now trying to compare the code with a working version using winmerge but it's going to take some time (I have no idea what I'm doing), I'll let you know if I find anything.

hirokamitai

  • Newbie
  • *
  • Posts: 14
Re: Header error when trying to Post Item
« Reply #2 on: November 21, 2010, 08:04:07 am »
Good news...I have solved my issues after quite a bit of testing....it turned out to most likely be an error that occurs when using Notepad to edit php files. I reinstalled OSClass and edited all the files using Notepad++. The website is currently fully functional with no header errors.  ;D

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Header error when trying to Post Item
« Reply #3 on: November 21, 2010, 07:17:01 pm »
How have you solved hirokamitai?

hirokamitai

  • Newbie
  • *
  • Posts: 14
Re: Header error when trying to Post Item
« Reply #4 on: November 21, 2010, 10:46:14 pm »
 :(.......bad news.... I thought I had solved the problem by reinstalling OSClass and using only Notepad++ to edit the php files. But after one day...I again got the error "cannot modify header" when user is trying to post an item......

I have again reinstalled and the site is working....but I feel that the error will eventually happen again.  Something is changing my files because it works fine for about a day and then after that I will get the error.

I am not sure if this is related, but when adding location for United States, it does not show up. If I try Spain it works well. But US does not add to the list...?

I will keep testing to find when and why this error occurs, but if anyone has any ideas let me know.

It might be nice to try a stripped down version of the OSClass without the location feature. Something more basic but fully functioning.
« Last Edit: November 21, 2010, 10:48:10 pm by hirokamitai »

Jacob

  • Newbie
  • *
  • Posts: 17
Re: Header error when trying to Post Item
« Reply #5 on: November 22, 2010, 02:09:31 am »
I can't find the bloody spot. All versions up to 1.1 beta worked but gamma and delta both giving me this header error.
This issue could really use some attention, I haven't even seen it being reported on issues.osclass.com properly.

Tomorrow there's a new release.. fingers crossed they are working on it. Dear developers, make no mistake - this effort is valued so thank you and I hope to see a working release.

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Header error when trying to Post Item
« Reply #6 on: November 22, 2010, 10:19:58 pm »
New release uploaded :-) All the feedback is welcome.

hirokamitai

  • Newbie
  • *
  • Posts: 14
Re: Header error when trying to Post Item
« Reply #7 on: November 23, 2010, 01:18:29 am »
 :)So far the new release has been effective. 


Jacob

  • Newbie
  • *
  • Posts: 17
Re: Header error when trying to Post Item
« Reply #8 on: November 23, 2010, 02:57:20 am »
Sorry to disappoint but I still get this error. Maybe someone could have a look,
Everytime I post anything, I get this message:
"
Message body empty
Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/o/n/convertingtips/html/RC/oc-includes/phpmailer/class.phpmailer.php:586) in /home/content/c/o/n/convertingtips/html/RC/oc-includes/osclass/utils.php on line 36
"
In spite of this, the system does send me a validation link and items end up showing where they should. It's just this message that show up for no reason and going to scare the users away  :'(

If anyone wants to have a look I've temporary hosted it in the following location: http://www.convertingtips.com/RC

sud34

  • Newbie
  • *
  • Posts: 5
Re: Header error when trying to Post Item
« Reply #9 on: November 23, 2010, 09:47:03 am »
i am like you i have the same problem

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Header error when trying to Post Item
« Reply #10 on: November 23, 2010, 12:07:01 pm »
To whom is addressed the email?

It should send two emails (depends on your configuration). One to admin (informing there's a new item) and one to the user (with validation link if that option is ON at the admin panel). If the user is not logged (and you allow non-register users to post new items) then there's another email with validation link /edit / delete links (since it's not logged, they don't have an account, but they could still modify the item for a short period of time).


Thanks

Jacob

  • Newbie
  • *
  • Posts: 17
Re: Header error when trying to Post Item
« Reply #11 on: November 24, 2010, 01:29:02 am »
Just to the admin, as set in the configurations.
You are right about what's need to be done:
I have a temporary work around if you need it - it's sent when the validation link is sent, assuming the option is selected through the admin:

Just add this code to notifications.php (oc-includes\osclass)
just after the validation link and before this line "            $body .= "<br/>--<br/>" . $preferences['pageTitle'];    "
add the following code:

$body .= __('You can edit your item by clicking on this link') . ': <a href="' . ABS_WEB_URL . '/' . 'user.php?action=item_edit&id=' . $item['pk_i_id'] . '&secret=' . $item['s_secret'] . '" >' . ABS_WEB_URL . '/' . 'user.php?action=item_edit&id=' . $item['pk_i_id'] . '&secret=' . $item['s_secret'] . '</a><br/>';

$body .= __('You can delete your item by clicking on this this link') . ': <a href="' . ABS_WEB_URL . '/' . 'user.php?action=item_delete&id=' . $item['pk_i_id'] . '&secret=' . $item['s_secret'] . '" >' . ABS_WEB_URL . '/' . 'user.php?action=item_delete&id=' . $item['pk_i_id'] . '&secret=' . $item['s_secret'] . '</a><br/>';



Yeah.. I know.. I'm a genius :)
Still can't solve the problem with the header though.. I've tried a gmail server, smtp localhost - I don't think that's the problem.




Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Header error when trying to Post Item
« Reply #12 on: November 24, 2010, 03:13:58 pm »
wow! finally we've seen the error!

We're working right now to solve it: http://issues.osclass.org/browse/OSCLASS-233

In addition, thanks Jacob for this collaboration :-) We'll certainly add this edit and delete links.

Jacob

  • Newbie
  • *
  • Posts: 17
Re: Header error when trying to Post Item
« Reply #13 on: November 25, 2010, 03:03:39 am »
Juan and Conejo, Great work - it's flawless!
2 Thumbs up  ;D

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Header error when trying to Post Item
« Reply #14 on: November 25, 2010, 12:58:59 pm »
If you see more error, notify us!! :)