Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. The question is why do you sync data anyways? You could load it from directus anytime you need it.
  2. How about DateInterval::format it's stupid -.- Maybe this: https://github.com/kevinkhill/php-duration
  3. Without changing the fieldtype your only option is customizing the mysql query generated by processwire manually.
  4. That's how php is supposed to work, and processwire does not deviate from that. source If one does need a different behaviour it's their own responsibility. And to be honest, if one is using processwire's form api with custom ajax sending, then it shouldn't be that hard to build that custom ajax handler to send the form data as application/x-www-form-urlencoded or multipart/form-data.
  5. Iirc it's not hosted by Nico (I asked him ages ago).
  6. Simply try to develop in an environment, where your site is accessed without subfolders in your url (or with the correct one if it'll later live under a subfolder). The domain itself does not matter that much because ProcessWire does not add it anywhere without you actively requesting it. That's why I suggested a simple subdomain of some domain you already own.
  7. Maybe this is related to the things described here: https://processwire.com/blog/posts/merry-christmas-heres-processwire-3.0.3-and-2.7.3-and-some-more/#improvements-to-the-operator-in-page-finding-operations
  8. I mean it's the hosters filter rule, so they can probably best tell how to circumvent it.
  9. For more advanced uses (api or even json-api by specification) I'd recommend something like fractal.
  10. The core images api is only for resizing; in terms of pixels and file size a.k.a. quality.
  11. Does your hoster allow domains to point to that subfolder directly (without having it bought)? If so, enable that and use your local hosts file on your computer to have newdomain.com point to your hosters IP. This way you can develop with the new domain even without the public dns present and without your subfolder in urls. Otherwise try to point a subdomain of your active domain to that folder because changes of (sub)domain -> domain are far easier to pull of than subfolder -> no subfolder. The biggest (if not only) issue here being rich content editor entries. Most other things in processwire are relative anyways. Additionally if your hoster cannot map domains directly to your subfolder you'd need some additional .htaccess in your root folder to forward requests of your new domain to your subfolder.
  12. Those cannot really be compared well on the surface. ProcessWire is first and foremost a cms, codeigniter is a framework. If you want to use ProcessWire just as a framework you certainly can, but be prepared that it won't be the full batteries included experience. You'll need to add things on your own, when they're not part of the core pw framework. Also PW might be quite opinionated in places, where it's optimized for it's usecase (e.g. routing), which might not be the most intuitive coming from the framework world.
  13. Will this be a one-off task or some continuous syncronization? What's you specific need? Integrating with directus should not be a problem, especially as they offer a php sdk.
  14. Checking for the required field is quite easy ($field->required). Doing it with evaluating required_if, show_if settings is a lot more complex. You can look at the code of that in the InputfieldWrapper / InputfieldForm classes. One potential problem here is that show_if / required_if could be including references to fields added by hooks into the ProcessPageEdit form, where it wouldn't be possible to evaluate the requirement without ever creating the whole form. Also – as you can see in the mentioned classes – the current way of evaluation those requirements is 100% based on working with a InputfieldForm instance and not a page, so we would need to rebuild the whole thing to support such a feature.
  15. ProcessWire doesn't have concept of required fields. There are only required "inputs", which is just for the forms handling editing pages. You can find more about it in the discusions here https://github.com/ryancramerdesign/ProcessWire/issues/1743 and maybe a bit here https://github.com/processwire/processwire-issues/issues/252
  16. @theoretic @ZGD It seems like this commit fixed the compiler hickup: https://github.com/LostKobrakai/Migrations/commit/d22e6b4c5a5726e320dae0f6bd586578ad19a3b7
  17. As long as you don't overwrite the core api variables you can do whatever you need to do. $user is not locked, only $users is and here's a bit about the difficulties to extend those: https://github.com/ryancramerdesign/ProcessWire/issues/1412
  18. The first question to ask would probably be if it's even hosted on multiple instances.
  19. You absolutely can, but that's not why EC2 is so powerful and it's by no means suddenly more scaleable than a VPS elsewhere. That's what people are often missing. The scaleablity praise for amazon comes from things like autoscaling, which dynamically adds new EC2 instances or destroys unused ones, which has the same problems and hurdles you've had on heroku as well (except on aws you have to do the setup on your own as well). And for the complexity of amazons security management and other things involved in AWS it's probably better for unexperienced people to just go with digitalocean/linode for single instance VPS, because the savings in money on AWS are probably counteracted by the time saved not setting up EC2, but simple clicking a few buttons somewhere else.
  20. If the class does use `$this->wire()` somewhere it's most-likely dependent on some state of the actual processwire instance, so the class does need to be wired after construction. I mean the config, installed modules, available pages and so on are all potentially different in different processwire instances if running in multi-instance mode.
  21. The thumbnails are not generated server side on the initial upload, but directly in the browser from the local filesystem. So that's not really a success indicator of any sorts. Try inspecting the ajax requests for the file uploads with the browser dev tools.
  22. I'd recommend heroku only if you're using EC2 with multiple instances and not as plain replacement for a single VPS elsewhere (which really has no great benefit to be run on amazon or not). If that's the case one does need to implement some kind of shared filesystem solution, anyways. Same with session storage.
  23. You might want to inspect the ajax upload request through the network tab of the browser dev tools. The response there might shed some light on what's wrong.
×
×
  • Create New...