Extensions running on FOF2 call JApplicationWeb->redirect to generate a 303 redirect AND define a Status 201. For example, saving an item.
In the past, Joomla generated a http 303 to the url and exited.
Now, J3.7 is calling the redirect AND generating the rest of headers, cancelling the 303 redirection that originated the call.
Successfull redirection
Blank page. No redirection. In the browser, headers show the Location where the browser must go and a non-300 Status header.
Joomla 3.7
The redirection call must use the same API to generate the headers AND replace any previously defined Status. A fix is coming.
JApplicationWeb, line 567
// All other cases use the more efficient HTTP header for redirection.
$this->setHeader('Status', $this->responseMap[$status], true);
$this->setHeader('Location', $url, true);
Labels |
Added:
?
|
Hi @franz-wohlkoenig , no, I've just tested the PR. #15730 is unrelated with this issue.
Category | ⇒ | com_redirect |
Status | New | ⇒ | Discussion |
@franz-wohlkoenig bit slow today? hahahahah close please.
Closed_Date | 2017-05-02 15:10:19 | ⇒ | 2017-05-02 15:10:20 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-02 15:10:19 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/15737
closed as having PR #15738.
There is a another fix without depending on core for FOF2 support. I have a view called item. For fix, I create a contoller name item.php and rewrite FOF2 redirect method
class MycomponentControllerItem extends FOFController
{
public function redirect()
{
if ($this->redirect)
{
$app = JFactory::getApplication();
$app->enqueueMessage($this->message, $this->messageType);
$app->setHeader('Status', 'HTTP/1.1 303 See other', true);
$app->setHeader('Location', $this->redirect, true);
$app->redirect($this->redirect);
return true;
}
return false;
}
}
Hi @nayemmajhar ,
Only the status must be corrected, because it was previously defined as 201. I've also added the Status update in my extension controllers for J 3.7.0.
Regards,
@anibalsanchez similar #15730?