News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Please help fix these bugs with 'User Points'. - [Fixed in 4.0.40]

Started by ibrahim, 13.01.2024 06:16:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ibrahim

Hello! After upgrading to Joomla 4, jDownloads 4 with Userpoints v4.0.7 instead of AlphaUserPoints, the Userpoints version 4.0.7 has worked well after Martin has modified some jDownloads files for AUP. The modified files are attached below:

components\com_jdownloads\src\Controller\DownloadController.php
components\com_jdownloads\src\Helper\JDHelper.php


The issue arises when attempting to download any item for the first time, leading to a blank screen with two errors before redirecting to the download landing page. After consulting with Martin, the developer of Userpoints, who completed all the necessary tasks, including changes to jDownloads, we seek your assistance in resolving the following error lines as on the screenshot attached.


https://postimg.cc/94d9gM5B

Attached are the modified files. You can compare them with the original files to identify the modified lines.
  • JDHelper+DownloadController.zip


Martins: ideally they should clean up the code. No need to be loading files. Not much point retaining code for Alpha /Alta UP since they have faults and are unsupported.


To download free UserPoints: https://remository.com/downloads/A-Place-for-User-Points/

I hope if we are getting some attention from Arno!
  •  

ColinM

Ibrahim
The released version of Userpoints is 4.0.6 - you refer to 4.0.7 maybe you have a prerelease version?

All bugs are important!!

I have updated the documentation:
https://www.jdownloads.net/documentation/extending-jdownloads-with-other-extensions-v3-9/userpoints-support-in-jdownloads-aup

Could you please check.  One of the changes is that Martin seems to have included the 5 jD rules somewhere in Userpoints as it is no longer neccessary to load them.
----------------------------------------
You have reported errors found by Martin in two files:
components/com_jdownloads/src/Controller/DownloadController
components/com_jdownloads/src/Helper/JDHelper.php
See notes below

I will check out on my site using these modified files
Details of changes are below
===========================================================
In components/com_jdownloads/src/Controller/DownloadController there are three changes:
line 683 was
$profile = AlphaUserPointsHelper::getUserInfo('', $user->id);
Modified version is
$profile = \AlphaUserPointsHelper::getUserInfo('', $user->id);
That looks OK
-------------------------
Lines 693 and 694 were
if (file_exists($api_AUP)){
        require_once ($api_AUP);
Modified
 if (true OR file_exists($api_AUP)){
     // require_once ($api_AUP);
NOTE I have a small concern with the  if (true OR file_exists($api_AUP))
as it relies on the preceding statement in line 691 (line 692 is blank)
$api_AUP = JPATH_SITE.'/components/com_altauserpoints/helper.php';
-----------------------------------------
line 697 modified same as 683 is OK
---------------------------------------
======================================================
In components\com_jdownloads\src\Helper\JDHelper.php there are many changes.

All of them add a \ in front AlphaUserPointsHelper of to give \AlphaUserPointsHelper

Colin

 
Colin M
  •  

ColinM

Hi
I have checked out using fixed poits per download - used 2.5 points/download and gave users initial  set of 5 points. Basically all is OK except
the calculation of points left is rounded to an integer.
Colin
Colin M
  •  

ibrahim

Hello ColinM! Thank you so much for your assistance with this case. I have sent a message to Martin via WhatsApp, which he uses on his website. I also asked him to share version 4.0.7 with you, as I received it directly from him, and it appears that he needs to update it on his website. Additionally, I requested him to join in on this topic to help.

There are two errors, as you can see in the attached image. Could you please check them out?

  •  

counterpoint

The rounding error has actually existed for years. It should be fixed in UserPoints 4.0.7 - now released.
  •  

ibrahim

ColinM, the documentation you created is awesome. Thank you for the time spent writing this important article so professionally.
  •  

ibrahim

Quote from: ibrahim on 15.01.2024 13:17:20Hello ColinM! Thank you so much for your assistance with this case. I have sent a message to Martin via WhatsApp, which he uses on his website. I also asked him to share version 4.0.7 with you, as I received it directly from him, and it appears that he needs to update it on his website. Additionally, I requested him to join in on this topic to help.

There are two errors, as you can see in the attached image. Could you please check them out?



Dear ColinM, could you please investigate this issue?
  •  

Arno

Hi Ibrahim,
Unfortunately I have not yet been able to test this area with jDownloads 4 and a Joomla 4 compatible AUP extension. I will try to make up for this in the coming days, but first I need an appropriate test environment.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

ibrahim

Thank you, Arno! Please let me know after you investigate this issue. I would like to ask why the forum is not sending notifications for new replies. For example, I didn't know about this reply until I opened the forum and manually checked.
I will PM you later when I create a clone and provide all the details for you to test the environment. Check the details and solve any issues that may arise.

Also, you will see what I have done with the filter of the operating system on Yootheme, but it breaks the pagination layout, as there cant be multiple template conditions from Yootheme as the PM sent you yesterday.


I'm glad you took care to fix the bugs before we go live. I will also send it to ColinM; maybe he can assist as well.
  •  

ibrahim

Quote from: Arno on 23.01.2024 12:56:53Hi Ibrahim,
Unfortunately I have not yet been able to test this area with jDownloads 4 and a Joomla 4 compatible AUP extension. I will try to make up for this in the coming days, but first I need an appropriate test environment.
Dear Arno,

I tried to send you the details via PM, but it seems there is an error on the forum. When I submit the message, I receive the following error:

The email template "new_pm_body_tolist https://www.jdownloads.com/forum/index.php?action=pm;sa=send;f=inbox;pmsg=14379;quote;u=30750" could not be found.
  •  

Arno

QuoteI would like to ask why the forum is not sending notifications for new replies. For example, I didn't know about this reply until I opened the forum and manually checked.
I know this problem and it has existed for some time. I will ask the developers what the cause could be.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Arno

Quote from: ibrahim on 24.01.2024 13:07:12Dear Arno,

I tried to send you the details via PM, but it seems there is an error on the forum. When I submit the message, I receive the following error:

The email template "new_pm_body_tolist https://www.jdownloads.com/forum/index.php?action=pm;sa=send;f=inbox;pmsg=14379;quote;u=30750" could not be found.
Just a few days ago I updated the forum to a new main version. Unfortunately, not everything went 100% successfully (see also the note above regarding avatars and smileys). I will try to fix this soon, but I have too many "construction sites" at the moment.

However, the personal messages work, despite the message.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  
    The following users thanked this post: ibrahim

ibrahim

Quote from: Arno on 25.01.2024 19:01:24Just a few days ago I updated the forum to a new main version. Unfortunately, not everything went 100% successfully (see also the note above regarding avatars and smileys). I will try to fix this soon, but I have too many "construction sites" at the moment.

Die persönlichen Nachrichten funktionieren aber, trotz der Meldung.


"I don't receive notifications for personal messages via PM, unlike the notifications I receive for forum posts. Currently, I have to visit the inbox to check if there are any new replies from you or ColinM. I can't speak much German, as I already speak four other languages fluently, and English is not my primary language. Since all my projects and clients are Norwegian, which is my native language"
  •  

ColinM

Ibrahim
Forum Attachments Messages seem to have problems at the moment.
Could you plese put latest version of UP 4.0.8 where I can download with FTP

Colin
Colin M
  •