Page 1 of 1
Can't reset logging
Posted: 15 Sep 2022, 12:33
by plamen
"Reset Log" doesn't work.
No change after confirming the message "Are you sure you want to reset (clear) the log?"
PD Version 4.0.3
with DB copied from Joomla 3 as per your instructions for migrating Joomla 3 -> Joomla 4.
https://www.phoca.cz/documents/50-jooml ... o-joomla-4
The currently installed Joomla! version is "4.2.2" on localhost using xampp PHP 8.1.6
Re: Can't reset logging
Posted: 15 Sep 2022, 13:58
by Jan
Hi, try to install Phoca Download 4.0.4Beta:
https://github.com/PhocaCz/PhocaDownloa ... .4Beta.zip
it should be OK there.
Jan
Re: Can't reset logging
Posted: 15 Sep 2022, 14:21
by plamen
Thank you! It's working now.
Re: Can't reset logging
Posted: 16 Sep 2022, 06:42
by plamen
When logging is disabled it is OK.
But when I enable logging, download links throw an error:
Data too long for column 'page' at row 1
Code: Select all
Call stack
# Function Location
1 () JROOT\administrator\components\com_phocadownload\libraries\phocadownload\log\log.php:66
2 PhocaDownloadLog::log() JROOT\administrator\components\com_phocadownload\libraries\phocadownload\download\download.php:159
3 PhocaDownloadDownload::download() JROOT\components\com_phocadownload\views\category\view.html.php:131
4 PhocaDownloadViewCategory->display() JROOT\libraries\src\MVC\Controller\BaseController.php:639
Version
4.0.4Beta
Re: Can't reset logging
Posted: 16 Sep 2022, 16:44
by Jan
Hi, seems like you URL is too long.
There can be two ways to fix it:
- cut the URL to 255 characters
- or change the page column size:
For next version I will do the second but this will not affect you even you will install next version as the column exists yet.
Try to go to e.g. phpMyAdmin and run this SQL Query:
Code: Select all
ALTER TABLE `#__phocadownload_logging` CHANGE `page` `page` TEXT;
(change #__ to your database prefix)
Jan
Re: Can't reset logging
Posted: 17 Sep 2022, 14:38
by plamen
Thank you, Jan,
Indeed URL was percent-encoded like "%D0%B4%D0%BD%D0%B8" (the title was in Cyrillic) totalling above 300 chars.
I've altered the table and now logging is working well.
As a side question, what was the reason to name the link "page"? (in Administrator - PD - Logging)
It is not so common term here.
Re: Can't reset logging
Posted: 17 Sep 2022, 15:11
by Jan
Hi, it is just a page of your website, on your website you can have more pages so it was not called "website" but "page". Link is just a link to somewhere and in this case we just didn't log links but web pages of your website. But of course this can be changed in language override or in translation file if it is hard to understand.
Jan