Viewing 15 replies - 1 through 15 (of 34 total)
  • Thread Starter yukisaito

    (@yukisaito)

    I solved it by restoring the database and plugins from backup using UpdraftPlus.
    For unknown reasons,I do not recommend updating to version 4.7.0.

    Hi, I lost my download counters as well but I notice something.
    It did count/updated the downloads count numbers only with the log records count. In the past versions on log reports we had the option to delete the logs, that was something I did a few times to clean some records that I did not use and was a big chunk of my database.
    The old download counts are still in the _postsmeta table as metakey: _download_count. I solved my problem migrating the old numbers into the new dlm_downloads table matching the ID value.

    I think the DEVs must migrate the counter from _download_count meta_key numbers instead gathering only from the log records to prevent the counter to get messed up in cases that the user has cleaned up the log records prior update.

    Plugin Author Razvan Aldea

    (@raldea89)

    Hey @yukisaito ,

    Could you please tell me if you had any logs before the update or you were only relying on the counts found in the Downloads meta? If you had deleted/not used the logging system ( I believe that is the cause of your Downloads having 0 counts ) you can hook a filter, namely dlm_count_meta_downloads, and return true so that the counts in the post’s meta will be taken into consideration.

    So, if you add in your child theme’s functions.php the following code you’ll most probably get back the download counts: add_filter( 'dlm_count_meta_downloads', '__return_true' ); .

    Please let me know how this worked.

    Warmly,
    Razvan

    Thread Starter yukisaito

    (@yukisaito)

    Hi, DLM logging is enabled.
    I added that code to the child theme’s function.php but no improvement.
    I still get 0 counters for some items when I update the plugin.

    Plugin Author Razvan Aldea

    (@raldea89)

    Hey @yukisaito ,

    Sorry to hear that. Could you please give us a link to a page with a download so we can inspect? Also, could you give us a screenshot on how and where did you put the code I gave?

    Best wishes!
    Razvan

    Thread Starter yukisaito

    (@yukisaito)

    Hi,
    The current version is 4.7.1.

    Clicking on the green text(ダウンロード)tab will take you to a page with download links.
    URL:https://softaro.net/qmplay2/

    Several other pages are also having zero issues.
    https://dotup.org/uploda/dotup.org2887635.png
    https://dotup.org/uploda/dotup.org2887637.png

    Plugin Author Razvan Aldea

    (@raldea89)

    Umm..seems the current plugin version on your website is 4.6.5. Nonetheless, this filter should have worked. Could you please tell me how many downloads does it say you have for Download ID 102067 in the postmeta table for meta_key _download_count ?

    Warmly,
    Razvan

    Thread Starter yukisaito

    (@yukisaito)

    Where can I see the postmeta table?
    Previously, the number of downloads displayed was “6”.

    Thread Starter yukisaito

    (@yukisaito)

    The download_count number of 102067 in the database is now 1.

    Plugin Author Razvan Aldea

    (@raldea89)

    The postmeta table can be seen in your database.

    So the download_count in the postmeta table is 1 for 102067. Could you tell me how many entries you have in the download_log table for download_id = 102067 ?

    Warmly,
    Razvan

    Thread Starter yukisaito

    (@yukisaito)

    There are 7 entries in the download_log table for 102067.

    Plugin Author Razvan Aldea

    (@raldea89)

    Good. Now I see you’ve updated to version 4.7.1 of the plugin. Did you upgraded the database? From version 4.7.0 an upwards, for performance reasons, we’ve modified how we display the download count. If you did not do the upgrade, or something happened, please go to dashboard > Downloads > Settings > Advanced > Miscellaneous > Recreate upgrade environment and redo the upgrade.

    Please let me know when you’ve done this so I can check again.

    Warmly,
    Razvan

    Thread Starter yukisaito

    (@yukisaito)

    Hi, database upgrade is complete.

    Plugin Author Razvan Aldea

    (@raldea89)

    Thank you. Now, can you please check the table dlm_downloads for download_id = 102067 and see if there is any data there, and if it is could you please tell me what is the data?

    Warmly,
    Razvan

    Thread Starter yukisaito

    (@yukisaito)

    There was no data for 102067 in dlm_downloads.

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘counter value is zero’ is closed to new replies.