Page 1 of 2

Phoca Download 1.3.1a

Posted: 25 Nov 2009, 17:54
by Jan
Hi,

I have the following problems in Phoca Download 1.3.1a. If I create a menu link to file, I get the following error in FILE view:

Notice: Undefined property: stdClass::$section in D:\www\J1515\components\com_phocadownload\views\file\tmpl\default.php on line 11

Then if I go to CATEGORY view:
Notice: Undefined variable: file in D:\www\J1515\components\com_phocadownload\helpers\route.php on line 46

Notice: Undefined variable: file in D:\www\J1515\components\com_phocadownload\helpers\route.php on line 49

Notice: Undefined variable: file in D:\www\J1515\components\com_phocadownload\helpers\route.php on line 46

Notice: Undefined variable: file in D:\www\J1515\components\com_phocadownload\helpers\route.php on line 49

SEF disabled

if SEF enabled, I get the same + problem in SECTION view:
Notice: Undefined index: id in D:\www\J1515\components\com_phocadownload\router.php on line 71

Jan

Re: Phoca Download 1.3.1a

Posted: 25 Nov 2009, 19:16
by codejunkie
I think I know the problem on the route.php file. I named an argument for the function one thing and used a different variable name in it's usage. I thought I uploaded the correct one. I'll look into it and get back with you. It may be the weekend before I can do anything about it though. We have a holiday tomorrow and I am traveling next week.

Re: Phoca Download 1.3.1a

Posted: 25 Nov 2009, 19:54
by Jan
but maybe it is not problem only in route.php as I got this errors in case I have not used SEF?

Re: Phoca Download 1.3.1a

Posted: 25 Nov 2009, 20:10
by codejunkie
I will look into it and get back with you once I test it more over the weekend.

But I think we are closer to getting this problem fixed.

Re: Phoca Download 1.3.1a

Posted: 26 Nov 2009, 13:09
by Jan
I will take a look at it, maybe I can add there some if clause to prevent from error messages (for now). I want to add some new features into plugin and phoca download button plugin needs some files from Phoca Download Component, I will do beta 1.3.2 (with your modifications). Please don't do any modifications now, so there will be no two different versions

BTW: please let me know your first and last name so I can use it if I will write news about new version (only if you want I will use it). :| Thank you.

Re: Phoca Download 1.3.1a

Posted: 26 Nov 2009, 13:49
by Jan
Seems like I have fixed it:

route.php:

switch ($type) instead of switch($file)

default.php (file view)

$this->category[0]->section - was not taken from database so I have changed the sql query so the sectionid will be loaded:

$this->category[0]->sectionid

So it seems like this works. Only small problem I have, we need to write some manuals where we must add some information that going from e.g. category to section or to file (and back) can change the Itemid and with itemd the settings too.

Anyway thank you for this improvement

EDIT:
:( but I still have problems if SEF is enabled :-(
I will try to take a look at the router.php :-(

Re: Phoca Download 1.3.1a

Posted: 26 Nov 2009, 15:26
by Jan
Ok, I have overwritten the router.php and added to all route.php function alias, so the created links will be the same like they are if SEF is used.

EDIT:
:( Have not, the SEF is in conflict with route.php (I will try to do some tests, but seems like there is some conflict with accessing file view if the file view is not called from the main itemid ) :-(

Re: Phoca Download 1.3.1a

Posted: 26 Nov 2009, 16:50
by Jan
Hi, I have fixed the aliases and it works if sef is disabled but it doesn't work with SEF enabled as if e.g. category link is created then link to file goes to category instead, if section is created then link to category goes to section, etc. :(

EDIT: Still working on it, seems like overwriting router.php helped. I will do more test ...

Re: Phoca Download 1.3.1a

Posted: 27 Nov 2009, 01:52
by Jan
Ok, it is done. The modifications are in:

1.3.2 Beta version

https://www.phoca.cz/download/category/4 ... -component

Both plugins are ready, the modules needs to be rewritten.

Re: Phoca Download 1.3.1a

Posted: 27 Nov 2009, 16:59
by codejunkie
Good job, Jan. :twisted: I had not even had a chance to look into this.

I have downloaded the new 1.3.2beta component. I need to get it installed and check it out.