10808 Posts in 2494 Topics by 1782 members
|Go to End|
25 April 2013 at 8:28pm Last edited: 26 April 2013 8:15pm
This is fixed on github now. Ingo committed a broader solution to the problem the day this was posted. Kudo's for the quick reaction!
When using the Translatable module (master branch from github dated 14/04/2013) the publishall function (http://<yoursite>/admin/pages/publishall) (http://api.silverstripe.org/3.0/source-class-CMSMain.html#1188-1240) is not working and just returns to the confirm form.
Upon investigation I found that Translatable strips the needed security token and the confirm parameter from the POST request that the publishall confirmation form sends.
As a workaround I added the following line after line 21 in the init function of TranslatableCMSMainExtension.php . There may be a more generic way as I suspect other CMSMain functions like buildbrokenlinks() to suffer from the same problem.
if($req->param('Action') == 'publishall') return;
(sorry for the bad layout, preformatted text get its leading white space stripped in the forum, even when tagged as a code block)
the line with the + in first position is the one that was added:
@@ -19,6 +19,7 @@
// $Lang serves as a "context" which can be inspected by Translatable - hence it
// has the same name as the database property on Translatable.
$req = $this->owner->getRequest();
+ if($req->param('Action') == 'publishall') return;
$id = $req->param('ID');
$this->owner->Locale = $req->requestVar("Locale");
|Go to Top|