Problem with licence

Phoca Download - download manager
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with licence

Post by Jan »

Hi, in which view?
Can I see the site where this occurs?
If you find Phoca extensions useful, please support the project
geoffc
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Sep 2011, 20:34

Re: Problem with licence

Post by geoffc »

I have installed the latest version 2.1.2 on my Joomla 1.7.2 site. I regret to inform you that the problem with the license remains. Any license associated with a file prevents the file download and displays the message as previously reported.

One other very minor display issue is that in the Files display in the Back end, the ordering column is displaced to the right thus overlapping with the access column.

Regards
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with licence

Post by Jan »

hmmm, testing now and get no such problem:
Image :idea:
If you find Phoca extensions useful, please support the project
geoffc
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Sep 2011, 20:34

Re: Problem with licence

Post by geoffc »

I have found what I think is the source of the problem. If you have more than one license file then only the license file with an id of 1 is ever displayed. In my situation I happen to have license files with ids of 4, 5, and 6. If I used any of these license files then I obtained the error message 'No access to this category allowed'. If I go into PHPAdmin and change the id of any one of these licenses to be '1' (in teh underlying table) and then assign it to the download file, the license text is displayed when the user clicks to download the file.
In your example, which illustrated that the license display worked I would bet that the license file has an id of 1.
Hope this helps.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with licence

Post by Jan »

Hi, not sure if I understand you correctly.

Testing with more than one license, without any problem:
Image

I don't understand the changing of id of licenses, in case they are auto_increment. :-( :idea:

Jan
If you find Phoca extensions useful, please support the project
geoffc
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Sep 2011, 20:34

Re: Problem with licence

Post by geoffc »

Mmm I definitely have a problem displaying anything other than the id=1. I will investigate further.
Re the changing of the IDs, strictly speaking you are correct, however they still remain unique, which is the main criteria, and since I was 'decreasing' rather than increasing the values I can get away with the change. Will respond again when I know more.
Geoff
geoffc
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Sep 2011, 20:34

Re: Problem with licence

Post by geoffc »

Sorry Jan, there is definitely a problem with ids greater than 1.

My first thoughts were that it was some form of SEO extension, cache or something impacting it.. After playing around with my dev site, uninstalling various other components, reinstalling Phoca download etc, I bit the bullet.
1. Downloaded new Joomla 1.7.2 zip file.
2. Downloaded Phoca Download 2.1.3
3. Installed 1.7.2 in new directory on my server. (With demo data)
4. Installed Phoca Download 2.1.3
5. Created Menu link to download categories.
6. Created 2 license files. For arguments sake called them GPL v2 and GPL v3.
7. Created a category. i.e. UNIX
8. Added 2 files. Named them test1 and test2. Assigned them to UNIX category.
9. Assigned license GPL v2 (id=1) to file test1.
10. Assigned license GPL v3 (id=2) to file test2
11. Ensured public assess to both.
12. In the front end: chose Download menu link.
13. Entered UNIX category and the 2 files are visible,
14. Click download button on file test 1. License file is displayed.
15. Cancel out and now choose download button on file 2. Displays message "You have no rights to access this category".
16. In administrator, go to Phoca download component and change file test2 to use GPL v2 (id=1) license.
17. Back in front end choose Download button on file test2 and license is display.

As you can tell this is a fresh install, no other extensions, plugins etc. so I would expect things to run OK.
Not sure what else I can try.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with licence

Post by Jan »

Hi, thank you very much for this detailed information, confirmed.

I think, I have found it, the license was tested on true/false but should be tested on int.

I will fix it in next release. For now you can do quick fix. Just download following zip and copy included file into your site (the file is stored in whole folder tree, so just copy the tree to your Joomla! site)

https://www.phoca.cz/forumfiles/phocadow ... w-file.zip

Thank you againg for the detailed report which helped me to find the problem fast.

Jan
If you find Phoca extensions useful, please support the project
geoffc
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Sep 2011, 20:34

Re: Problem with licence

Post by geoffc »

Thank you for looking into this. I can confirm that the changed file fixes the problem.

I have tested the fix with a variety of ids and all work successfully.

Thank you once again.
Geoff
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with licence

Post by Jan »

Ok, thank you for confirmation, will be fixed in next release.

Jan
If you find Phoca extensions useful, please support the project
Post Reply