Page 1 of 2

Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 13:37
by bigdaddy83
Hi,

many thanks again! I have now installed the module, but get the message "Class" JRequest "not found" in the backend.

I am using Joomla 4.0.2.

What can I do?

Re: Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 15:18
by christine
Hi,

Which module do you mean? Because for Joomla 4 for testing purposes, Download belongs to PD components:
https://www.phoca.cz/download/category/ ... -component.

See also: viewtopic.php?f=7&p=167306#p167306

BTW: JRequest is deprecated.

Kind regards
Christine

Re: Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 17:23
by bigdaddy83
Hi,

I mean mod_phocadownload_file_v3.2.2 I got this from Jan, wanted to integrate it, but when I open the settings for this module I get the error message.

I am using the 4.0.0 Alpha6.

thanks

Kind regards

Ronny

Re: Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 18:20
by bigdaddy83
Hi,

I found the problem.

The following lines are the problem.
mod_phocadownload_file_v3.2.2\models\fields\phocadownloadcategorymodule.php

Line 47

// TODO - check for other views than category edit
$view = JRequest::getVar( 'view' );
$catId = -1;
if ($view == 'phocadownloadcat') {
$id = $this->form->getValue('id'); // id of current category
if ((int)$id > 0) {
$catId = $id;
}
}

I excluded it, so there was no more error message.

But I can't choose a category either.

Maybe I'll get behind it and can solve the problem.

Re: Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 18:25
by Jan
Hi, the module is not ready for Joomla 4 yet, It needs to be overwritten and updated for Joomla 4.

Jan

Re: Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 20:35
by bigdaddy83
Hi,

I solved the problem and now everything works in Joomla 4 as well.

I'll send it back as version 3.2.3 :-)

Thanks again!

Re: Phoca Download File - Class "JRequest" not found

Posted: 12 Sep 2021, 20:49
by bigdaddy83
I have not found a way to send the module back, so here is the solution.

file: models\fields\phocadownloadcategorymodule.php
old
$view = JRequest::getVar( 'view' );

new
$app = JFactory::getApplication();
$view = $app->input->getCMD('view', '');

Thanks again!

Re: Phoca Download File - Class "JRequest" not found

Posted: 14 Sep 2021, 22:26
by Jan
Ok, thank you for the info.

Jan

Re: Phoca Download File - Class "JRequest" not found

Posted: 30 May 2022, 16:11
by Jan
Hi, fixed in Joomla 4 version.

Jan

Re: Phoca Download File - Class "JRequest" not found

Posted: 29 Nov 2023, 17:04
by bigdaddy83
Hello,

is the module already available for Joomla 4? The download works but when I create a new category, I can't select the category in the module :-(

Best regards
Ronny