SkyLundy / Fluency

The complete translation enhancement suite for ProcessWire
GNU General Public License v3.0
17 stars 1 forks source link

Fatal Error: Uncaught TypeError: Fluency::getConfiguredLanguages() after upgrading to latest version 1.03 #3

Closed jacmaes closed 10 months ago

jacmaes commented 10 months ago

Hi there,

I tried upgrading from 0.9 to 1.03 using Ryan's Upgrades module as I always do. I'm using PW 3.0.231. At first everything went smoothly and I proceeded to select the new translation options at the bottom of the module. On first try, I got an error saying the translation service was not available (like a timeout). I thought Fluency must be slow, and tried again a few more times, but when saving, I finally got this error:

Fatal Error: Uncaught TypeError: Fluency::getConfiguredLanguages(): Return value must be of type Fluency\DataTransferObjects\AllConfiguredLanguagesData, array returned in site/modules/Fluency/Fluency.module.php:289

#0 site/modules/Fluency/Fluency.module.php(419): Fluency->getConfiguredLanguages()
#1 site/modules/Fluency/Fluency.module.php(167): Fluency->getClientData()
#2 site/modules/Fluency/Fluency.module.php(128): Fluency->insertPageAssets()
#3 wire/core/ModulesLoader.php (204): Fluency->ready()
#4 wire/core/ModulesLoader.php (245): ModulesLoader->readyModule()
#5 wire/core/Modules.php (350): ModulesLoader->triggerReady()
#6 wire/core/ProcessWire.php (787): Modules->triggerReady()
#7 wire/core/Wire.php (413): ProcessWire->___ready()
#8 wire/core/WireHooks.php (968): Wire->_callMethod()
#9 wire/core/Wire.php (484): WireHooks->runHooks()
#10 wire/core/ProcessWire.php (909): Wire->__call()
#11 wire/core/ProcessWire.php (668): ProcessWire->__call()
#12 wire/modules/Process/ProcessPageView.module (511): ProcessWire->setStatus()
#13 wire/core/Wire.php (413): ProcessPageView->___ready()
#14 wire/core/WireHooks.php (968): Wire->_callMethod()
#15 wire/core/Wire.php (484): WireHooks->runHooks()
#16 wire/modules/Process/ProcessPageView.module (165): Wire->__call()
#17 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage()
#18 wire/core/Wire.php (416): ProcessPageView->___execute()
#19 wire/core/WireHooks.php (968): Wire->_callMethod()
#20 wire/core/Wire.php (484): WireHooks->runHooks()
#21 index.php (55): Wire->__call()
#22 {main}
thrown (line 289 of site/modules/Fluency/Fluency.module.php)

This error message was shown because: you are logged in as a Superuser. Error has been logged.

I fully uninstalled the module, including removing the database files from the Modules' page when suggested (in the Missing tab if I remember well), but when I tried reinstalling from scratch, the error shows up again. Please advise. I really liked this module, and planned on contributing via Paypal to show my gratitude, but now I'm stuck.

Screenshot 2023-12-22 at 14 54 13

SkyLundy commented 10 months ago

@jacmaes Working on it, you'll be able to like it again in a bit.

SkyLundy commented 10 months ago

@jacmaes I was able to replicate this and pushed a new release. You should be able to upgrade in ProcessWire or download from the main branch.

Let me know if this solves your issue.

jacmaes commented 10 months ago

Perfect. Thanks, it did fix my issue. I have sent a small contribution via Paypal as a token of my gratitude. Excellent work, this is becoming a must-have module for me.