Can't reset logging

Phoca Download - download manager
plamen
Phoca Professional
Phoca Professional
Posts: 101
Joined: 16 Mar 2014, 13:23

Can't reset logging

Post by plamen »

"Reset Log" doesn't work.
No change after confirming the message "Are you sure you want to reset (clear) the log?"
:cry:

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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Can't reset logging

Post by Jan »

Hi, try to install Phoca Download 4.0.4Beta:

https://github.com/PhocaCz/PhocaDownloa ... .4Beta.zip

it should be OK there.

Jan
If you find Phoca extensions useful, please support the project
plamen
Phoca Professional
Phoca Professional
Posts: 101
Joined: 16 Mar 2014, 13:23

Re: Can't reset logging

Post by plamen »

Thank you! It's working now.
plamen
Phoca Professional
Phoca Professional
Posts: 101
Joined: 16 Mar 2014, 13:23

Re: Can't reset logging

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Can't reset logging

Post 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
If you find Phoca extensions useful, please support the project
plamen
Phoca Professional
Phoca Professional
Posts: 101
Joined: 16 Mar 2014, 13:23

Re: Can't reset logging

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Can't reset logging

Post 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
If you find Phoca extensions useful, please support the project
Post Reply