robert Posted July 11, 2025 Author Posted July 11, 2025 v1.1 has been released with some bug fixes and a ListerPro Page Action added to batch translate pages using the ListerPro module. Keep in mind that the Page Action module needs to be installed separately. 3
Ivan Gretsky Posted Saturday at 04:07 PM Posted Saturday at 04:07 PM Good day, @robert! Thanks for the module! @FireWire has updated Fluency for DeepL API v. 2.0 which uses different authentication method. Could you please write if ProcessTranslatePage has already done that in v. 1.0? If not are you planning to update?
robert Posted Saturday at 04:39 PM Author Posted Saturday at 04:39 PM Hi Ivan, I haven’t had time yet to verify what (if anything) needs to be done on my side, but I’m fairly sure ProcessTranslatePage already uses the DeepL API v2. It relies on the official PHP client library and was updated in mid‑2025, so we should be in good shape. If any updates are required to keep the module working, I’ll take care of them – thanks for the heads up! 2
update AG Posted yesterday at 12:56 PM Posted yesterday at 12:56 PM Our PW-Version: 3.0.229, PHP-Version: 8.1 Is it correct that the latest version (v1.1.0) needs PHP 8.2 to work? If so it would perhaps be good if you update the requirements of your module to include that. Last week we updated the Fluency module from v0.3.2 to v2.2.0 to make it work because of Deepl API Changes. For that to work we needed to update the PHP Version from 8 to 8.1. We also had your Module (ProcessTranslatePage) installed in Version 0.8 but that version somehow doesn't work anymore with Fluency v2.2.0 (We get the error Fatal Error: Uncaught TypeError: Cannot access offset of type string on string in /site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php:188 Stack trace). So we thought we should just use the latest version of your module (v1.1.0) but found out today after installing that it needs PHP 8.2 (Error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.33.). Do you perhaps by chance know if PW-Version 3.0.229 is suitable to work with PHP 8.2? KR Orkun
ngrmm Posted yesterday at 01:08 PM Posted yesterday at 01:08 PM @robert I' using PW 3.0.210 – Fluency 2.3 – Translate Page 1.1 Using Save + Translate runs into this: Uncaught TypeError: TranslateGlossary::convertGlossaryStringToArray(): Argument #1 ($glossaryString) must be of type string, null given, called in site/modules/ProcessTranslatePage/TranslateGlossary.php on line 34 and defined in site/modules/ProcessTranslatePage/TranslateGlossary.php:118 #0 site/modules/ProcessTranslatePage/TranslateGlossary.php (34): TranslateGlossary::convertGlossaryStringToArray() #1 site/modules/ProcessTranslatePage/TranslateGlossary.php (18): TranslateGlossary->createGlossary() #2 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(169): TranslateGlossary->__construct() #3 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(207): ProcessTranslatePage->initApi() #4 wire/core/WireHooks.php (1060): ProcessTranslatePage->hookTranslatePageSave() #5 wire/core/Wire.php (484): WireHooks->runHooks() #6 wire/core/PagesEditor.php (702): Wire->__call() #7 wire/core/PagesEditor.php (478): PagesEditor->savePageFinish() #8 wire/core/Pages.php (840): PagesEditor->save() #9 wire/core/Wire.php (419): Pages->___save() #10 wire/core/WireHooks.php (952): Wire->_callMethod() #11 wire/core/Wire.php (484): WireHooks->runHooks() #12 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (2128): Wire->__call() #13 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (563): ProcessPageEdit->processSave() #14 wire/core/Wire.php (413): ProcessPageEdit->___execute() #15 wire/core/WireHooks.php (952): Wire->_callMethod() #16 wire/core/Wire.php (484): WireHooks->runHooks() #17 wire/core/ProcessController.php (350): Wire->__call() #18 wire/core/Wire.php (413): ProcessController->___execute() #19 wire/core/WireHooks.php (952): Wire->_callMethod() #20 wire/core/Wire.php (484): WireHooks->runHooks() #21 wire/core/admin.php (160): Wire->__call() #22 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/usr/www/users/...') #23 site/templates/admin.php (18): require('/usr/www/users/...') #24 wire/core/TemplateFile.php (328): require('/usr/www/users/...') #25 wire/core/Wire.php (413): TemplateFile->___render() #26 wire/core/WireHooks.php (952): Wire->_callMethod() #27 wire/core/Wire.php (484): WireHooks->runHooks() #28 wire/modules/PageRender.module (575): Wire->__call() #29 wire/core/Wire.php (416): PageRender->___renderPage() #30 wire/core/WireHooks.php (952): Wire->_callMethod() #31 wire/core/Wire.php (484): WireHooks->runHooks() #32 wire/core/WireHooks.php (1060): Wire->__call() #33 wire/core/Wire.php (484): WireHooks->runHooks() #34 wire/modules/Process/ProcessPageView.module (184): Wire->__call() #35 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage() #36 wire/core/Wire.php (416): ProcessPageView->___execute() #37 wire/core/WireHooks.php (952): Wire->_callMethod() #38 wire/core/Wire.php (484): WireHooks->runHooks() #39 index.php (55): Wire->__call() #40 {main} thrown (Zeile 118 in site/modules/ProcessTranslatePage/TranslateGlossary.php)
robert Posted 9 hours ago Author Posted 9 hours ago @update AG Thanks for reporting. I pushed a new version 1.3 to Github which supports PHP 8.1. The DeepL API client uses Symfony HTTP Client as a dependency, which requires PHP 8.2 in version 7.x. I downgraded it to Symfony 6.x, so now PHP 8.1 is the minimum supported version. Regarding ProcessWire compatibility with PHP 8.2: I checked client websites and found one installation running PW 3.0.230 without any errors/warnings, and another with 3.0.213 that has some deprecation warnings but works fine. Edit: I forgot to mention that Fluency is no longer necessary for ProcessTranslatePage to run, both modules work independently.
robert Posted 8 hours ago Author Posted 8 hours ago @ngrmm I think I found the bug, thanks for reporting! Version 1.3 should work now and can be found in the ProcessWire modules directory. Since you mentioned your Fluency version in your comment: it's no longer required for this module to run (but it's still a great module nevertheless 😄) 1
ngrmm Posted 8 hours ago Posted 8 hours ago @robert thanks! I updated to 1.3 and still getting the same error. Is this maybe related to my empty DeepL Glossary ID field?
robert Posted 8 hours ago Author Posted 8 hours ago @ngrmmHmm, that might be possible, but unfortunately I can't replicate the issue here. Could you double-check that TranslateGlossary.php:118 has a default value for the $glossaryString parameter in the source code? The line should look like this: private static function convertGlossaryStringToArray(string $glossaryString = ''): array { Also, a few questions to help investigate: – Do you have any entries in your language-specific translate_glossary field? – Are you using the DeepL API Free or Pro plan? Thanks for helping with the investigation! 😅
ngrmm Posted 8 hours ago Posted 8 hours ago (edited) @robert – yes line 118 is private static function convertGlossaryStringToArray(string $glossaryString = ''): array { – I'm afraid i don't know what and where the language-specific translate_glossary field is 🙂 – using DeepL API Free UPDATE: ahhh, I updated from an very old version and didn't know that you have to add fields to the language template. Trying now to find out how to edit a language template. UPDATE: my fault. You have to uninstall and reinstall the module. Then the new fields are added to your language templates. Thanks again! Edited 7 hours ago by ngrmm
robert Posted 7 hours ago Author Posted 7 hours ago @ngrmm I think I found the bug (again), could you try and change TranslateGlossary.php:34 to the following: $entryArr = self::convertGlossaryStringToArray($language->translate_glossary ?? ''); The change is the ?? '' after translate_glossary. This handles empty glossary fields that return null instead of an empty string. Hopefully this will do it!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now