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

Permission of single download not working - fixed in 3.2.64

Started by lbellagotti, 13.02.2019 14:33:22

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

lbellagotti

Joomla 3.9.3
jDownloads 3.2.63
PHP 5.5.20
MySQL 5.6.21
site is not localhost

It seems to be impossible to modify permissions for a single download. Trying to change the permission for any user group the spinner image keeps rotating and the change is not applied.

The Javascript console shows an error in /media/system/js/permissions.js: document.getElementById(jform_title) is null.

The error corresponds to line 47 in the uncompressed version of the Javascript file, the one starting with "title = " in the branch

   else if (extension == false && view != false){
      asset = option + '.' + view + '.' + getUrlParam('id');
      title = document.getElementById('jform_title').value;
   }

I think the problem to be the one addressed in the source of admin/views/helloworld/tmpl/edit.php in the page https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_ACL/en .
The core javascript code for initiating the Ajax request looks for a field with id="jform_title" and sets its value as the 'title' parameter to send in the Ajax request. In this case the field could be
jform_file_title.

[gelöscht durch Administrator]
  •  

ColinM

HiPermissions cascade down in two ways.  One is through the Categories to the Download, the other is through the User Groups.  The permissions are handled by Joomla! - jD just calls the relevant routines.  I should also mention that if you have a Deny anywhere it can have far reaching effects!!!  So giving permissions to a single Download can be 'interesting'.
Please excuse if I have misunderstood as you may be saying it takes a long time.  That could be down to your server timing out.

Because this is essentially a Joomla! issue to help further we would need Super Admin access to your site.  If you would like us to look please send me a PM via the whitish square with a tail near my name.
You could also use the see permissions graphically facility in Joomla!http://www.jdownloads.net/documentations/item/show-permissions-graphically-an-overviewColin
Colin M
  •  

lbellagotti

Hi

I believe I understand how permissions cascade in jDownloads and I concur that this is essentially a Joomla! issue.

It is not a timeout: when you change the value of the permission in the select, Joomla! tries to start an AJAX request, but it encounters an error in /media/system/js/permissions.js building the parameters
to be sent to the server.
The error message is

document.getElementById(jform_title) is null.

Like you can see reading the Javascript file, or like it is said in the page of docs.joomla.org linked before, Joomla! expects a field named "title" in the form (more specifically, an element with id "jform_title"
and a "value" property"). Categories, user groups, etc., all have a field named "title", and everything works.

I'm sorry if I'm not being clear.
  •  

Arno

Hi,
I think I understand you and will try to fix this issue in the next week (together with a few others). Thanks.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Arno

Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •