Phoca Download File - Class "JRequest" not found

Phoca Download - download manager
bigdaddy83
Phoca Member
Phoca Member
Posts: 11
Joined: 12 Sep 2021, 13:29

Phoca Download File - Class "JRequest" not found

Post by bigdaddy83 » 12 Sep 2021, 13:37

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?

christine
Phoca Hero
Phoca Hero
Posts: 2256
Joined: 28 Nov 2010, 17:20

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

Post by christine » 12 Sep 2021, 15:18

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

bigdaddy83
Phoca Member
Phoca Member
Posts: 11
Joined: 12 Sep 2021, 13:29

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

Post by bigdaddy83 » 12 Sep 2021, 17:23

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

bigdaddy83
Phoca Member
Phoca Member
Posts: 11
Joined: 12 Sep 2021, 13:29

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

Post by bigdaddy83 » 12 Sep 2021, 18:20

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.

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

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

Post by Jan » 12 Sep 2021, 18:25

Hi, the module is not ready for Joomla 4 yet, It needs to be overwritten and updated for Joomla 4.

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

bigdaddy83
Phoca Member
Phoca Member
Posts: 11
Joined: 12 Sep 2021, 13:29

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

Post by bigdaddy83 » 12 Sep 2021, 20:35

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!

bigdaddy83
Phoca Member
Phoca Member
Posts: 11
Joined: 12 Sep 2021, 13:29

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

Post by bigdaddy83 » 12 Sep 2021, 20:49

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!

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

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

Post by Jan » 14 Sep 2021, 22:26

Ok, thank you for the info.

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

Post Reply