Jump to content

eelkenet

Members
  • Posts

    149
  • Joined

  • Last visited

  • Days Won

    5

eelkenet last won the day on August 21 2025

eelkenet had the most liked content!

Profile Information

  • Gender
    Not Telling
  • Location
    Amsterdam

Recent Profile Visitors

6,492 profile views

eelkenet's Achievements

Sr. Member

Sr. Member (5/6)

154

Reputation

1

Community Answers

  1. Hi @Mikel, I kept running into crashes when attempting to test this module: ProcessWire\WireException Unknown column name(s) for findRaw: images.tags search► File: .../future-materials/public/wire/core/Pages/PagesRaw/PagesRaw.php:1816 1806: // rename i.e. [ 'field_name' => 'new_field_name' ] 1807: $this->requestFields[] = $prefix . $key; 1808: $this->renameFields[$prefix . $key] = $value; 1809: } 1810: } 1811: } 1812: 1813: protected function unknownFieldsException(array $fieldNames, $context = '') { 1814: if($context) $context = " $context"; 1815: $s = "Unknown$context name(s) for findRaw: " . implode(', ', $fieldNames); 1816: throw new WireException($s); 1817: } 1818: } So apparently you need to allow Tags on image fields in order for this module to work? I never use those, so maybe this could become optional?
  2. Hi @ryan, first of all: thank you for creating this module. I have been doing some rigorous testing with Agent Tools, and while I have been quite productive in using this to move a wordpress site into PW, I do keep running into a couple of smaller issues. In no particular order: It seems I cannot run just a single migration from the CLI. The CLI always wants to run all that have not yet been applied. It seems I cannot simply re-run a migration from the CLI. The GUI does allow this. If I want to do this, I first have to rename the php file in assets/at/migrations. It would be very handy if there was a built-in and (agent-)documented way to add CLI --flags to the migrations. Codex has been inventing their own flags, for instance --dry-run=1, --limit=1 etc, but the implementation has been poor and inconsistent. Besides this, what I am wondering is if it will become possible to, instead of using the CLI or UI, to hook up AI directly via MCP. Or should I look at https://github.com/PeterKnightDigital/PromptWire-MCP for that?
  3. It seems I had completely missed the part in the documentation regarding the Apache timeouts which finally led me in the right direction. However, the way to correct these did not match my MAMP Pro set-up. In MAMP Pro, Templates are used for files like httpd.conf. MAMP then merges these into a live, read-only httpd.conf file that Apache uses. In order to get this working, I had to edit the Apache template (File → Open Template → Apache → httpd.conf), and change the placeholder MAMP_FastCgiServer_MAMP into MAMP_FastCgiServer_MAMP -idle-timeout 300 This made sure that in the compiled httpd.conf the timeout was set correctly.
  4. I've been doing some testing with Agent Tools. My setup is MAMP Pro (PHP 8.3.30), using OpenAI (GPT-5). While I can see responses in the Conversation History, every request initially results in an Error 500. Only after reloading the page, I can return to Engineer tab and then see the response in the Conversation History. I can't figure out why this is happening as there are no errors logged at all, neither in the PHP / Apache logs. The only error I saw logged was this from the installation: files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools filePutContents: Unable to write: [redacted]/site/assets/at/jobs/failed/.htaccess files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools mkdir: Unable to mkdir [redacted]/site/assets/at/jobs/failed/ files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools filePutContents: Unable to write: [redacted]/site/assets/at/jobs/done/.htaccess files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools mkdir: Unable to mkdir [redacted]/site/assets/at/jobs/done/ files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools filePutContents: Unable to write: [redacted]/site/assets/at/jobs/running/.htaccess files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools mkdir: Unable to mkdir [redacted]/site/assets/at/jobs/running/ files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools filePutContents: Unable to write: [redacted]/site/assets/at/jobs/pending/.htaccess files‑errors 2026‑06‑10 14:53:21 admin https://mysite.local/admin/module/edit?name=AgentTools mkdir: Unable to mkdir [redacted]/site/assets/at/jobs/pending/ ...but these folders have in fact been created: PW Debug mode is on, and so is Tracy. Any suggestions as to how to get beyond this point?
  5. I wanted to lock down the Google Translation API use to my domain, but apparently there was no referrer set in the request. To fix this I had to add the referrer to the $requestConfig array in GoogleCloudTranslationEngine.php, line 124, see PR. $referer = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']; $requestConfig = [ CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, CURLOPT_RETURNTRANSFER => true, CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)', CURLOPT_REFERER => $referer ]; With this change in place I can now add the domains I run the website on and set things up tighter.
  6. Hi @Mikel, thank you for sharing this module! I am currently going through first attempts to use this module. In my case I am trying to get (a database dump of) a WordPress site into PW. During my process I bumped into a couple of things, you may or may not be aware of: There is no warning if the uploaded file is too big, for instance due to upload_max_filesize being set too low. If the module cannot figure out a Suggested Title Field for a table, there is no way to define this yourself and the dry run will fail early (in MappingEngine::createMapping). Also there is no way to select another column as source for the title field. I think the limits don't work as intended (at least when importing SQL). When setting the sample_size to 100, and maximum_rows to 0, it will still only import 100 rows of data per table. Again, thanks for setting this all up! --- (PS, I kept running into issues while attempting to modify your module, so for now I have moved on to building a WP-scraper that leveraged the built-in rest-api.)
  7. Thank you for all of that @bernhard! Quick question, I noticed the Download button of your RockPDF module goes to a 404 on Github: https://github.com/baumrock/RockPdf There is of course the old open source version but that has been archived and points back to the one on your site. Thanks!
  8. @Sanyaissues Of course I could do that, and thank you for your pointers. But my main take away here is: if you offer a site-wide search, it should be a good search. This is even more important for a site like processwire.com, where you should use any opportunity to demonstrate why PW is a good CMS. The whole idea of users having to use external tools in order to find the content of a content management system website... is rather painful.
  9. Maybe we can extend the site-wide search to include the body / description of modules as well, be it with less priority? This is an example of a use case: I knew a module exists that uses DeepL to translate site content, but when I searched for DeepL I got 0 results: https://processwire.com/search/?q=DeepL. However, DeepL gets mentioned 5 times in the body of this module page. It was only until I tried searching for terms like 'Translate' that I could find this module. Edit: there is another module that I missed and in my opinion should have popped up.
  10. Thanks for all the work! I can see clear improvements on lots of places. A couple of things that I bumped into, some of which have been mentioned already: We not just need separate color pickers for light and dark themes, but also logo url fields (I have a white logo which now disappears completely in light mode) Primary buttons should be in the primary color, which is not the same as black! I find these very unclear and even distracting when quickly scanning the page. Return or optionally enable regular checkboxes, please. Accessibility is low. Low hanging fruit: make sure you get :focus, :focus-within working, right now its impossibly hard to see when a 'toggle' or close button is selected. Use https://wave.webaim.org/ to check the rest. (this is a tip for all reading this) Selected icons (in edit template / field) disappears from the list: Again thanks for the work and looking forward to whats next!
  11. The future is here! And this is me from 2025 thanking you for your input from 2019 🙂
  12. Excuse me if I am wrong, but is this not what Module::upgrade($fromVersion, $toVersion) was intended for? Or do you specifically not want to bump a version number?
  13. Hi, I've created a very simple module, that displays the number of (PagesVersions) versions a page has in the Page List: https://github.com/eelke/ProcessPageListVersionsCounter I expect something like to become part of the PW core as the PagesVersions implementation matures, but in the meantime it could be useful to others. So I'm posting it here.
  14. Hi @ryan, (hopefully) a minor request: can the PagesVersions methods please become hookable? In my use case, I use WireCache to cache the rendering of some data. And by hooking after Page::saved I can clean that cache automatically everytime the page is saved. I would like to be able to do the same for data coming from other page versions. Thank you!
  15. I have moved away from the Double JWT solution for now, as PHP sessions seem to work fine for my application. Also I managed to implement TFA validation, by editing the `classes/Auth.php` file. That seemed to be the only way I could do so: I tried hooking into ___doLogin() but couldnt figure out the order of things. See below! So, I replaced line 164: $loggedIn = $this->wire('session')->login($user->name, $password); With // Add Tfa authentication through TfaTotp if ($user->hasTfa()) { $tfa = $user->hasTfa(true); // Get code from incoming data // This only works if credentials + 2FA get sent inside the body $code = null; if ( isset($data->tfacode) && !empty('' . $data->tfacode) ) { $code = $data->tfacode; } $settings = $tfa->getUserSettings($user); if ($code && $tfa->isValidUserCode($user, $code, $settings)) { $loggedIn = $this->wire('session')->login($user->name, $password); } else { throw new AuthException("Invalid TFA code", 401); } } else { $loggedIn = $this->wire('session')->login($user->name, $password); } And then added the 2FA in the body request: // inside a log-in method const credentials = { email: this.identification, password: this.password, tfacode: this.tfacode, }; const response = await fetch('/api/auth', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'MY_API_KEY', }, body: JSON.stringify(credentials), }); if (response.ok) { return response.json(); } else { let error = await response.json(); throw new Error(JSON.stringify(error)); } I have also managed to do a proof of concept of a register route that works in combination with the TfaTotp module, but that needs some polishing. Update: I figured out that, in order to get be able to hook into Auth::doLogin, I needed to check the 'Deactivate URL Hook' toggle in the AppApi module settings. After doing so, I can now successfully hook and check for the Tfa, hurrah! // In ready.php wire()->addHookAfter('Auth::doLogin', function (HookEvent $event) { $log = wire('log'); $session = wire('session'); // Get the original return value of ___doLogin $originalReturnValue = $event->return; // Check if the original login was successful if (isset($originalReturnValue['username']) && !empty($originalReturnValue['username'])) { $username = $originalReturnValue['username']; $user = $event->wire('users')->get("name=$username"); // Check if the user has TFA activated if ($user->hasTfa()) { $tfa = $user->hasTfa(true); // Get code from incoming data // This only works if 2FA gets sent inside the body, along with password and username $data = $event->arguments(0); $code = null; if (isset($data->tfacode) && !empty('' . $data->tfacode)) { $code = $data->tfacode; } $settings = $tfa->getUserSettings($user); if ($code && $tfa->isValidUserCode($user, $code, $settings)) { $log->save("tfaLogin", "Tfa code = correct!"); $event->return = $originalReturnValue; } // Incorrect Tfa, sign out and throw 401 else { $log->save("tfaLogin", "Tfa code = incorrect, do not allow logging in"); $session->logout(); throw new AuthException("Code incorrect!", 401); } } // No Tfa enabled, sign out and throw 401 else { $log->save("tfaLogin", "User does not have Tfa enabled.. do not allow logging in!"); $session->logout(); throw new AuthException("TFA not enabled!", 401); } } });
×
×
  • Create New...