?
avatar Devportobello
Devportobello
20 Nov 2015

After migrating to J3.4.5, one of my old third party extension who was using JRequest like that:

// Require the base controller
require_once JPATH_COMPONENT.'/controller.php';

// Get an instance of the controller prefixed by *
$controller = JControllerLegacy::getInstance('Custom');

// Perform the Request task
$controller->execute(JRequest::getCmd('task'));

// Redirect if set by the controller
$controller->redirect();

Now didnt work when i want to do a particular task with subcontroller, eg: edit an item "?option=com_custom&task=item.edit&id=1";
I know JRequest is deprecated but for J4.0

JRequest::getCmd('task') = item.edit
JFactory::getApplication()->input->get('task','','CMD') = edit

so CustomController::execute is unable to do the task.
I tested only on backend and im unable to reproduce this on a fresh install ...

How to test

after migrating, edit file: administrator/components/com_content/content.php
line 21: replace with

$controller->execute(JRequest::getCmd('task'));

then try to edit an article.

avatar Devportobello Devportobello - open - 20 Nov 2015
avatar Bakual
Bakual - comment - 20 Nov 2015

I tested only on backend and im unable to reproduce this on a fresh install ...

Sounds more like a messed up update or a misbehaving 3rd party plugin then when you can't reproduce it on a clean install.

avatar Devportobello
Devportobello - comment - 20 Nov 2015

sound like messed up update... i closed this, sry wasting your time.

avatar Devportobello Devportobello - change - 20 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-20 11:14:38
Closed_By Devportobello
avatar Devportobello Devportobello - close - 20 Nov 2015
avatar zero-24 zero-24 - close - 20 Nov 2015
avatar zero-24 zero-24 - change - 20 Nov 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment