Jump to content

François Lacruche

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by François Lacruche

  1. @BrendonKoz Thanks for your reponse, yes this would absolutely be the reasonable solution in most cases, but the structure I have here is weird and it seemed relevant to have 2 separate fields at the time I created it. Maybe in hindsight I still should have gone for this solution, but it's just a personal project so I can't be bothered to change everything now, I'll have it learned for next time :^) @dynweb Thank you very much this is what I was looking for. Here's what I ended up doing, it works perfectly if ($cover_image) { $images = $images->prepend($item->cover_image); } if ($cover_video) { $videos = $videos->prepend($item->cover_video); }
  2. Disclaimer : it may be very dirty to do this and I'm pretty sure there are better solutions in the bigger picture. But I'm mostly just curious about this particular case. Here's the situation: I'm creating a pretend portfolio. My projects have a cover image (single image field) and a project images field (multiple images field) In my project gallery I would like to include the cover image aswell as the other images. This can be easily solved by uploading the cover image aswell as the other images inside the multiple images field. But this creates a duplicate image file, which I'd like to eliminate. Can I merge this single image with the multiple images field so that I don't have to upload the former twice ? I also have the same scenario with file/files fields for video projects (would that work any differently ?). Let's say these are my fields: $images = $item->images; $cover_image = $item->cover_image; A caricature of what I'd like would be something like this: $all_images = $cover_image . $images; But this quite obviously doesn't work, and neither does the following (tried to "fix" the resulting syntax, but this results in the output to no longer be an array anyway) $all_images = trim($cover_image . (cover_image ? '|' : '') . $images, '|'); That's pretty much it, curious if there's a simple solution to this, my searches were vain so far (I'm not sure of the correct terminology to call what I'm searching for, which doesn't help)
  3. Coming back to this subject after a while, with a question I didn't ask msyelf earlier : can having used this command pose any security threat for later when I'll upload this site ? Should I restrict the permissions more now that I understood the root of my original issue ? And if yes how should I research to find the approriate answer for my case (unless you have an easy/direct answer) ?
  4. The chmod command fixed everything. Thank you very much ! Weird that syncing files changes permissions that way. By the way, this exact syntax didn't work for me (no such file or directory) chmod -R og+rw /site/assets but this one did chmod -R og+rw site/assets Idk if this is because of where I was in the file system or something (I'm generally unfamiliar with git bash) but leaving it here to potentially save a few minutes to the next unexperienced person ? Thank you again !!
  5. Yes the website is running on my localhost. Yes the site is still accessible, and yes I can access the admin: it is where the errors are being displayed. Screenshot below. After further investigation it seems that only image/file fields are affected (I didn't test every field type but these are the ones I have that are broken). Text & checkbox fields, for instance, appear to be fully functional, I can save them and they update the site accordingly. Thank you for your help ? I'm going to try the solutions you're proposing tomorrow and update the post accordingly. Feel free to tell me if this additional info change your mind.
  6. Hello, I basically misclicked my htaccess folder into being synced with my Drive (don't ask me how). While the local site I was working on under htaccess still functions, I cannot edit anything anymore in PW without getting "destinationPath is not writable" on save. While the folder is now back to being completely unsync'd with Drive, the issue still persists and it seems it has permantently messed something up in the PW install. Thankfully I'm in no rush and would like to take this as a learning opportunity. I'm still mainly a designer and still not so familiar with many things backend-related. Feel free to ask me anything more you'd need to know.
  7. Ohhhh jeeez that might have been it. I ended up just installing PW again because I had to move on with the project. But I was moving the files using cpanel's file explorer (where .htaccess is hidden) and not filezilla (where it's visible). I'll mark this as solved because this is 99% it even though I moved on and can't fully confirm.
  8. Hey @Gideon So, thanks for your answer Well I thought that's what I had done in the first place, but I did it again following more precisely what you described and it produces the same result : 404 not found on the the domain-name/processwire admin, and 404 on the form (embed). I downloaded the processwire-master folder entirely, then deleted it from the public_html webroot, then reuploaded only the contents it (site, wire, etc). I also tried just moving the processwire-master to the ...I guess server root ? (1 folder up from public_html) then moved everything inside back to public_html. Same result in all cases. Did I misunderstand your directions ?
  9. Hi. Still quite new to processwire and general web developement. After working on localhost for a while, I wanted to upload my site to my live server. But I forgot to remove processwire-master folder from the structure as I installed my processwire profile on my live database (I'm not even quite sure when I should have done that - just after unzipping processwire-master to my root ?). Anyway now I'm stuck with that and even though I could probably install again I feel like this could be somewhat of a learning experience. So how can I move cleanly and properly my site back to the root, and removing pw-master in the process ? I've done the obvious which was, well, just moving the thing back 1 step in the folder structure. But exepectedly, I couldn't access the admin anymore because the url was now wrong, and my ProForm was also missing from the homepage (404). I've tried looking into existing forum posts with little success as I'm not too sure of how to describe my issue other than the title of this post. Please excuse my poor level of technical skills, I come from the design side of things and many things are still black magic to me ?
  10. Hi, did you end up fixing that ? I'm encountering a similar issue.
  11. I think I just made a shitty mistake. I'm a pretty beginner developer. It just occurred to me that part of the website (all the stuff ignored by git) I was working on locally was not backed up. So I sync'd it all on my drive just to be safe for now, until - I thought to myself - I would find a better solution, because it appeared very odd and uncharacteristic that I didn't think backing up this stuff before. Turns out now all my image & file fields are broken and I cannot save/modify pages anymore on the pw admin (even though everything is still displaying properly on the front). I am not sure what syncing did to my pw install but it certainly didn't enjoy it. Any help would be immensely appreciated. Thank you. EDIT: For now because I really had to get this project moving, I simply went for a completely fresh pw install and exported all the fields and templates from one to the other. Damage is controlled and I'll be fine, but I'm still very much looking for ways to fix the issue though, in case it happens again in the future. Also, I had a paid for a single site FormBuilder plugin on the previous install, and I'm not sure I can port to the new pw install without having to pay for the multi sites version of the plugin. If you have any answer concerning this that would be a great bonus. But I'll probably look into it tomorrow/create another post for that.
×
×
  • Create New...