jDownloadsownloads.com
Advertisement
 

Author Topic: No new download in frontend for "Registered" User group [solved]  (Read 1282 times)

0 Members and 1 Guest are viewing this topic.

Offline Sien

  • Newbie
  • *
  • Posts: 2
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
« Last Edit: 22.11.2021 14:13:37 by ColinM »

Offline Sien

  • Newbie
  • *
  • Posts: 2
Re: No new download in frontend for "Registered" User group
« Reply #1 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 

Offline Arno

  • Administrator
  • ***
  • Posts: 12.399
    • jDownloads.com
Re: No new download in frontend for "Registered" User group
« Reply #2 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.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline ColinM

  • Moderator
  • *
  • Posts: 4.150
Re: No new download in frontend for "Registered" User group
« Reply #3 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

Offline Arno

  • Administrator
  • ***
  • Posts: 12.399
    • jDownloads.com
Re: No new download in frontend for "Registered" User group
« Reply #4 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.
« Last Edit: 11.10.2021 15:41:03 by Arno »
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline ColinM

  • Moderator
  • *
  • Posts: 4.150
Re: No new download in frontend for "Registered" User group
« Reply #5 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

Offline ColinM

  • Moderator
  • *
  • Posts: 4.150
Re: No new download in frontend for "Registered" User group
« Reply #6 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
« Last Edit: 12.10.2021 18:54:42 by ColinM »

Offline ColinM

  • Moderator
  • *
  • Posts: 4.150
Re: No new download in frontend for "Registered" User group
« Reply #7 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

Offline Arno

  • Administrator
  • ***
  • Posts: 12.399
    • jDownloads.com
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.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!