Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. There shouldn't be any problems and definitely nothing will get deleted. Yes. Sometimes this problem occurs if there was a delay in creating the media but hard to tell unless I can see it for myself. Not sure. I'd have to test myself in a Multilingual setup. Have you tried removing the code to see if it helps? Maybe you can achieve what the code is doing in a Hook in ready.php? I think this is what is happening: You upload a file Upload goes through OK and is placed in /site/assets/MediaManager/jqfu/.files_no_show/ The media creation process starts but fails. MySQL throws the error about duplicate entry. This interrupts the media creation process. The media creation process does not finish hence it doesn't return a success message to the uploader The uploader throws the error "Empty File Upload Result" Error. Since the media creation process was interrupted, the script doesn't reach the code that deletes the temporary files You end up with lots of temporary files. Maybe you also end up with empty pages (i.e., without media or title)? Could you check this please? Good idea.
  2. OK. Won't they get confused by the interface though? Also check out Tabulator Yes, in a sense, though it depends on whether you want automatic (i.e. no user interaction, like an auto module or cron thing) versus manual (press a button and it gets synchronized. The latter can be done, easily in Media Manager. The former would need a bit of coding, essentially calling Media Manager API via some automated process. Media Manager has a 'Scan' uploads mode. How it works is you upload files to a set folder in /site/MediaManager. You can upload files to that folder via FTP, or other method. Inside Media Manager. The files can be loose or zipped. If zipped, Media Manager would unzip them. The files are then presented in a list. You can then select the ones you wish to upload to the Media Manager library. Those added to the library are then deleted from the folder where they were uploaded. There are settings for what to do when Media Manager encounters duplicates: rename/replace/skip. In your case, you would go for replace (synchronization). In Media Manager? Yes, but post upload (not during). Each media is a page. Say you uploaded a file called My End of Year Report.xlsx. Media Manager would create a page with that file name (sanitized) as the title. That will end up as My End of Year Report. The file name itself would be sanitized as my-end-of-year-report.xlsx. Post-upload, you can manually add keywords, e.g. via tags, or a custom field or fields (e.g. options, page reference fields, etc). If you want automatic indexation, that would require some custom code. If this is something you want to pursue alongside a Media Manager option, we can discuss further via PM (as a custom paid option). I meant tools like rsync ?
  3. No. Profiles don't work like that (some would say unfortunately). Profiles need to be included before you install ProcessWire so that they can be picked up by the installer.
  4. That's me. Memory's gone!
  5. Hi @Orkun, I'd love to. However... Support for ProcessWire 2.7 ended on 10 May 2019 ?. We only support ProcessWire 3.x. But given that... You are still on this very old version....I might be able to help. However, I suggest that you consider upgrading to 012 + ProcessWire 3.x. I don't see how this is related to uploading and the sql errors + the temporary files not getting deleted. post_max_size needs to be bigger than upload_max_filesize. See this post by Horst. I have never been able to reproduce this nor has anyone else ever reported the issue. I think the best way forward is if you could set up a remote test environment where the problem is reproducible then I could come in and have a look. If that's not possible then consider granting me access to the production environment where the problem is occurring.
  6. Please start a new topic and show us some code ? Your question does not seem to be related to the current thread.
  7. Uh? Never knew about this ? When did this become a thing? Sorry for interrupting... ?
  8. It does. So, there's clearly two main groups of issues. One, the frontend bit and two the backend. Frontend This is for frontend as well? If yes, rather than re-invent the wheel, you could use on of the plethora of 'data tables' out there. Backend I am assuming this is where you want the client to do the uploading (albeit not individually) or... do you mean you want to give them some sort of FTP access? I hope not. Bottom line is the client will need to upload the files, somewhere so best if they login, get authenticated and upload the files. The easiest thing is for them to upload a zip file. Obviously, size of file matters as well as for synchronisation, you need identical file names. You may also need to store backups of older files for a while just in case client uploaded the wrong files and everything got overwritten (basically some sort of versioning system). For the upload area, you could go for a custom Process module that allows ajax upload (works nicely with batch file uploads if you need that sort of thing). The batch Processing would be all PHP. Somewhere in the forums there's a module that can run tasks at set times, but not sure if that is what you want. The Process module could either have pages, for uploading and for viewing current files and maybe for doing backups (that only you can access). Or, you can have one page split into n tabs. Pages or Not This depends on your needs, especially the frontend ones. For instance, if you want human readable titles to be displayed in the frontend together with the files, then pages would server you well. This is because ProcessWire would sanitize the file names and you end up with lots of underscores or hyphnes in file names. On the other hand, if you manage the files yourself, you will have to write the code (but $files() can help), to track files. If you are worried about the visibility of 2000+ pages with files in the backend, you can 'hide' these under /admin/some-parent/. Just thinking out loud here. There are tools for that, but not ProcessWire, although you could achieve some sort of synchronisation yourself using ProcessWire based on a few simple rules.
  9. Welcome to the forums @cmg. The topic below deals with something very similar (if not identical). Is that your case as well?
  10. Any reason why you prefer this over instanceof? Just curious.
  11. Still not sure whether this is a RM issue or a PageTable one.
  12. Displayed in the backend? Links to whats? Are the files pages? or stored as files in file fields in multiple or a single page? Hmm. So, seems like 'loose' files stored on the system? Not ProcessWire managing the files? I don't think so. If the files were pages, then maybe Lister or (Lister Pro). There could be others I have forgotten about. Depending on your responses to the above questions, there could be other approaches/solutions.
  13. Not a direct answer but have a look at this intrepid work by @gebeer and especially this sister topic:
  14. I see your point. However, imagine if the two were separate sites. This: Would be this: What is the difference between the two except for the fact that they are not directly sharing a parent folder? i.e. web/parentofsites/site-1 and web/parentofsites/site-2 versus web/somesite1/site (for 1) and web/somesite2/site. It is almost just an issue of semantics. They are in the same web server and there are no security issues at all. Not even SEO issues to the best of my knowledge. The sites are not talking to each other (although you can make them talk if you want) and are not accessing each other's resources. The only common thing they have is wire. No worries ? Feel free to ask away! ?
  15. Thanks for clarifying @Sten
  16. Sorry Mark, I got lost in that Green Bedroom. Man, I am dog tired and could do with that rest! ? OK, back to reality. I haven't used the Page Table field in ages. How does it save stuff? Via Ajax or normal POST? I am just wondering whether this has to do with renderReady() as I have had similar issues before with Media Manager and Repeaters. Currently, I don't have time to test but hopefully can get to this soon. I've just seen your edit: Ajax it is.
  17. Hmm. That's strange. Are there no errors at all? Some 3rd-party module hiding the button maybe? The button appears OK in field's edit?
  18. Yes. Just did too. They all fail, sorry. Why can't you?
  19. Have your tried the special operators? %= or ~= or *=?
  20. @Sten, Could you please clarify what the bug/problem is? What file is fine? Are you suggesting that when editing any template, you cannot see the save button? ProcessWire version? Does this mean you managed to resolve the issue?
  21. I have not been able to reproduce this. I also don't see how Page could be ending up there. I am also not aware of a DefaultPage class. Maybe this has something to do with your particular setup? The only change with the code I posted above was that we are now providing $file with an absolute path instead of a relative one. So, I am a bit confused about this one ?.
  22. Not really. It depends on the user (both admin and vendors) experience you want. What sort of information do you want vendors to see in the frontend? If it is simple, then you could get a way with a single page, one per vendor. On admin side, how do you want to manage vendors? Like normal pages? Do you have a mockup (GUI) we could look at?
  23. ? . I am not suggesting that you should have been privy to that information, by the way.
  24. True. $sanitizer->pageNameTranslate() is just a proxy for Sanitizer::translate option for the $beautify argument ?
  25. In that case you'll need to be able to track the user. Sessions work best for this (I think, better than cookies). From your description, it seems these are registered users. An example workflow: Vendor logs in. Verify, validate, etc that they are a vendor. If YES, create a session for them Then, use $session->redirect(/url/to/terms/of/usage/user1234) to redirect them to the TOCs. If they are not a vendor, $session->(/redirect/elsewhere/). Vendor completes the form. JS validation just to tell them if they forgot something Vendor agrees and POSTs form Form is posted to a page you have set up Inside the template file of that page, sanitize and validate form inputs If Errors, return back to the form No errors, $session->redirect(/fill-in-details/user1234) Vendor completes the form. JS validation to help them with stuff they might have forgotten to do Vendor POSTs form Form is posted to a page you have set up to receive completed details Sanitize and validate form Errors, redirect back to form No errors, use API to create a page for the vendor Errors creating page, tell vendor to try again (?) No errors, redirect vendor to some thank you page or wherever you want Use ProcessWire's CSRF for the forms. I might have skipped something.
×
×
  • Create New...