? ? Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
18 Apr 2017

Summary of Changes

Use getInt over get as we just accept integers here

Testing Instructions

  • review
  • check that using isis still work

Expected result

Isis still work

Actual result

we not cast to int

Documentation Changes Required

None

avatar zero-24 zero-24 - open - 18 Apr 2017
avatar zero-24 zero-24 - change - 18 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2017
Category Administration Templates (admin)
avatar Quy
Quy - comment - 21 Apr 2017

Would this be closed in light of this PR #15448?

avatar Bakual
Bakual - comment - 21 Apr 2017

It's a valid PR.
The current $input->get('Itemid', ''); is wrong as there is only the default filtering.
We should either use $input->getInt('Itemid', 0); or $input->get('Itemid', 0, 'int'); since we only accept integers here.

avatar zero-24
zero-24 - comment - 21 Apr 2017

I'm going to update this PR in a minute.

avatar zero-24 zero-24 - change - 21 Apr 2017
Labels Added: ?
avatar zero-24
zero-24 - comment - 21 Apr 2017

done with 355e210 thanks for the reminder.

avatar Quy
Quy - comment - 21 Apr 2017

Before:

<body class="admin com_content view- layout- task- itemid-" data-basepath="/joomla-cms-staging">

After:

<body class="admin com_content view- layout- task- itemid-0" data-basepath="/joomla-cms-staging">

The difference is itemid- vs itemid-0. I am wondering if Itemid should be id.

avatar mbabker
mbabker - comment - 21 Apr 2017

Itemid and id in the context of Joomla are two different things.

avatar Quy
Quy - comment - 21 Apr 2017

Here is a URL:

http://localhost/joomla-cms-staging/administrator/index.php?option=com_content&view=article&layout=edit&id=1

Here is the code to get values in the URL. As you can see it is id so Itemid will always be 0.

// Detecting Active Variables
$option   = $input->get('option', '');
$view     = $input->get('view', '');
$layout   = $input->get('layout', '');
$task     = $input->get('task', '');
$itemid   = $input->get('Itemid', '');
avatar mbabker
mbabker - comment - 21 Apr 2017

Itemid doesn't actually apply in the backend context at all (unless we're suddenly routing to menu items in the backend) so I'm honestly not sure why it's used in the template. But for the frontend they are different things.

avatar Quy
Quy - comment - 21 Apr 2017

So deprecate it, change to id or leave it as is?

avatar mbabker
mbabker - comment - 21 Apr 2017

This PR as is is fine. I'd suggest the 4.0 admin template doesn't need an Itemid based HTML class though unless we're opening the can of worms needed to support SEF routing for the admin app.

avatar Quy
Quy - comment - 21 Apr 2017

In error.php, $itemid is declared but not utilized.

avatar zero-24
zero-24 - comment - 21 May 2017

Any update here so we can move this forward to be included in the 3.7.3?

avatar Quy
Quy - comment - 21 May 2017

I have tested this item successfully on 0baff40


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15376.

avatar Quy Quy - test_item - 21 May 2017 - Tested successfully
avatar brianteeman brianteeman - change - 8 Jun 2017
Milestone Added:
avatar brianteeman brianteeman - change - 8 Jun 2017
Milestone Added:
avatar brianteeman brianteeman - change - 8 Jun 2017
Milestone Removed:
avatar brianteeman brianteeman - change - 8 Jun 2017
Milestone Removed:
avatar zero-24 zero-24 - change - 26 Jun 2017
Milestone Added:
avatar roland-d roland-d - test_item - 10 Jul 2017 - Tested successfully
avatar roland-d
roland-d - comment - 10 Jul 2017

I have tested this item successfully on 2360b16

Code review and tested, Itemid is now returned as 0 after applying patch.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15376.

avatar Quy
Quy - comment - 10 Jul 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Jul 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Jul 2017

RTC as stated above.

avatar rdeutz rdeutz - change - 11 Jul 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-11 14:14:35
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 11 Jul 2017
avatar rdeutz rdeutz - merge - 11 Jul 2017

Add a Comment

Login with GitHub to post a comment