Jump to content

All Activity

This stream auto-updates

  1. Today
  2. 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 :-)
  3. 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.
  4. 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?
  5. Yesterday
  6. 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.
  7. @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.
  8. 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
  9. 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
  10. @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.
  11. 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?
  12. 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
  13. Hi @Stefanowitsch, I'm afraid there's not much else I can recommend except from removing the account from the module (and removing the app from the IG account) and then trying to set it up again.
  14. Ty! I've had it working like this (skeleton code, in ready.php): $wire->addHookAfter('Page::addable', function(HookEvent $event) { $parent = $event->object; $tplArg = $event->arguments(0); $tplName = $tplArg instanceof Template ? $tplArg->name : (string) $tplArg; if($parent->template->name !== 'user-articles') return; $rep = $parent->get('repeater_publish_dates'); $hasDates = ($rep && count($rep) > 0); if(!$hasDates) { $event->return = false; } }); Pretty much 1:1 what you wrote.
  15. Hi, I was having trouble with the Repeater fields including the RepeaterMatrix and the following patch is working for me: Changes to the "function multilanguageStatusCheck": /** * Checks if page should show multi-language inputs * * @param HookEvent $event */ public function multilanguageStatusCheck(HookEvent $event) { $p = $event->object->getPage(); // ORIGINAL // 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; // PATCH // if actual noLang setting for this page's template is set to disabled (1) // ensure any repeater/repeater matrix item templates are also single-language, then exit if($p->template->noLang === 1) { foreach($p->fields as $f) { if($f->type instanceof FieldtypeRepeater === false) continue; $this->wire('templates')->get(FieldtypeRepeater::templateNamePrefix . $f->name)->noLang = '1'; } return; } // No other changes after this point. } I don't know if it is the best way to patched it or if there is a better way. If this change is okay, to make it persistent during module updates, can you please add this change to the module. I will open an issue on github. Kind regards
  16. Yes I'm a superuser at the time. If you open any Processwire CMS and then visit /youradminurl/page/edit/made_up_js_file.js you will be redirected to /page/edit/bookmarks/ - not sure if it's intentional behaviour or just an odd response to a 404, but this is why it's happening with the missing path.
  17. I couldn't find anything suitable in the API. I'm looking for a way to number breadcrumbs with numbered itemprop='position' content='x'. Home = 1, and so on. Is there a way to number the order of visible pages of the pages of the breadcrumbs (content='number')? <meta itemprop='position' content='2' />
  18. Last week
  19. Outstanding work! I also appreciate the botany refresher, this module is useful and educational.
  20. @cst989 If you attempted to dump {$this->moduleJsPath} from any method in Fluency besides of init() and it's null then init() isn't being called. If init() isn't being called then ProcessWire isn't initializing the module. If you are seeing the bookmarks page then ProcessWire sent you there and the Fluency asset will return a 302. In this case it looks like ready() is being called but init() isn't but I am guessing on that. That's controlled by ProcessWire. I think I need to reassess where things are being initialized in Fluency as far as init() vs ready() because I think there is some core behavior that is causing some confusion in a way that makes Fluency look like the culprit. If you're seeing a 302 bookmarks page I don't see how it could have anything to do with Fluency. There's no circumstance where any asset that is being loaded would cause the entire page to 302 because ProcessWire will not 302 the entire page due to a JavaScript file not loading correctly. The 302 page is causing the incorrect Fluency JS URL, not the other way around. Are you a superuser when you see the 302 page? If there are permission issues with users that attempt to view a page they don't have permissions for it can cause a redirect to the bookmarks page. It could also indicate something having to do with the login session. Have you tried logging out and logging back in? Again, this is something that ProcessWire controls.
  21. I've been considering accessibility constraints quite a bit lately, and in doing a little research, I haven't found any PHP-based PDF generation library supports the PDF/UA standard. With countries outside the US having more stringent accessibility and privacy standards, can PDFs generated through mPDF be considered accessible (with a little work on behalf of the developer)? I'm currently using mPDF in a smaller capacity, but RockPDF definitely offers some compelling features! RELATED: Unfortunately it seems that form fields are definitely not compatible from mPDF-generated PDFs due to the v1.4 PDF standard being used. I work in an industry that doesn't want to use the web, and desperately intends to keep digital documents, so I was looking to see if FormBuilder could be used to export as PDF, but that appears to not be the case (when accessibility is concerned). As most (open-source) PDF generation libraries have borrowed or forked code from one another, I doubt any would offer accessible/compatible forms.
  22. Hi @nbcommunication I am again struck with this error message in my log and the instagram posts don't show up on the website anymore. I generated a new access token but it did not help. Is there away to renew the expired session?
  23. I think the content type might be a red herring. A similar thing happens to me in a DDEV setup... seems to be trying to download the JS file from /manage/page/edit/fluency.bundle.js?v=3.0.227. At this point ProcessWire 302s to the bookmarks webpage, which likely explains the MIME type mismatch. If I look in the code, it tries to load the js path from {$this->moduleJsPath} however if I dump that on my page, it returns nothing - so effectively it's trying to load the js file from <current_url>/fluency.bundle.js Since they should be set in init(), I guess this is not firing? This is my first time trying a multilingual site, I've only done the following so far: On an existing 3.0.227 PW site running PHP 8.2 Install language fields, language names and language tabs modules Added a second language Installed Fluency Added a Google Cloud API key Converted my title field to Title Multilanguage Edited a page There's no option to use Fluency with the title field, I only see the JS errors in console
  24. Beautifully done as always Robin!
  25. As more or less expected our host says there are no problems or errors caused by them. In the server logs I see two repeated errors: [Tue Sep 30 22:46:25 2025] [X-OVHRequest-Id: 7bd91c71e88c4eaaf8f23be0ca59b7dd] [error] [client 34.174.180.159:0] [host www.birthfactdeathcalendar.net] AH10141: FastCGI: comm with server "/homez.863/birthfac/www/index.php" aborted: idle timeout (160 sec) [Tue Sep 30 22:46:25 2025] [X-OVHRequest-Id: 7bd91c71e88c4eaaf8f23be0ca59b7dd] [error] [client 34.174.180.159:0] [host www.birthfactdeathcalendar.net] AH10149: FastCGI: incomplete headers (0 bytes) received from server "/homez.863/birthfac/www/index.php" In the ProcessWire error log I see two repeated errors: Fatal Error: Uncaught Error: Class "FieldtypeText" not found in /wire/modules/Fieldtype/FieldtypePageTitle.module:17 Stack trace: and many: Error: Exception: SQLSTATE[HY000] [1203] User birthfacbfdcal already has more than 'max_user_connections' active connections In /wire/core/WireDatabasePDO.php line 549 In the Files-error log repeated: unlink: Unable to unlink file: /site/assets/cache/LazyCronLock.cache
  26. well, if you restrain the template access it won't be proposed to add/edit a page and a user who hs obnly access to certain templates/pages don't have access at all à the templates, this is a supreadmin feautre 🙂 have a look when logged as a non superadmin user
  27. Ana

    Hide template

    Thank you, my motive is to prevent people from having access to the templates not only the pages using that template.
  28. Hi Ana, depending on what you need i would say yes 🙂 in the access tab of the template if you check the yes radio button, you will see the roles you've created and will be able to easily choose which one can have access to the pages using this template, job done 🙂 have a nice day
  1. Load more activity
×
×
  • Create New...