Closed typneun closed 6 years ago
Hi @typneun - sorry you're having troubles. I just tested here and everything worked as expected.
I assume you have disabled the rule to make sure the image upload is working normally?
Can you send a screenshot of the rule you have defined?
Can you also open up your browser dev console and let me know the console error - you will likely need to go to the Network tab (and start the upload after it is open) and click on the upload script file (will probably be red) and let me know the error message.
Hi Adrian, thanks for your quick answer!
The error only occures when one of the selected fields is inside of a RepeaterMatrix.
Thanks, but I really need the Response tab for the upload. This is what I am looking for:
But there should be an error message there instead of the clean json you're seeing in my example.
Ah, I finally got the error.
<br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/www/htdocs/xxxxxxxx/websites/entwicklung/fih/site/assets/cache/FileCompiler/site/modules/ProcessCustomUploadNames/ProcessCustomUploadNames.module</b> on line <b>444</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/www/htdocs/xxxxxxxx/websites/entwicklung/fih/site/assets/cache/FileCompiler/site/modules/ProcessCustomUploadNames/ProcessCustomUploadNames.module</b> on line <b>444</b><br /> [{"error":false,"message":"Datei hinzugef\u00fcgt: dxlizsydt.jpg","file":"\/site\/assets\/files\/1307\/dxlizsydt.jpg","size":5222914,"markup":"<li id='file_8d51c00020e155ef40c90a2173ba3adb' class='ImageOuter gridImage ui-widget'><span class=\"aos_moveAssets\"><i title=\"Move to last\" class=\"fa fa-step-backward\" data-down><\/i><i title=\"Move to first\" class=\"fa fa-step-forward\" data-up><\/i><\/span><div class='gridImage__tooltip'><table><tr><th>Dimensionen<\/th><td>3000x1991<\/td><\/tr><tr><th>Dateigr\u00f6\u00dfe<\/th><td>5,101 kB<\/td><\/tr><tr><th>Varianten<\/th><td>0<\/td><\/tr><\/table><\/div>\n\t\t\t<div class='gridImage__overflow'>\n\t\t\t\t<img src=\"\/site\/assets\/files\/1307\/dxlizsydt.0x260.jpg?nc=1513609536\" alt=\"\" data-w=\"3000\" data-h=\"1991\" data-original=\"\/site\/assets\/files\/1307\/dxlizsydt.jpg?nc=10\" \/>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<div class='gridImage__hover'>\n\t\t\t\t\t<div class='gridImage__inner'>\n\t\t\t\t\t\t<label for='' class='gridImage__trash'>\n\t\t\t\t\t\t\t<input class='gridImage__deletebox' type='checkbox' name='delete_gallery_repeater1307_8d51c00020e155ef40c90a2173ba3adb' value='1' title='L\u00f6schen' \/>\n\t\t\t\t\t\t\t<span class='fa fa-trash-o'><\/span>\n\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t<a class='gridImage__edit'>\n\t\t\t\t\t\t\t<span>Bearbeiten<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<div class='ImageData'>\n\t\t\t\t\t<h2 class='InputfieldImageEdit__name'><span contenteditable='true'>dxlizsydt<\/span>.jpg<a href=\"\/site\/assets\/files\/1307\/dxlizsydt.jpg\" target=\"_blank\" class=\"aos_downloadAsset\" download title=\"Download\"><i class=\"fa fa-download\"><\/i><\/a><\/h2>\n\t\t\t\t\t<span class='InputfieldImageEdit__info'>5,101 kB, 3000×1991 <\/span>\n\t\t\t\t\t<div class='InputfieldImageEdit__errors'><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__buttons'><small><a href=\"\/site\/assets\/files\/1307\/dxlizsydt.jpg\" target=\"_blank\" class=\"aos_downloadAsset\" download title=\"Download\"><i class=\"fa fa-download\"><\/i><\/a><button type='button' data-href='\/control\/page\/image\/edit\/?id=1307&file=1307,dxlizsydt.jpg&rte=0&field=gallery' class='InputfieldImageButtonCrop ui-button ui-corner-all ui-state-default pw-modal-large pw-modal' data-buttons='#non_rte_dialog_buttons button' data-autoclose='1' data-close='#non_rte_cancel'><span class='ui-button-text'><span class='fa fa-crop'><\/span> Zuschneiden<\/span><\/button><button type='button' data-href='\/control\/page\/image\/variations\/?id=1307&file=dxlizsydt.jpg&modal=1&varcnt=varcnt_gallery_repeater1307_8d51c00020e155ef40c90a2173ba3adb' class='ui-button ui-corner-all ui-state-default pw-modal-large pw-modal' data-buttons='button'><span class='ui-button-text'><span class='fa fa-files-o'><\/span> Varianten <span class='ui-priority-secondary'>(0)<\/span><\/span><\/button><\/small><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__core'><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__additional'><\/div>\n\t\t\t\t\t<input class='InputfieldFileSort' type='text' name='sort_gallery_repeater1307_8d51c00020e155ef40c90a2173ba3adb' value='0' \/>\n\t\t\t\t\t<input class='InputfieldFileReplace' type='hidden' name='replace_gallery_repeater1307_8d51c00020e155ef40c90a2173ba3adb' \/>\n\t\t\t\t\t<input class='InputfieldFileRename' type='hidden' name='rename_gallery_repeater1307_8d51c00020e155ef40c90a2173ba3adb' \/>\n\t\t\t\t<\/div>\n\t\t\t<\/li>","replace":false,"overwrite":0}]
Thanks - unfortunately I still can't reproduce. I could add a quick fix to prevent the error, but I'd like to reproduce so I know exactly what scenario is causing it. Could you please let me know the names and types of all the fields in the repeater matrix, as well as any image/file fields you have on the main template for the page.
It might also be helpful if you could let me know the values of $repeater and $rf on that line.
I'm sure we'll figure it out once I know this stuff.
Thanks for your help.
Hi Adrian,
I cloned the entire project and uploaded it to our server. I also created an admin account for you. Do you have a specific email address to which I could send you the login? Thanks!
Sounds good - maybe rather than posting an email address here, could you PM me on the PW forums?
Ok, I did that!
Hi Adrian!
First of all, thanks for your really handy Module.
We have a problem with CustomUploadNames and the ProFields RepeaterMatrix. Image fields inside the Matrix don't upload files anymore – instead, the progress spinner rotates forever, even when the file is already uploaded.
We're running: • ProcessWire 3.0.62 • ProFields RepeaterMatrix 0.0.4 • CustomUploadNames 1.0.5
Thanks for your help!