joomla 4 error MysqliDriver::getError()
-
- Phoca Newbie
- Posts: 1
- Joined: 04 Oct 2022, 11:27
joomla 4 error MysqliDriver::getError()
hi,
my website for tests (fresh install) :
joomla 4.2.3
Phoca Download 4.0.4
template cassiopea
when adding in front, I have an error message when clicking on start upload
note: the download works in admin
Thanks for your help
error message below :
Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getError()
Call stack
# Function Location
1 () JROOT/components/com_phocadownload/models/user.php:488
2 PhocaDownloadModelUser->_save() JROOT/components/com_phocadownload/models/user.php:375
3 PhocaDownloadModelUser->singleFileUpload() JROOT/components/com_phocadownload/views/user/view.html.php:207
4 PhocaDownloadViewUser->display() JROOT/libraries/src/MVC/Controller/BaseController.php:639
5 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_phocadownload/controller.php:37
6 PhocaDownloadController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_phocadownload/phocadownload.php:59
8 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
9 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
10 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:200
12 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:241
13 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
15 require_once()
my website for tests (fresh install) :
joomla 4.2.3
Phoca Download 4.0.4
template cassiopea
when adding in front, I have an error message when clicking on start upload
note: the download works in admin
Thanks for your help
error message below :
Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getError()
Call stack
# Function Location
1 () JROOT/components/com_phocadownload/models/user.php:488
2 PhocaDownloadModelUser->_save() JROOT/components/com_phocadownload/models/user.php:375
3 PhocaDownloadModelUser->singleFileUpload() JROOT/components/com_phocadownload/views/user/view.html.php:207
4 PhocaDownloadViewUser->display() JROOT/libraries/src/MVC/Controller/BaseController.php:639
5 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_phocadownload/controller.php:37
6 PhocaDownloadController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_phocadownload/phocadownload.php:59
8 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
9 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
10 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:200
12 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:241
13 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
15 require_once()
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: joomla 4 error MysqliDriver::getError()
Hi, testing now, I don't get any problem.
The error message is obsolete but it should not be displayed at all.
Try to open this file:
components/com_phocadownload/models/user.php
and edit the line 488
FROM:
TO:
Which error do you get after modification?
Jan
The error message is obsolete but it should not be displayed at all.
Try to open this file:
components/com_phocadownload/models/user.php
and edit the line 488
FROM:
Code: Select all
throw new Exception($this->_db->getError());
Code: Select all
$this->setError($row->getError());
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 11 Oct 2022, 13:35
Re: joomla 4 error MysqliDriver::getError()
Think I have same problem.
Fresh joomla 4.2.3, Phocadownload 4.04, Cassiopea or Helix ultimate template, Upload in Phoca Options enabled, Category accessible.
In frontend upload ends with error message "Call to undefined method Joomla\Database\Mysql\MysqlDriver::getError()" The uploaded file exist in phocadownload/userupload directory, but there is no entry in database and so it is not published for download.
If I follow your instructions to change user php, I get the error message "File not uploaded" with same result (file exist in directory, no database entry)
In backend upload is working corectly.
Fresh joomla 4.2.3, Phocadownload 4.04, Cassiopea or Helix ultimate template, Upload in Phoca Options enabled, Category accessible.
In frontend upload ends with error message "Call to undefined method Joomla\Database\Mysql\MysqlDriver::getError()" The uploaded file exist in phocadownload/userupload directory, but there is no entry in database and so it is not published for download.
If I follow your instructions to change user php, I get the error message "File not uploaded" with same result (file exist in directory, no database entry)
In backend upload is working corectly.
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: joomla 4 error MysqliDriver::getError()
Hi, do you get any error message after chaning the code?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 15 Nov 2016, 11:40
Re: joomla 4 error MysqliDriver::getError()
Hi Jan, I have the same issue. I updated the line 488 but still get this error
error -
Uncaught Throwable of type Error thrown with message "Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getError()". Stack trace: #0 [ROOT]/libraries/src/MVC/Controller/FormController.php(676): PhocaDownloadCpModelPhocaDownloadM->save()
#1 [ROOT]/libraries/src/MVC/Controller/BaseController.php(672): Joomla\CMS\MVC\Controller\FormController->save()
#2 [ROOT]/administrator/components/com_phocadownload/phocadownload.php(47): Joomla\CMS\MVC\Controller\BaseController->execute()
#3 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#4 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#5 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#6 [ROOT]/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent()
#7 [ROOT]/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#8 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute()
#9 [ROOT]/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#10 [ROOT]/administrator/index.php(32): require_once('...')
#11 {main}
error -
Uncaught Throwable of type Error thrown with message "Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getError()". Stack trace: #0 [ROOT]/libraries/src/MVC/Controller/FormController.php(676): PhocaDownloadCpModelPhocaDownloadM->save()
#1 [ROOT]/libraries/src/MVC/Controller/BaseController.php(672): Joomla\CMS\MVC\Controller\FormController->save()
#2 [ROOT]/administrator/components/com_phocadownload/phocadownload.php(47): Joomla\CMS\MVC\Controller\BaseController->execute()
#3 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#4 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#5 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#6 [ROOT]/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent()
#7 [ROOT]/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#8 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute()
#9 [ROOT]/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#10 [ROOT]/administrator/index.php(32): require_once('...')
#11 {main}
-
- Phoca Newbie
- Posts: 4
- Joined: 11 Oct 2022, 13:35
Re: joomla 4 error MysqliDriver::getError()
Hi Jan,
without changing the code the error message is the same like the call stack from doc denis.
If I change the line 488, I did not get a call stack, only joomla message "File not uploaded".
without changing the code the error message is the same like the call stack from doc denis.
If I change the line 488, I did not get a call stack, only joomla message "File not uploaded".
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: joomla 4 error MysqliDriver::getError()
Hi, even, when you enable debug mode?
Are you able to debug it, e.g.
instead of:
$this->setError($row->getError());
this code:
print_r($row->getError()); exit;
Do you get some printed output?
Jan
Are you able to debug it, e.g.
instead of:
$this->setError($row->getError());
this code:
print_r($row->getError()); exit;
Do you get some printed output?
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 11 Oct 2022, 13:35
Re: joomla 4 error MysqliDriver::getError()
Hi Jan,
the date_default_timezone issue I got all the time with debug on. I think this a joomla or server problem.
Strict Standards: date_default_timezone_get(): We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages..../libraries/src/Date/Date.php on line 115
If I change the user.php code to "print_r($row->getError()); exit; " I get this new issue:
HY000, 1364, Field 'publish_down' doesn't have a default value
the date_default_timezone issue I got all the time with debug on. I think this a joomla or server problem.
Strict Standards: date_default_timezone_get(): We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages..../libraries/src/Date/Date.php on line 115
If I change the user.php code to "print_r($row->getError()); exit; " I get this new issue:
HY000, 1364, Field 'publish_down' doesn't have a default value
- NerdyPappy
- Phoca Member
- Posts: 19
- Joined: 14 Oct 2022, 15:07
Re: joomla 4 error MysqliDriver::getError()
Hello,
I am getting the same error:
The requested page can't be found.
An error has occurred while processing your request.
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page
Go to the Home Page
If difficulties persist, please contact the website administrator and report the error below.
0 Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getError()
After pushing the Upload button, it goes to a strange URL:
my website/index.php/file-uploads?task=upload&de4d14b683a287097e9105c21e847281=k2353l18i4mkfj5dbkqgjsb4gg&37deb9e2b517fa70bd4d21572573f329=1
Thanks,
Nerdy
I am getting the same error:
The requested page can't be found.
An error has occurred while processing your request.
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page
Go to the Home Page
If difficulties persist, please contact the website administrator and report the error below.
0 Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getError()
After pushing the Upload button, it goes to a strange URL:
my website/index.php/file-uploads?task=upload&de4d14b683a287097e9105c21e847281=k2353l18i4mkfj5dbkqgjsb4gg&37deb9e2b517fa70bd4d21572573f329=1
Thanks,
Nerdy
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: joomla 4 error MysqliDriver::getError()
It is possible that the columns have obsolete format. Did you upgrade or it is new installation?HY000, 1364, Field 'publish_down' doesn't have a default value
What happens when you change the code in: components/com_phocadownload/models/user.php
Code: Select all
FROM:
$row->publish_down = null;
Code: Select all
//$row->publish_down = null;
$row->publish_down = '0000-00-00 00:00:00';
If you find Phoca extensions useful, please support the project