? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
31 Jan 2018

Pull Request for Issues #19499 and #19496

Summary of Changes

Add active menu item to incomplete link, ex: JRoute::_('index.php?option=com_kunena');

This PR is a little similar to #19498 but prevents to add an active Itemid to full link like JRoute::_('index.php?option=com_content&view=archive'); when there is no menu item for the archive view.

The full link will still not depend on the page it was generated on.

Testing Instructions

See at issues #19499 and #19496.

Expected result

Issues are fixed.

avatar csthomas csthomas - open - 31 Jan 2018
avatar csthomas csthomas - change - 31 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jan 2018
Category Libraries
avatar 810
810 - comment - 31 Jan 2018

I have tested this item ? unsuccessfully on 1329077

404 Component not found.

Kunena
settings: Direct Component Access = "No"


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

avatar 810 810 - test_item - 31 Jan 2018 - Tested unsuccessfully
avatar 810
810 - comment - 31 Jan 2018

ps Kunena 5.1 RC2 is working correctly, because we added now itemid: Kunena/Kunena-Forum@3161bb5

avatar csthomas
csthomas - comment - 31 Jan 2018

I do not know which link does not work for you, but there is some issue in kunena routing because I can not generate a correct link by JRoute::_('index.php?option=com_kunena&view=search'); which should be /forum/search when I generated it from other place that kunena, ex article view.

How to check?
Put <?= JRoute::_('index.php?option=com_kunena&view=search'); ?> below <body> in active template. When you go to article view then link is /component/kunena/search but when you go to forum then it is correct /forum/search.

I tested it on 3.8.3. On 3.8.4 with this PR the link is always /component/kunena/search.
For me this is now kunena issue.

avatar OctavianC
OctavianC - comment - 31 Jan 2018

I have tested this item ? unsuccessfully on 1329077

Running this code:

var_dump(JRoute::_('index.php?option=com_content'));
var_dump(JRoute::_('index.php?option=com_content&view=test'));
var_dump(JRoute::_('index.php?option=com_content&task=test'));
var_dump(JRoute::_('index.php?view=test'));
var_dump(JRoute::_('index.php?task=test'));
var_dump(JRoute::_('index.php?option=com_content&test=1'));

Produces:

string(24) "/j384/index.php/articles"
string(44) "/j384/index.php/component/content/?view=test"
string(44) "/j384/index.php/component/content/?task=test"
string(34) "/j384/index.php/articles?view=test"
string(34) "/j384/index.php/articles?task=test"
string(31) "/j384/index.php/articles?test=1"

In Joomla! 3.8.3:

string(24) "/j384/index.php/articles"
string(34) "/j384/index.php/articles?view=test"
string(34) "/j384/index.php/articles?task=test"
string(34) "/j384/index.php/articles?view=test"
string(34) "/j384/index.php/articles?task=test"
string(31) "/j384/index.php/articles?test=1"

So it's broken yet again; no offense but I'd refrain from making any more commits until your original one is reverted.


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

avatar OctavianC OctavianC - test_item - 31 Jan 2018 - Tested unsuccessfully
avatar csthomas csthomas - change - 31 Jan 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-01-31 19:08:48
Closed_By csthomas
Labels Added: ?
avatar csthomas csthomas - close - 31 Jan 2018

Add a Comment

Login with GitHub to post a comment