List of Files (Category View) Warning

Phoca Download - download manager
cmb
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 19 Sep 2011, 23:02

List of Files (Category View) Warning

Post by cmb »

In the website menu manager I edit the Phoca Download menu item to select List of Files (Category View) for the Menu Item Type. When I open that page in the website's Frontend, I receive this warning:

Warning: Undefined array key 0 in /components/com_phocadownload/views/category/view.html.php on line 412
Call Stack
# Time Memory Function Location
1 0.0005 373320 {main}( ) .../index.php:0
2 0.0009 374648 require_once( '/var/www/html/montague/includes/app.php ) .../index.php:32
3 0.0230 983392 Joomla\CMS\Application\CMSApplication->execute( ) .../app.php:61
4 0.0241 1109416 Joomla\CMS\Application\SiteApplication->doExecute( ) .../CMSApplication.php:293
5 0.2094 1947992 Joomla\CMS\Application\SiteApplication->dispatch( $component = ??? ) .../SiteApplication.php:249
6 0.2117 1978432 Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_phocadownload', $params = ??? ) .../SiteApplication.php:208


In addition to the warning message, I see only the H1 heading title. No categories nor files are shown.
When I use a Menu Item Type of List Of Categories (Categories View), the page displays as expected.

Joomla version 4.3.4
PHP version 8.1.12
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of Files (Category View) Warning

Post by Jan »

Hi, which version of Phoca Download do you use?

Jan
If you find Phoca extensions useful, please support the project
cmb
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 19 Sep 2011, 23:02

Re: List of Files (Category View) Warning

Post by cmb »

I apologize for the omissions.

Phoca Download Administrator Component 4.0.6 17/03/2023
Phoca Download Button Plugin Site Plugin 4.0.4 28/09/2022
Phoca Download Chart Statistics Site Module 4.0.0 16/03/2022
Phoca Download Finder Plugin (Categories) Site Plugin 4.0.2 30/05/2022
Phoca Download Finder Plugin (Files) Site Plugin 4.0.2 30/05/2022
Phoca Download Plugin Site Plugin 4.0.6 17/03/2023
Phoca Download Tree Site Module 4.0.1 19/09/2022
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of Files (Category View) Warning

Post by Jan »

Hi, when you change the template (like described here: viewtopic.php?p=175949#p175949 ) for test only, do you still get the problem?

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of Files (Category View) Warning

Post by Jan »

BTW, is a category selected in menu link to category view?

Image
If you find Phoca extensions useful, please support the project
cmb
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 19 Sep 2011, 23:02

Re: List of Files (Category View) Warning

Post by cmb »

Jan wrote: 25 Aug 2023, 01:37 BTW, is a category selected in menu link to category view?
AHA! That's the item I skipped. If I select a category, all is well.
Select Category is a required field but the value="" option is accepted as sufficient.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of Files (Category View) Warning

Post by Jan »

Hi, thank you for the info, I will take a look at it for the next version.

Jan
If you find Phoca extensions useful, please support the project
cmb
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 19 Sep 2011, 23:02

Re: List of Files (Category View) Warning

Post by cmb »

That would be a courtesy to the user. Unfortunately, I cannot see a way to set the select element so that all except one of the options satisfies the required test. You'll probably have to use some other selection technique.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of Files (Category View) Warning

Post by Jan »

Hi, mostly, removing the first option "Select ..." is the way, so there are only options which are valid.

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