? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
15 Mar 2019

Now that #16879 has been merged into J4 we can immediately take advantage of it with the backend preview button. This should now use the full SEF URl rather than the non-SEF one

avatar wilsonge wilsonge - open - 15 Mar 2019
avatar wilsonge wilsonge - change - 15 Mar 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2019
Category Administration com_content
avatar wilsonge wilsonge - change - 15 Mar 2019
Title
Use 3.9 feature to make the preview url respect SEF settings
[4.] Make the preview url respect SEF settings
avatar wilsonge wilsonge - edited - 15 Mar 2019
avatar wilsonge wilsonge - change - 15 Mar 2019
Title
[4.] Make the preview url respect SEF settings
[4.0] Make the preview url respect SEF settings
avatar wilsonge wilsonge - edited - 15 Mar 2019
avatar wilsonge wilsonge - change - 15 Mar 2019
Labels Added: ?
avatar SharkyKZ
SharkyKZ - comment - 25 Mar 2019

Why not just use ContentHelperRoute::getArticleRoute()?

avatar wilsonge
wilsonge - comment - 25 Mar 2019

@SharkyKZ Because we're in the backend not the frontend - so we need to be able to use the SiteRouter object

We probably can - but that's just assembling the non-SEF URL - we'd still need to pass it through the SiteRouter object here

avatar infograf768
infograf768 - comment - 25 Mar 2019

Works fine here.
Would work even better (in multilingual) if #24332 was merged...

avatar wilsonge
wilsonge - comment - 25 Mar 2019

@infograf768 it's merged and merged 4.0 into this one if you want to test again :)

avatar SharkyKZ
SharkyKZ - comment - 25 Mar 2019

@wilsonge Correct. With ContentHelperRoute link building can be moved to the view as we no longer need querying the database. And then PreviewHelper can be removed entirely.

avatar wilsonge
wilsonge - comment - 25 Mar 2019

It doesn't actually make DB queries https://github.com/joomla/joomla-cms/blob/4.0-dev/components/com_content/helpers/route.php#L34-L55 - we'd have to make the DB Queries anyhow (I thought the same thing as you at first - but I think we'd need this helper anyhow)

avatar infograf768
infograf768 - comment - 25 Mar 2019

I have tested this item successfully on 16fc7af


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

avatar infograf768
infograf768 - comment - 25 Mar 2019

I have tested this item successfully on 16fc7af


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

avatar infograf768 infograf768 - test_item - 25 Mar 2019 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 25 Mar 2019

@wilsonge we don't need to add Itemid or look for language SEF code. Router should handle this. Route::link('site', \ContentHelperRoute::getArticleRoute($article->id, $article->catid, $article->language), true) is fine.

avatar wilsonge
wilsonge - comment - 25 Mar 2019

@SharkyKZ your the boss! Done

avatar SharkyKZ
SharkyKZ - comment - 25 Mar 2019

I have tested this item successfully on 66b63f3


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

avatar SharkyKZ SharkyKZ - test_item - 25 Mar 2019 - Tested successfully
avatar infograf768 infograf768 - change - 27 Mar 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-03-27 08:12:15
Closed_By infograf768
avatar infograf768 infograf768 - close - 27 Mar 2019
avatar infograf768 infograf768 - merge - 27 Mar 2019

Add a Comment

Login with GitHub to post a comment