bug PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
26 Apr 2024

Pull Request for Issue ##43344 .

Summary of Changes

After #42288 edixtor-xtd links to com_media do not work correctly for submenu items.

Correctly route the url to ensure it's correctly using sef modes and subfolders

Testing Instructions

Edit an article on the front of your site with sef enabled AND with an article that is linked from a submenu. Using the editor-xtd button/link open the media manager to insert an image

Actual result BEFORE applying this Pull Request

404

Expected result AFTER applying this Pull Request

works as expected

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar brianteeman brianteeman - open - 26 Apr 2024
avatar brianteeman brianteeman - change - 26 Apr 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Apr 2024
Category Front End Plugins
avatar Fedik
Fedik - comment - 26 Apr 2024

The direction is correct, but wait with it.
The link should be handled in the layout already.
I need to look what is missing.

avatar Fedik
Fedik - comment - 26 Apr 2024

Please change

$link = Route::_($link);
to
$link = Route::_($link, false);

Or better place it here

'src'        => Route::_($link, false),

Then it is good

avatar dgrammatiko
dgrammatiko - comment - 26 Apr 2024

FWIW the Route call is utilized in the layout file, so the changes need to be done there.

Also change this

$doc->addScriptOptions('media-picker-api', ['apiBaseUrl' => Uri::base(true) . '/index.php?option=com_media&format=json']);

to

 $doc->addScriptOptions('media-picker-api', ['apiBaseUrl' => Route::_('index.php?option=com_media&format=json', false)]); 
avatar brianteeman
brianteeman - comment - 26 Apr 2024

do as you wish. closing this here

avatar brianteeman brianteeman - close - 26 Apr 2024
avatar brianteeman brianteeman - change - 26 Apr 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-04-26 11:36:47
Closed_By brianteeman
Labels Added: bug PR-5.1-dev

Add a Comment

Login with GitHub to post a comment