Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Off the top of my head, if you require all pages to utilize the unique status, ProcessWire can take care of this for you. You don't ever need to know the path, only the $page->name property, when creating links to pages. That will retain what your client seemingly wants. It may cause issues elsewhere though, if you actually need depth (potentially with URL hooks), or certain modules. I base my response from this short topic:
  3. Hello Adrian, Can this help you?: New URL hooks -> https://processwire.com/blog/posts/pw-3.0.173/ URL segments -> https://processwire.com/docs/front-end/how-to-use-url-segments/ And there have been quite some updates related to URL segments -> via Google you can search site:processwire.com/blog/ URL segments And had you seen this module (in beta version)?: https://processwire.com/modules/custom-paths/ And there is this for the admin/backend if needed: https://processwire.com/blog/posts/page-list-custom-children-module/
  4. Today
  5. My provider shut down my website www.birthfactdeathcalendar.net because my database is getting more requests than the Web Hosting plan can handle. Matomo statistics tell me I have an average of 60 visitors a day. But I'm getting plenty of errors - like 100 in one minute - in the ProcessWire log for all kinds of page requests: Error: Exception: SQLSTATE[42000] [1226] User 'birthfacbfdcal' has exceeded the 'max_questions' resource (current value: 8780) In /wire/core/WireDatabasePDO.php line 549 This started after upgrading from ProcessWire 3.0.123 to ProcessWire 3.0.246. How can I solve this problem? I'm trying to go back to a provider backup from two weeks ago, before the ProcessWire upgrade, hoping to get my website back. For now I can still get into the ProcessWire 3.0.246 admin pages but I don't know for how long. I have several sql backups of my site and made a site profile today. Again I'm not sure how safe it will be to use them without running into the same problem — as long as I don't know what's causing them and how to solve them. If anybody can help....
  6. Thinking about it further, I could probably go with a hybrid approach too. On my new Linux machine, I could set up a LAMP stack directly and run the projects that don't need the level of isolation DDEV provides (which is mostly all my projects) and only use DDEV for projects that would benefit from it (mainly this webapp I've been working on for the last couple years). The main point is that I want everything on one powerful development machine. My old Dell workstation is showing its age when running that webapp, although in production is pretty fast. Thanks for the insights and suggestions!
  7. I just tried to compile the SCSS version via CodeKit with Dart Sass 1.90.0 (a recent version) and got this: Dart Sass failed with this error: expected ":". ╷ 137 │ $property --uk-overflow-fade-start-opacity { │ ^ ╵ _uikit-3.24.0/components/utility.scss 137:11 @import _uikit-3.24.0/components/_import.scss 86:9 @import _uikit-3.24.0/uikit-theme.scss 6:9 @import This should probably be @property? Guess we have to wait for a UIKit update...
  8. Thanks @da² for reporting these issues. I'll look into it as soon as possible. I have to work on the weekend, so I am afraid that probably won't get around to it until next week.
  9. Hello @ryan I just updated the UiKit Library to Version 3.24.0. There have been minor changes in the LESS files of UiKit to make use of newer features (for example the @property rule). But that results in an error when trying to compile those files. For example: It seems that the ProcessWire Less module is a bit outdated (or lets say: the wikimedia less parser that is used under the hood). I downloaded the latest wikimedia less parser version and replaced it with the version used in the ProcessWire LESS module which solved some of the errors but not all. For Example the ":is" CSS selector throws an error too (when used inside a LESS file). So I guess just updating the wikimedia less parser does not work 😞
  10. New feature in StripePaymentLinks (v 1.0.7) 🎉 Hi, everyone! We’ve just added a sync helper to the modules config screen that can pull past Stripe Checkout Sessions into ProcessWire. Super handy if you want to… backfill older purchases migrate existing users or just double-check what’s in Stripe vs. what’s in PW How it works: Scans Stripe sessions (with date range + email filter if you like) Matches them to PW users by email Creates missing users (optional) Creates/updates purchase repeater items exactly like live checkouts Has a test-run mode so you can preview before writing You get a nice report right on the config screen (below "Sync now") with totals and per-session actions (SKIP, LINKED, UPDATE, CREATE) plus the line items. Makes it a lot easier to keep things in sync — especially if you had sales before installing the module. Note: since each run fetches sessions and line items directly from Stripe’s API, the total duration depends on network + Stripe’s response times. In our tests with ~120 sessions the sync took about 15 seconds. Grab the latest version and give it a spin. We already tested this version on some live projects and everything works fine, but always backup before you mess with data 😉 Feedback welcome! 🙌 Cheers, Mike
  11. Snapshot of the moment, got a Mac Studio with 64GB of ram and running around 8-10 projects everything goes smooth. Got the docker provider using around 16GB of memory. I do this too, but I don't auto run it on login. I can see how this could be a bottleneck, I don't think it's unbearable to start every project when needed since like you mention, you actively work in a few of them. With your 128GB of ram I'd definitely give it a shot because yolo haha. "ddev start --all" let's go!
  12. Hi, We have a client who insists on a one level url structure. They are used to it from other CMS. Example: Home menu 1 page 1 This results in the url /menu-1/page-1/ The client wants a custom url: /page-1/ I did unsuccessfully search the modules for a solution. I am currently a bit at a loss on how to achieve this without creating redirects manually through the redirect module or .htaccess. Has anybody already approached this case? Any input is appreciated. Adrian
  13. And another issue. First time I submit the form, after isValid() I call showForm(true), so the form shows with the last value entered. I see the notice "Thank you for your message", and the URL segment is still there. I hit submit a second time and get a 404 page (from my code) because the URL segment is removed.
  14. Reason is the option in PW admin: I always check to end segments with a slash, if I check "no" the form works.
  15. Hello, On a page with an url segment, the form is never valid. It's a simple form with an InputNumber. If I remove the segment it works, if I add it isValid() is always false. Another minor issue, even if an InputFile has setMultiple(false), I can drag and drop several files on it, I don't know if you can do something for this.
  16. Hi, @Jonathan Lahijani! I am pretty sure that your existing setup is superior for the multiproject needs of yours comparing to ddev. You try to standardize while ddev is all for making something custom. I would play with some new php stuff on ddev to keep up with the hype. But would stay with you current setup for the paid work.
  17. Thank you! I guess that is just the way things work. I re-generated the token inside my facebook app and replaced it in the module settings. Then, after 30 minutes the Instagram Feed was working again. The token auto-renews from time to time but it seems that in some rare cases you have to simply generate a new one.
  18. You could do that with RockMigrations $rm->installModule('SessionHandlerDB'). Add it to the migration file on every site. Don't even need to spin up. Will be applied next time you login as superuser. That should suffice :-)
  19. Oftentimes it's 3-5 projects at a time, with other projects being dormant or semi-dormant for a while. However there are times when I want to apply some setting across all of my sites, even the dormant ones. For example, a few years ago I decided to use SessionHandlerDB instead of the default, file-based session approach. I did this manually across all 50 sites (I suppose I could have scripted this). No need to boot up each development site with my current approach since it's all on a single LAMP server. But with Docker/DDEV, I'll have to spin up DDEV for each project then make the change, then shut it down. A little extra friction, but thinking about it as I write this, I don't think it's as bad as it sounds and I can probably automate it to some extent. How do you personally handle situations like that? If I get a Framework Desktop, I would get it with 128GB memory. It's very powerful.
  20. Yes, you can. The project files live on the Linux host machine (your Omarchy setup). They are being mounted to the ddev containers as docker volumes. The Docker daemon follows all symlinks to their real locations. So you can have a similar setup as on your current Ubuntu server. Kind of, yes :-) Depends on how juicy your new machine is. ddev spins up a few docker containers for each project. The more projects you have running the more containers need to be started. I have never started more than 3 projects at the same time. So can't really tell what happens if you spin up 10 or more. Are you working on multiple projects at the same time daily, do you really need them to be available at the same time? project startup is quite fast. So there's no need to have them all running all the time. You can manage them through docker desktop or Vscode extension or CLI, of course. All ddev projects are managed through one ddev-router container (Traefik) which acts as reverse proxy for http/s calls. So if you have multiple projects running, they can access each other through http. Just do it man. You won't regret. Linux has plenty of file explorers to choose from, you can find a decent replacement for XYplorer for sure. I live in Thunar. It has a plethora of plugins (batch rename etc) and is very customizable. As for Omarchy, it is a very opinionated setup but should give you a great starting point. I moved to tiling WMs some years ago and now wouldn't want to miss them. It's just so much more organized. I know exactly which application lives on what workspace and can switch in a blink of a keystroke. Who the heck needs frickin floating windows, why were they even invented?
  21. Yesterday
  22. I'm planning on using DDEV sometime in the next few months when I buy a new computer (most likely Framework Desktop) and hopefully switch to Linux (looking to use Omarchy). It's going to be painful in the beginning (I really REALLY don't want to give up XYplorer and I hope I can adjust to a tiling window manager way of doing things), but Omarchy is where it's at for web developers. Right now, my dev setup is pretty simple: I have a separate bare-metal server (an old Dell Xeon workstation) running Ubuntu 24.04 and a LAMP stack (mostly everything installed with apt). I have Samba setup so I can access files from my Windows desktop machine for convenience. I use VSCode Remote SSH extension to edit files directly on the server. This has served me well and is not complicated at all. All of my ProcessWire projects exist there. One thing I do to keep things as efficient as possible is symlink the 'wire' directory of all my projects to a single folder that contains the latest version of ProcessWire (I'm not using Composer to manage ProcessWire itself). Therefore, if I want to update all my sites to the latest version of ProcessWire, I just symlink that folder and all the other sites are automatically updated. Sure, that kind of goes against proper source code control practices and such, but I'm always a solo developer and the strict level of isolation of environments between sites is typically not needed for 99% of the sites I work on, which is kind of the point of Docker/DDEV, but I still want to use it. Updating ProcessWire in this way is very efficienct (at the 'expense' of a potential site breaking which is very very rare). So my question is, if I have 50 ProcessWire sites created with DDEV, can I still symlink the 'wire' folder of all of them the same way I described above without any issues? I'm very rusty with Docker but looking to embrace it heavily. Also, is it "crazy" to have 50 ProcessWire projects started all at once (will that take up a lot of resources)? With my current setup, I don't have to launch anything because it's all served by a single Apache, MariaDB and PHP which is very convenient. With DDEV, I have to launch each one individually.
  23. @vmo - even though PW uses pages and "repeater_" templates to house the content of repeater fields, I believe that the noLang setting of the page that contains the repeater field should handle this because you're not typically meant to adjust settings of those "repeater_" templates directly. I doubt @ryan will get to this thread so it might be worth posting a Github issue and see what he says there.
  24. Hello @adrian, I am a newbie to Processwire but after thinking about this in a different perspective and doing a little bit of debugging I think I found the "issue": - A repeater uses pages to hold the fields but to be able to create that pages it needs to create a specific templates for that pages and that templates are not the same template of the page were the multi-language support is set. - It means that the multi-language support that is set on the top template of the page itself do not propagate to the hidden templates used by the repeaters and that is why you have the following loop: foreach($p->fields as $f) { if($f->type instanceof FieldtypeRepeater === false) continue; $this->wire('templates')->get(FieldtypeRepeater::templateNamePrefix . $f->name)->noLang = '1'; } and if you return without setting the noLang=1 on the template of the repeater field: if($p->template->noLang === 1) return; the fields inside the repeater will not know about the noLang set on the top template of the page itself. At this point I don't have a opinion if the PW core should or not should handle the propagation of the noLang attribute to the hidden/sub templates used by the repeaters (or other composed fields) or if it is the template job to understand if it is operating as a hidden/sub template and get the noLang value from the top template. Kind regards
  25. Hi @adrian, thank you for your reply. As far I could understand PW core handles this for the fields that are not fields inside repeaters. In the beginning of the function is the following code: // if actual noLang setting for this page's template is set to disabled (1) then exit now so we don't potentially enable if($p->template->noLang === 1) return; // ... What this code tells me, is that, if the template of the page has the multi-language support set to "disabled" (noLang===1) it returns whitout processing the fields inside the repeaters like it does if it passes this step: // ... // if there's a match, set the noLang value for the page's template appropriately if(isset($this->data['multilanguageStatus'][$this->closestMatch->id])) { if($this->data['multilanguageStatus'][$this->closestMatch->id]['status'] == 'disabled') { $p->template->noLang = '1'; // we want repeater fields single language as well foreach($p->fields as $f) { if($f->type instanceof FieldtypeRepeater === false) continue; $this->wire('templates')->get(FieldtypeRepeater::templateNamePrefix . $f->name)->noLang = '1'; } } else { $p->template->noLang = '0'; } } // if no match, then use default from config settings else { $p->template->noLang = $this->data['multilanguageDefaultStatus'] == 'disabled' ? '1' : '0'; } I found this behavior by debugging, because, not matter what I would set on the "Multi-Language Default Status" of the module settings (enabled or disabled), the fields inside the repeaters would always show with multi-language support while the other fields (like the multi-language title) would show with no multi-language support. So the only way to be able to fix the issue was to process the fields of each repeater on the page when the "if($p->template->noLang === 1)". Maybe it makes more sense if you take the following into account (at least in my case): - The template has the multi-language support disabled (noLang === 1) - In all the pages of that template, on the "Multilanguage Restrictions" section on the Settings tab, what I see is the following: "Language Branch Restrictions: The template for this page has disabled multi-language support, so we don't want to override here." This tells me the following: - If the "Multilanguage Restrictions" are on the template level: the "Multilanguage Restrictions" are set for all the pages of that template. - If I want to set "Multilanguage Restrictions" for one page and not for the others: I need to remove the "Multilanguage Restrictions" from the template and set it on that page. In my case, I am setting the "Multilanguage Restrictions" to disabled at the template level so for me it makes sense. Maybe I am wrong about my understanding but by reading the code and how the module configurations behave that was my understanding. I hope my explanation wasn't to confusing. Kind regards
  26. @cst989 Okay, so I was unlcear if the entire page was showing a 302 or if just the file was showing a 302. This is going to lead you astray on this issue. The $this->modulesJsPath is a private variable limited to the Fluency class and isn't accessible anywhere else in ProcessWire. So if you attempt to dump that anywhere outside of a function in the Fluency module it will return null. If you are dumping this from within a function in the Fluency class then that is a different story. Let's try this. In a template file, run this code and share what you see: <?php $result = $fluency->translate('en', 'de', [ 'Testing the translation service', ], [], false); var_dump($result); die; ?> This will test to see that translation is set up correctly. If it isn't then it may be a configuration issue that Fluency is not detecting or handling.
  27. Hi @vmo - thanks for looking into this and coming up with a fix, but if I understand correctly, I feel like this is something that the PW core should handle because it's about fields within a template that has noLang = '1' not respecting that setting, whereas this module is all about specific pages/branches having this setting while others of the same template don't. Does that make sense?
  28. Hi, well actually, as when displaying breadcrums i use <?php foreach($page->parents() as $parent): ?> i think that while looping through the parents array, something like <?php foreach($page->parents() as $pid => $parent) { $position = $pid + 1; //except if you want your position starting by 0 } ?> would do the job $pid being different from $parent->id of course hope it may help 🙂 have a nice day
  1. Load more activity
×
×
  • Create New...