? Pending

User tests: Successful: Unsuccessful:

avatar EmilMassey
EmilMassey
2 Jun 2016

Pull Request for Issue #10712 .

Summary of Changes

Select only published tags from the database by adding $query->where('a.published = 1');.

Testing Instructions

  1. Make sure Search - Tags plugin is enabled
  2. Create a tag
  3. Unpublish, archive or trash it
  4. Type a tag name in a mod_search module
  5. Only published tags should be listed.

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
4.00

avatar EmilMassey EmilMassey - open - 2 Jun 2016
avatar EmilMassey EmilMassey - change - 2 Jun 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 2 Jun 2016
Category Plugins Tags
avatar infograf768
infograf768 - comment - 3 Jun 2016

Looking at code, I think you should separate the query for published, and leave alone the code with if ($app->isSite() && JLanguageMultilang::isEnabled()) as this is done in the other search plugins.
I.e. should be:

        $query->where('a.published = 1');

        if ($app->isSite() && JLanguageMultilang::isEnabled())
        {
            $tag = JFactory::getLanguage()->getTag();
            $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')');
        }
avatar hardiktasol hardiktasol - test_item - 3 Jun 2016 - Tested successfully
avatar hardiktasol
hardiktasol - comment - 3 Jun 2016

I have tested this item successfully on c0b829b

I have tested in Joomla 3.5.1 and patch works perfectly.


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

avatar gunjanpatel gunjanpatel - test_item - 7 Jun 2016 - Tested successfully
avatar gunjanpatel
gunjanpatel - comment - 7 Jun 2016

I have tested this item successfully on c0b829b

It works perfect after applying path.
It has two successful tests, but as per @infograf768 suggestion, I agree that $query->where('a.published = 1'); should be outside of the condition. Also, I would like to suggest below code to use quoteName.

$query->where($db->qn('a.published') . ' = 1');

Thanks for fixes.


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

avatar brianteeman brianteeman - change - 7 Jun 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 7 Jun 2016

rtc


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

avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 7 Jun 2016
Milestone Added:
avatar wojsmol
wojsmol - comment - 7 Jun 2016

@brianteeman Please remove RTC, see comments by @infograf768 and @gunjanpatel .

avatar brianteeman brianteeman - change - 7 Jun 2016
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 7 Jun 2016

Done

avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 7 Jun 2016
Status Ready to Commit Pending
Labels
avatar brianteeman
brianteeman - comment - 7 Jun 2016

Back to pending


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

avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2016
Labels Removed: ?
avatar infograf768
infograf768 - comment - 7 Jun 2016

@EmilMassey

Please update your PR

avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Jun 2016

This PR has received new commits.

CC: @gunjanpatel, @hardiktasol


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

avatar wilsonge wilsonge - change - 8 Jun 2016
Milestone Removed:
avatar gunjanpatel gunjanpatel - test_item - 10 Jun 2016 - Tested successfully
avatar gunjanpatel
gunjanpatel - comment - 10 Jun 2016

I have tested this item successfully on db7e77e

Tested successfully.


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

avatar brianteeman
brianteeman - comment - 10 Jun 2016

As the previously tested PR has been updated and confirmed by @gunjanpatel I am setting this back to RTC


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

avatar brianteeman brianteeman - change - 10 Jun 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 10 Jun 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 10 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 10 Jun 2016
Milestone Added:
avatar EmilMassey
EmilMassey - comment - 11 Jun 2016

Thank you @infograf768, @gunjanpatel for your suggestions.

avatar wilsonge wilsonge - change - 15 Jun 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-06-15 22:58:11
Closed_By wilsonge
avatar wilsonge wilsonge - close - 15 Jun 2016
avatar wilsonge wilsonge - merge - 15 Jun 2016
avatar joomla-cms-bot joomla-cms-bot - close - 15 Jun 2016
avatar wilsonge wilsonge - reference | 1a026b9 - 15 Jun 16
avatar wilsonge wilsonge - merge - 15 Jun 2016
avatar wilsonge wilsonge - close - 15 Jun 2016
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jun 2016
Labels Removed: ?
avatar wilsonge
wilsonge - comment - 15 Jun 2016

Merged :) Thanks very much!

Add a Comment

Login with GitHub to post a comment