-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fileTree - bad request #51
Comments
Hello, |
Need more information, what is the reason for the 400? What do the logs tell? There is nothing we can "guess" here aside from rebuilding your setup for which we simply do not have the time at the moment. If you shed more (detailed) light on the basics like: "If I do X, I expect Y but instead Z happens." |
same issue... lates Contao and mcw-version, nothing else installed. "If I use the fileTree in mcw, I expect to pick up an image from the filetree with the same behavoir as in the normal use-case as in a normal dca, but instead of it i get a HTTP 400 Error." On first use/try: On second use/try: the problem as Video: The Video shows also a other error on second 8th... |
I'm getting the same error.
Code: // vendor/contao/core-bundle/src/Resources/contao/classes/Ajax.php line 282 ff.
// The field does not exist
if (!isset($GLOBALS['TL_DCA'][$dc->table]['fields'][$strField]))
{
$this->log('Field "' . $strField . '" does not exist in DCA "' . $dc->table . '"', __METHOD__, TL_ERROR);
throw new BadRequestHttpException('Bad request');
} Seems like contao is expecting a simple field name and can not handle the MCW representation.
|
There's logic to handle the reloadFiletree/reloadPagetree ajax calls, but the hook/event listener that changes the action parameter of the ajax request, so it'll be handled by mcw instead of the contao core is not executed in this case. As the field name does not match the requested pattern, it returns at this point: For some reason the field names seem to be missing the "row_" part. Edit: Maybe the name shouldn't contain "row_"? I don't know the internal workings of mcw well enough to tell, but it kinda looks like it to me. In that case, the changes from 2ca3e5a might be the root cause. |
I got a similar error since Contao 4.7.7 and contao-multicolumnwizard-bundle 3.4.2. I don't see any way to fix this currently and cant update the project. Before update: $("ft_imageHeroSlider[0][image]").addEvent("click", function(e) {
e.preventDefault();
Backend.openModalSelector({
"id": "tl_listing",
"title": "image",
"url": this.href + document.getElementById("ctrl_imageHeroSlider_row0_image").value,
"callback": function(table, value) {
new Request.Contao({
evalScripts: false,
onSuccess: function(txt, json) {
$("ctrl_imageHeroSlider_row0_image").getParent("div").set("html", json.content);
json.javascript && Browser.exec(json.javascript);
}
}).post({"action":"reloadFiletree", "name":"imageHeroSlider_row0_image", "value":value.join("\t"), "REQUEST_TOKEN":"token"});
}
});
}); After update: $("ft_imageHeroSlider[0][image]").addEvent("click", function(e) {
e.preventDefault();
Backend.openModalSelector({
"id": "tl_listing",
"title": "image",
"url": this.href + document.getElementById("ctrl_imageHeroSlider_row0_image").value,
"callback": function(table, value) {
new Request.Contao({
evalScripts: false,
onSuccess: function(txt, json) {
$("ctrl_imageHeroSlider_row0_image").getParent("div").set("html", json.content);
json.javascript && Browser.exec(json.javascript);
}
}).post({"action":"reloadFiletree", "name":"imageHeroSlider[0][image]", "value":value.join("\t"), "REQUEST_TOKEN":"token"});
}
});
}); |
any new information? The Fork from Aziz isnt working for me in Contao 4.4.44 |
My dirty fix was this:
Maybe this helps someone. |
Hoftix release 3.4.4 - Fix post ajax contao name changes. See #51. - Replace the class invisible with hidden - Hotfix css full with for the wizard. - Add the documentation for the hidden buttons.
no response - I close the issue |
fileTree still doesn't work in 3.4.9 :( |
Contao 3.5 and lower is no longer in service |
Contao 4.9 Btw. "Contao 3.4.9" does not exist https://de.wikipedia.org/wiki/Contao Update: I think the columnsCallback could be the reason... it is buggy or not all features are included. Look also here please menatwork/MultiColumnWizard#118 |
Contao 4.9
see first post works fine ... for all other open a new issue |
This does not work with columnsCallback... |
solange Du Deine Code nicht postest, teste ich NIX! |
|
das hat doch mit dem Code aus https://github.com/menatwork/contao-multicolumnwizard-bundle/issues/51#issue-457456709 nichts zu tun - wie geschrieben: mach bitte ein neues Ticket auf |
Stimmt. Sorry, mein Fehler... |
Hello,
i get an error when selecting a file with mcw:
mootools.min.js,mooRainbow.min.js,chosen.min.js,simplemodal.min....-335f0911.js:1 POST http://hiddenurl.de/contao?do=Produkte&act=edit&id=43&rt=RCRDuSTG1gpVyN0e450RkTyzIWGORbyEZzl27b9d4Ns&ref=78qZ1WDQ 400 (Bad Request)
i use this dca:
Contao 4.7 with own extension in src, mcw dev-master
The text was updated successfully, but these errors were encountered: