hoochicken / mod_qlform

GNU Lesser General Public License v3.0
5 stars 1 forks source link

The class Joomla\Module\Qlform\Site\Helper\modQlformPreprocessData could not be found. #20

Open patatagit opened 1 year ago

patatagit commented 1 year ago

Hi, I have a problem when I try to set to yes "Preprocess data" and "Do something else" options. I also proceeded to rename both file modQlformPreprocessData.php and modQlformSomethingElse.php When I send the form occurs this error:

The class Joomla\Module\Qlform\Site\Helper\modQlformPreprocessData could not be found.
Please rename module file in modules/mod_qlform/php/classes to add custom code.
Successful: 0
Failed: 1
The class Joomla\Module\Qlform\Site\Helper\modQlformSomethingElse could not be found.
Please rename module file in modules/mod_qlform/php/classes to add custom code.

Can you help me? Thanks

patatagit commented 1 year ago

I fixed it by applying these changes to the file modules/mod_qlform/helper/QlformHelper.php

line 98 from if (!$this->checkIfCustomExists('Joomla\Module\Qlform\Site\Helper\modQlformSomethingElse')) return false; to if (!$this->checkIfCustomExists('QlformNamespace\Module\Qlform\Site\Helper\modQlformSomethingElse')) return false;

line 113 from if (!$this->checkIfCustomExists('Joomla\Module\Qlform\Site\Helper\modQlFormSomethingCompletelyDifferent')) return false; to if (!$this->checkIfCustomExists('QlformNamespace\Module\Qlform\Site\Helper\modQlFormSomethingCompletelyDifferent')) return false;

line 304 from if (!$this->checkIfCustomExists('Joomla\Module\Qlform\Site\Helper\modQlformValidation')) return false; to if (!$this->checkIfCustomExists('QlformNamespace\Module\Qlform\Site\Helper\modQlformValidation')) return false;

line 1147 from if ($this->checkIfCustomExists('Joomla\Module\Qlform\Site\Helper\modQlformPreprocessData')) $this->processData = true; to if ($this->checkIfCustomExists('QlformNamespace\Module\Qlform\Site\Helper\modQlformPreprocessData')) $this->processData = true;

hoochicken commented 1 year ago

Thanks => applied theses changes to qlform, so go and get your new version v1.2.4

patatagit commented 1 year ago

Many thanks!