News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

After upgrading to j5 every few days auto restore _jdownloads_logs

Started by ibrahim, 26.04.2024 05:49:29

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ibrahim

Dear Arno and Colin,

I really hope someone can help me solve these serious issues I am facing every day since upgrading. During the day, I encounter a problem with a table called '_jdownloads_logs'. It should have 6,681 rows, but every few days, without my knowledge, the number of rows at '_jdownloads_logs' drops back to 459, with 'log_datetime' starting from 2024-01-24 13:40:00. The corrected '_jdownloads_logs' should have 'log_datetime' starting from 2018-02-17.

I am unsure if there is another table that needs modification after the upgrade to ensure that the current time stop deleting all other rows. I have completed the upgrade and then built a website from scratch, importing all files and tables needed for the website from Joomla 3 to Joomla 5.


I have checked all tables to ensure that I imported everything from '_assets', '_ucm_base', and '_ucm_content'.

Is there any file on the FTP that needs to be changed?


Like today, I noticed that the 'jdownloads_logs' had returned to 459. So, I started to check the latest updates to ensure that I import all the other rows, including the latest ones, without missing any. This is important because it could cause problems for the user when they next time downloading same file. If they were charged for the download within one year, they shouldn't be charged again.



Thank you.
  •  

ibrahim

Dear Arno and Colin,

I am still suffering from this issue. It's really annoying because every day it reverts back. If you look at the database from the cloned site I sent via PM, you will see that the table 'joom5_jdownloads_logs' now has 6,696 rows. However, if any activity occurs, such as downloads from any user, the logs will increase to 462 rows.

Regarding the tables listed below, every day when I correct the logs, after a few hours of user activity, all rows before the date 2024-01-26 10:18:21 get deleted:

problem-logs-auto-deleted_joom5_jdownloads_logs
Please advise on how to address this ongoing issue. See attached screenshots to get more info.

Thank you.
  •  

ibrahim

I really hope someone can help me solve these serious issues I am facing every day since upgrading from serious issues. Throughout the day, I encounter a problem with a table called '_jdownloads_logs'. It should have 6,681 rows, but every day when there users activity the rows in '_jdownloads_logs' drops back to 459, with 'log_datetime' starting from 2024-01-26 and deleting all earlier dates.

I have checked every database in Joomla and how the logs work, but there is nothing from there. I really tried to use an older version and the new version of the downloaded file and see where changes on the database and files occurred. I was very thorough and tried many versions. On the database, there is a table named '11111-joom5_jdownloads_logs'. When it's affected, thousands of rows are missing, which leads to users contacting me every day. Fortunately, I have backups all the time, but I must copy the new rows and add them to correct it back to 6,000 rows. The problem does not happen when users download; I think it occurs when users pay. The payment methods on joomlabid.com are under testing.

Martin, this problem really bothers me too much, and it's very strange. I have posted on the jdownloads forum but haven't received an answer yet. I am also in contact via private message, and every migration of jdownloads is done without any missing data.

I am unsure if there is another table that needs modification after the upgrade to ensure that the current time stops deleting all other rows. I have completed the upgrade and then built a website from scratch, importing all files and tables needed for the website from Joomla 3 to Joomla 5.

I have checked all tables to ensure that I imported everything from '_assets', '_ucm_base', and '_ucm_content'.

Is there any file on the FTP that needs to be changed?

Tried sure that I imported all the other rows, including the latest ones, without missing any. This is important because it could cause problems for users when they next download the same file.

Will really appreciate your help in solving this issue and understanding why this this issue happening for deleting all logs rows the rows with dates before January 26th are being removed. see screenshot.

You have on PM all the site login info!
  •  

ibrahim

The issue was solved by Martin Brampton, the developer of User Points & Remository. He only took less than 10 minutes to find the problem. I've known him for a year and haven't seen anyone smarter with working on PHP and SQL;

His initial solution was to turn on MySQL logging to a table, which logs all queries, but this method causes the table to grow quickly.

Later, he mentioned exact solution: "Actually, isn't it because you have a setting in the jDownloads plugin that removes all log entries older than the default 93 days? This action removes rows with dates before January 26th. Please see the screenshot from joomlabid.com. If your live site has the same settings, that's likely the cause."


Please Colin, could you send me the link to the documentation of the plugin "Plugins: System - jDownloads"? I want to understand more about its "Cache" and "Activate the hide" functionality. This plugin or function wasn't available in Joomla 3, and there has never been a missed user log since 2016.

Please see attached screenshots
  •  

ColinM

Colin M
  •  
    The following users thanked this post: ibrahim

ibrahim

Quote from: ColinM on 03.05.2024 13:02:02Ibrahim
I told you about the 93 days in the system login.
There is some information  in
https://www.jdownloads.net/documentation/modules-plugins-v3-9/plugins
There is also anarticle on Hide functionality
https://www.jdownloads.net/documentation/modules-plugins-v3-9/hiding-information-from-selected-user-groups
Colin
Thanks, Colin! I solved it by adding extra days before deleting logs. I really can't remember if you told me about that before; I can't find it anywhere.

For anyone want to know:
I just added this after line.25 /plugins/system/jdownloads/jdownloads.xml
<option value="1825">1825</option>
<option value="3650">3650</option>

Then open the plugin as shown in the screenshot and choose the new value then save, to be updated in the database for the jDownloads system plugin.

  •  

ColinM

Ibrahim
Will add to list of enhancements. As well as 5 and 10 years will include 1 and 2 years.
add  after line.25 /plugins/system/jdownloads/jdownloads.xml
<option value="365">365</option>
<option value="730">730</option>
<option value="1825">1825</option>
<option value="3650">3650</option>

Colin
Colin M
  •  
    The following users thanked this post: ibrahim