Page 1 of 1

List of Files (Category View) Warning

Posted: 24 Aug 2023, 23:40
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

Re: List of Files (Category View) Warning

Posted: 25 Aug 2023, 00:44
by Jan
Hi, which version of Phoca Download do you use?

Jan

Re: List of Files (Category View) Warning

Posted: 25 Aug 2023, 01:02
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

Re: List of Files (Category View) Warning

Posted: 25 Aug 2023, 01:33
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

Re: List of Files (Category View) Warning

Posted: 25 Aug 2023, 01:37
by Jan
BTW, is a category selected in menu link to category view?

Image

Re: List of Files (Category View) Warning

Posted: 25 Aug 2023, 01:51
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.

Re: List of Files (Category View) Warning

Posted: 28 Aug 2023, 16:19
by Jan
Hi, thank you for the info, I will take a look at it for the next version.

Jan

Re: List of Files (Category View) Warning

Posted: 28 Aug 2023, 16:36
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.

Re: List of Files (Category View) Warning

Posted: 29 Aug 2023, 16:15
by Jan
Hi, mostly, removing the first option "Select ..." is the way, so there are only options which are valid.

Jan