Skip to content

Correct archived article links in search results#24990

Merged
SniperSister merged 2 commits intojoomla:stagingfrom
SharkyKZ:j3/plgSearchContent
Jun 9, 2019
Merged

Correct archived article links in search results#24990
SniperSister merged 2 commits intojoomla:stagingfrom
SharkyKZ:j3/plgSearchContent

Conversation

@SharkyKZ
Copy link
Copy Markdown
Contributor

Pull Request for Issue #22395.

Summary of Changes

Corrects links to archived articles in search results.

Testing Instructions

Make sure Archived Articles option is enabled in Search - Content plugin.

Create an article. Set status to archived.
Search for the article using standard search (com_search).
Inspect link to article in search results.

Expected result

Link opens article, e.g. http://localhost/index.php/site-map/articles/9-uncategorised/67-whats-new-in-15

Actual result

Link opens archived view, e.g. http://localhost/index.php/using-joomla/extensions/components/content-component/archived-articles/2019?view=archive&month=5

Documentation Changes Required

No.

@ghost
Copy link
Copy Markdown

ghost commented May 23, 2019

@beejay41
Copy link
Copy Markdown

@HerKle @beejay41 please test > https://docs.joomla.org/Testing_Joomla!_patches

I've applied the change to my test system and it now returns the expected link. Bug fixed.

My only criticism is that there are now 2 identical pieces of code ( for normal and archived articles), so if there is a need to make changes in future, the duplicate (archive) code could be overlooked. Also, only do things once.

@ghost
Copy link
Copy Markdown

ghost commented May 23, 2019

@beejay41 please mark your test as successfully > https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results

@SharkyKZ
Copy link
Copy Markdown
Contributor Author

@beejay41 I was thinking the same thing. But I'll leave code cleanup for another time.

I'm also not sure whether the queries are correct. They don't look for articles in archived categories.

@alikon
Copy link
Copy Markdown
Contributor

alikon commented May 23, 2019

there is no archived category iirc it's a value of the state field maybe (2)

@brianteeman
Copy link
Copy Markdown
Contributor

This doesnt look correct to me. You need to also see what the archive module and archive view create

@SharkyKZ
Copy link
Copy Markdown
Contributor Author

@alikon same thing. Query looks for articles in published but not in archived categories. Both when looking for published and archived articles.

@SharkyKZ
Copy link
Copy Markdown
Contributor Author

@brianteeman this is fine. Links to archive view were added as a workaround for some 1.5 issue. See https://developer.joomla.org/joomlacode-archive/issue-23764.html.

@beejay41
Copy link
Copy Markdown

@beejay41 please mark your test as successfully > https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results

Sorry, new to this. I did as requested, and it looks to have updated the Joomla tracker, but not here. 2FA error, but I'm not using 2FA anywhere here.

@ghost
Copy link
Copy Markdown

ghost commented May 23, 2019

tried to alter test of @beejay41 but get:

Screen Shot 2019-05-23 at 15 44 01

@brianteeman
Copy link
Copy Markdown
Contributor

@franz-wohlkoenig you will need to speak to @HLeithner about this. There has been a change in the authentication settings on github which you are hitting and need to resolve

@HLeithner
Copy link
Copy Markdown
Member

Michael is working on this problem.

@brianteeman
Copy link
Copy Markdown
Contributor

@HLeithner I assumed someone was - I just wanted to let @franz-wohlkoenig know

@ghost
Copy link
Copy Markdown

ghost commented May 23, 2019

thanks for info, guys.

@beejay41 so please wait until this Problem is solved.

@mbabker
Copy link
Copy Markdown
Contributor

mbabker commented May 23, 2019

It's all sorted.

@infograf768
Copy link
Copy Markdown
Member

@mbabker
In the meanwhile this PR is not displaying in issues:
#24993

Can you help?

@mbabker
Copy link
Copy Markdown
Contributor

mbabker commented May 23, 2019

Comment on it, update it, do anything that triggers a webhook from GitHub to the tracker and that will sort it. It'll take me longer to log into the server and run the CLI command than it will for someone to do that.

@infograf768
Copy link
Copy Markdown
Member

tks, that worked.

@ghost
Copy link
Copy Markdown

ghost commented May 23, 2019

thanks @mbabker

@beejay41 your testresult is altered.

@beejay41
Copy link
Copy Markdown

thanks @mbabker

@beejay41 your testresult is altered.

Cheers.

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 5, 2019

I have tested this item ✅ successfully on ba42aa2


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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 5, 2019

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 5, 2019
@SniperSister SniperSister merged commit 3066d7a into joomla:staging Jun 9, 2019
@SniperSister
Copy link
Copy Markdown
Contributor

Merged, thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 9, 2019
@SniperSister SniperSister added this to the Joomla 3.9.8 milestone Jun 9, 2019
@SniperSister SniperSister removed this from the Joomla 3.9.8 milestone Jun 9, 2019
@zero-24 zero-24 added this to the Joomla 3.9.8 milestone Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.