Alexander Posted September 8, 2015 Posted September 8, 2015 @adrian My settings: Enable fields -> images, Filename format: site-{$page->name}, Rename on save is ON. If page->name = 'high-7' I lost one of file every save. I fix it with: site-{$page->name}-### Now everything except lightning.pw works fine. After submit new password on https://lightning.pw/login/change_password I get Safari can’t open the page “https://lightning.pw/login/change_password” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Thanks for your help!
adrian Posted September 8, 2015 Author Posted September 8, 2015 Thanks for the details. I think it must be a combination of the number in the page name and the "Rename on Save" setting. I am glad the custom ### option fixes it for you though I still can't reproduce it here though, so just curious, what version of PW and CUN are you running? 1
Alexander Posted September 17, 2015 Posted September 17, 2015 Hi @adrian, I have another strange issue. Some of images has new file name on the server but old name on the page. Maybe you have an idea why it can be happens and how is possible to solve this?
adrian Posted September 17, 2015 Author Posted September 17, 2015 Hi @adrian, I have another strange issue. Some of images has new file name on the server but old name on the page. Maybe you have an idea why it can be happens and how is possible to solve this? Are you still using the "Rename on Save" option? That is likely the culprit, although I am not completely sure why. Obviously I would like to get that completely reliable, but in the meantime, do you actually need it? If you are setting the name of the image based on $page->name and you don't have anyway of changing the name of a page when the title is changed (the default behavior in PW), then I don't think there is much point to that setting in your case. Just to confirm, is it the name of the image in the images field, or embedded into an RTE, or both? Is it random or can you give me a way to reliably reproduce it?
Alexander Posted September 17, 2015 Posted September 17, 2015 Dear Adrian, thank you for reply. I use Rename on Save because I need it for API (for front-end photos uploading). For this moment more than 100 pages affected, so I make copy from old backup and now copy each files back to actual server. (every page have 10-20 photos, so it's long story But I realise moment, when all this happened. I use this code to make changes for page field (I mean, field type page): $chalets = wire('pages')->find("template=chalet, chalet_dining.id=13664, include=all"); foreach ($chalets as $page) { $page->of( false ); $page->set("chalet_dining", 13668); wire( 'pages' )->save( $page ); $page->of( true ); echo $page->title; } After that all images on server get new names, but in database they still with previous file names. And I wish you good luck with new Padloper!
adrian Posted September 17, 2015 Author Posted September 17, 2015 Sorry, I don't have much time right now to test your page field scenario, but in general you shouldn't need "Rename on Save" to make it work for API uploading. I just tested to confirm, and everything still works for me when adding an image like: $page->images->add("http://myserver.com/image.jpg"); $page->of(false); $page->save(); What happens if you don't use "Rename on Save" at your end? I'd really like to help you debug this when I have a few spare minutes, but it seems like I will need to replicate your page field setup - maybe you could create a site profile that I could test with? Padloper is actually by @apeisa, but I am sure he'll appreciate your best wishes
Alexander Posted September 18, 2015 Posted September 18, 2015 @adrian, Let's leave this for the next week when my colleague, who take care about front-end come back from vacation. And now I know that @adrian @apeisa not mirrored nicknames or same person
adrian Posted September 19, 2015 Author Posted September 19, 2015 @adrian, Let's leave this for the next week when my colleague, who take care about front-end come back from vacation. Sounds good - please follow up with me when he is back - hopefully I can reproduce the issues you are having.
ukyo Posted December 9, 2015 Posted December 9, 2015 I have problem with image field inside repeater. Firstly i think its caused from ProcessWire core but ryan checked issue and issue cause from this module. You can see issue details in here : https://github.com/ryancramerdesign/ProcessWire/issues/1541
adrian Posted December 10, 2015 Author Posted December 10, 2015 Thanks for the report @ukyo - sorry that you and Ryan spent time debugging this. I have committed a new version which appears to fix the problem for me. Could you please test and let me know if it now works for you? If anyone is interested in what the problem was, take a read of the Github issue. 1
ukyo Posted December 10, 2015 Posted December 10, 2015 Thanks for quick response. It look like ok now. I tested it with default (3) ready to use fields. 1
adrian Posted September 27, 2016 Author Posted September 27, 2016 Hi everyone, I just added multi-language support to this module. I use it with alternate language file fields for translated versions of PDFs. In my example, I have these two fields: document_pdf document_pdf_portugues I am using this filename format setting: {$page->title} Now when I upload, the PDF gets renamed to match the title of the page based on the language suffix of the field, eg. a page with these multi-language titles: My Document Title (default) | Meu Título do Documento (portugues) results in pdfs named: my-document-title.pdf | meu-título-do-documento.pdf Please note that I am still pretty new to this multi-language stuff, so let me know if you have any problems or have ideas for improvements. 2
videokid Posted October 1, 2016 Posted October 1, 2016 Hi, I got an error Error: Call to a member function get() on a non-object (line 346 of DIR_\site\assets\cache\FileCompiler\site\modules\ProcessCustomUploadNames\ProcessCustomUploadNames.module) After installing 'language support' it works... Grtz 1
adrian Posted October 1, 2016 Author Posted October 1, 2016 2 hours ago, videokid said: Hi, I got an error Error: Call to a member function get() on a non-object (line 346 of DIR_\site\assets\cache\FileCompiler\site\modules\ProcessCustomUploadNames\ProcessCustomUploadNames.module) After installing 'language support' it works... Sorry about that - it should be fixed in the latest version. 1
videokid Posted October 1, 2016 Posted October 1, 2016 No sorry needed After reading ' multi-language support', I had the feeling the problem was somewhere there, just wanted to notify you about this.... 1
adrian Posted October 1, 2016 Author Posted October 1, 2016 Just now, videokid said: No sorry needed After reading ' multi-language support', I had the feeling the problem was somewhere there, just wanted to notify you about this.... It's a very important fix though - I wouldn't want to break anyone's non ML site if they upgraded to the latest version of this module, so very glad you reported this. 2
adrian Posted October 3, 2016 Author Posted October 3, 2016 @JoZ3 - sorry about the trouble - what version of the module did you upgrade from? That curly brace was added for PHP7, and I tested on 5.6, but maybe there is a problem with 5.3. I am sure I can write it a little differently to avoid the problem on 5.3, but just want to make sure that's definitely the issue.
adrian Posted October 3, 2016 Author Posted October 3, 2016 Could you try the attached version (just replace this .module file). ProcessCustomUploadNames.module 1
adrian Posted October 3, 2016 Author Posted October 3, 2016 34 minutes ago, JoZ3 said: Thanks mate, works fine!!!!! Great - I have pushed that version to Github. 2
ukyo Posted October 13, 2016 Posted October 13, 2016 Hi @adrian can you add support for CROPPABLE IMAGE 3 module. If i add croppable image 3 field to custom upload names filter, when i want to upload file upload progress not finishing. Also i will put this problem link to Croppable Image 3 module post, because i don't know which module causing this error. When i refresh page without save page, i can see these pictures names changed and uploaded.
adrian Posted October 13, 2016 Author Posted October 13, 2016 I'll take a look, but can you first post a screenshot of your settings for this module and also any dev console Network tab errors coming from the upload ajax request? 1
ukyo Posted October 13, 2016 Posted October 13, 2016 20 minutes ago, adrian said: I'll take a look, but can you first post a screenshot of your settings for this module and also any dev console Network tab errors coming from the upload ajax request? Sorry for early post before check console errors. Its look like error causing from Croppable Image 3 module. When i check ajax request there is an error: Notice: Trying to get property of non-object in /website/site/modules/CroppableImage3/InputfieldCroppableImage3/InputfieldCroppableImage3.module on line 139 File: site/modules/CroppableImage3/InputfieldCroppableImage3/InputfieldCroppableImage3.module $attr['data-image'] = $pagefile->getCrop($suffix)->url; I think the module can't get data, because name is changed. Here is custom upload names module filter settings : 1
adrian Posted October 13, 2016 Author Posted October 13, 2016 Hi @ukyo - thanks for those details. Unfortunately I can't reproduce the problem here. I put this Tracy dump call just before line 139 (as reported in the error): bd($pagefile->getCrop($suffix)->url); and it is correctly reporting the url to the cropped version of the file. Perhaps there is a certain sequence of events that is required to trigger the error. Could you please detail exactly the steps involved starting from a new images field, including the crop settings you have configured for the field. 1
horst Posted October 13, 2016 Posted October 13, 2016 @adrian & @ukyo: I'm not aware of any upload processing done by CroppableImage3. It only extends the coreimage field in some points, but nothing in regard of uploading. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now