jDownloads Support Forum

jDownloads for Joomla 3.x => jDownloads 3.9 (Support ended) => Bugs => Topic started by: Sien on 07.10.2021 14:02:18

Title: No new download in frontend for "Registered" User group [solved]
Post by: Sien on 07.10.2021 14:02:18
Hi,

Running PHP 8.0: When an user in de user group Registered is trying to add a new download in the frontend they got an error screen after saving the download (screenshot added). When an user in the user group Super User tries to add a new download in the frontend everything works just fine.

Running PHP 7.4: The above works fine, but a white screen is given when I go to the Jdownloads options in the backend.

Can you please help me to solve the displayed error while adding a new download in the frontend? PHP 8.0

Thanks in advance, Sien



edit: displayed in error.log: PHP Warning:  Undefined array key "name" in ......../administrator/components/com_jdownloads/tables/download.php on line 101
Problem solved - see last entry in this chain for downloading the solution  Colin
http://www.jdownloads.com/forum/index.php?topic=12440.msg46572#msg46572
Title: Re: No new download in frontend for "Registered" User group
Post by: Sien on 07.10.2021 15:50:27
edit:

I've found the trigger for the errormessage. Creating a new download in the frontend give the error messgae when I uncheck this option at the related user group (Registrered) .

I've created a workaround for my site for now to hide this item with my custom.css, but a better solution would be to solve the bug in a futere version of JDownloads.

Thanks.

Sien 
Title: Re: No new download in frontend for "Registered" User group
Post by: Arno on 09.10.2021 14:02:28
Hi,
excuse me for the delay.
I will try to check this issue during the day and i will post afterwards here a fix.
Title: Re: No new download in frontend for "Registered" User group
Post by: ColinM on 10.10.2021 00:18:53
Hi
I have tested on a site with PHP 8.0.11,  Joomla! 3.10.0 and jD 3.9.8.1 but had no problem when I created a Download in the Front End with a Registered User.
The  same code is also used when editing a Download in the front end

I also added some diagnostic code to check that $thumb_image_files is an arrary.
Also tried adding multiple images.
It may perhaps depend on some other settings.  More info would be appreciated
Colin
Title: Re: No new download in frontend for "Registered" User group
Post by: Arno on 11.10.2021 11:48:13
Thanks Colin. I can confirm this result also by me. So we need maybe more settings from jDownloads options.
Title: Re: No new download in frontend for "Registered" User group
Post by: ColinM on 11.10.2021 17:55:36
Sien,

I have sent you a PM explaining how to get details of your jD options setup to send to us so we can better replicate your setup
Best wishesColin
Title: Re: No new download in frontend for "Registered" User group
Post by: ColinM on 12.10.2021 18:49:55
Sien
Have sent you a PM with possible solutions
Could you let us know if either of them works please
Colin
PS If you like us to do the testing the send super user logon by replying to the PM - also details of how to 'undo' you present patch
Title: Re: No new download in frontend for "Registered" User group
Post by: ColinM on 17.10.2021 10:46:55
Sien
Please canyou try Test 3
Please rename the exising download.php in
<your site>\administrator\components\com_jdownloads\tables\as say download-saved.php so it can be reset if neither test is sucessful.

Unzip the attached to get download-test3.php

Then add download-test3.php and rename it to download.php - then see if the that solves the problem.
If this does not solve the problem then I will need to have full super user access to your site to progress further
Colin
Title: Re: No new download in frontend for "Registered" User group (fixed)
Post by: Arno on 18.11.2021 14:09:50
Hi Sien,
I could now reproduce your problem. For this it is required to disable the view 'Images' option for the 'Registered' Usergroup in the jDownloads User Group Settings. See pic.

It is a simple bug and affects all PHP versions, not only PHP 8.

Attached a fixed version.
Please copy the unzipped file to this folder: /administrator/components/com_jdownloads/tables/ and overwrite the older file. Please test then again to create a new Download in the frontend as registered user and post here your result.
Thanks a lot.