Forward not working suddenly



I reassure Elgg team, the function forward() is working perfectly... except in one file of mine when I'm leaving localhost.


I'm explaining:

  • Someone books an item
  • He/she fills a form
  • The form is sent and the data is processed
  • The reservation is added in db (it's an object)
  • When it's done, the object is shown (with the file in views/default/object)

I've no problem in localhost but when it's time to forward toward the object file, when it's set online, it doesn't want to go to that file. What is strange is that it's the same URL used when I'm editing the reservation and there, I've no problem: when the editing is done, the view is appearing normally.


So in other words, for the same code, when I'm saving, the forward leads me to a blank page, when I'm updating (editing), the forward leads me to the right place.


Can someone explain me this one?


Oh yeah, I'm in 1.7.9.


Thanks in advance for the explanation (so that I can try to fix that before releasing the plugin I'm working on).



  • The live headers add-on for Firefox may provide useful information for debugging this. forward() sends a redirect header to the browser so checking that header is a good next step.

  • If you allow me to say that, I'll say it: WTF?! I decided to delete the file and to copy/paste the code into a new one with the same name. Guess what? The redirection is working now...


    Anyway, it's working fine now.


    @Cash, thanks for the tip but apart showing me that the redirect request wasn't sent, it hadn't really given other useful information. But thanks again :).