Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Autosuggester #4401

Closed
wants to merge 18 commits into from
Closed

Changed Autosuggester #4401

wants to merge 18 commits into from

Conversation

tkempf
Copy link
Contributor

@tkempf tkempf commented Sep 30, 2014

Change Autosuggester so that it respects static-filters,accesslevels,publish up/down dates and article states
This code is not yet production ready but runs fine for me on a site with Joomla 2.5.17 since 2 years

@@ -61,17 +61,106 @@ protected function getListQuery()
{
// Create a new query object.
$db = $this->getDbo();
//attempt to change mysql for error in large select
$db->setQuery('SET SQL_BIG_SELECTS=1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you wrap this in a $db->name check so that the non-MySQL databases will still at least attempt to work with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@zero-24
Copy link
Contributor

zero-24 commented Oct 1, 2014

@tkempf please notice that travis is not happy with your code:


FILE: ...is/build/joomla/joomla-cms/components/com_finder/models/suggestions.php

--------------------------------------------------------------------------------

FOUND 19 ERROR(S) AND 4 WARNING(S) AFFECTING 18 LINE(S)

--------------------------------------------------------------------------------

  68 | ERROR   | Whitespace found at end of line

  77 | ERROR   | Whitespace found at end of line

  86 | ERROR   | Whitespace found at end of line

  87 | WARNING | Expected 1 space after "="; 0 found

  87 | ERROR   | Expected 1 space before "="; 0 found

  94 | WARNING | Expected 1 space after ".="; 0 found

  94 | ERROR   | Expected 1 space before ".="; 0 found

  95 | WARNING | Expected 1 space after "<"; 0 found

  95 | ERROR   | Expected 1 space before "<"; 0 found

  96 | WARNING | Expected 1 space after ".="; 0 found

  96 | ERROR   | Expected 1 space before ".="; 0 found

  98 | ERROR   | No space found after comma in function call

 101 | ERROR   | Whitespace found at end of line

 105 | ERROR   | Whitespace found at end of line

 109 | ERROR   | Functions and classes must not contain multiple empty lines in

     |         | a row; found 2 empty lines

 113 | ERROR   | No space found after comma in function call

 114 | ERROR   | No space found after comma in function call

 115 | ERROR   | No space found after comma in function call

 115 | ERROR   | No space found after comma in function call

 116 | ERROR   | Whitespace found at end of line

 118 | ERROR   | Whitespace found at end of line

 120 | ERROR   | Whitespace found at end of line

 161 | ERROR   | Whitespace found at end of line

--------------------------------------------------------------------------------


FILE: ...home/travis/build/joomla/joomla-cms/modules/mod_finder/tmpl/default.php

--------------------------------------------------------------------------------

FOUND 2 ERROR(S) AFFECTING 1 LINE(S)

--------------------------------------------------------------------------------

 130 | ERROR | Concat operator must be followed by one space

 130 | ERROR | Concat operator must be preceeded by one space

--------------------------------------------------------------------------------

see: https://travis-ci.org/joomla/joomla-cms/jobs/36741145

@pjmatos
Copy link
Contributor

pjmatos commented Apr 13, 2015

I'm testing this in J3.4.1 and it is working okay.
Thanks, tkempf.

@kathastaden
Copy link

I tested with version: Joomla 3.4.4-dev development

  1. Enable the Smart Search Plugin
  2. Go to the Smart Search Component and click "Index" to get some results
  3. Have a look at the Frontend and the Smart Search module and test the autosuggestion there
  4. Search for an article that is unpublished - with the patch this one should not be suggested anymore
  5. Search for an article that will be published in future - with the patch this one should not be suggested anymore
  6. Search for an article that is only for Super Users and you are not logged in at the Frontend - with the patch this one should not be suggested anymore
  7. Create a Search Filter and use the Smart Search of the Frontend to find it

Result: After I applied the patch, the whole suggestions in the Smart Search didn't work anymore. As an example I searched for "similar" because there is an article called "Similar Tags" and this one should be suggested.
I attached a screenshot of the suggestion before the patch was applied, and after it was applied.

Before the Patch was applied:
autosuggestion_before_patch

After the Patch was applied:
autosuggestion_after_patch


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

@hitchblade
Copy link

Using Joomla Version : 3.4.4-dev.
Enable Smart Search Plugin. Tested a while. After I applied the Plugin and go to my smartsearch in the Frontend, I get a blank Page...


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

@zero-24
Copy link
Contributor

zero-24 commented Aug 23, 2015

@tkempf can you try to get the code working on the current staging? Based on the last tests it don't work. Please add a comment if you have find the issue. Thanks.


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

@zero-24 zero-24 closed this Aug 23, 2015
@tkempf
Copy link
Contributor Author

tkempf commented Aug 26, 2015

code is now working again on current staging. There was an issue when no filter was selected. Can you pls. reopen.
While testing i found that the content - finder plugin does not reflect state changes in the search index items. IMO disabling an article should disable the corresponding search index item. Pls. correct me if i am wrong...

@zero-24 zero-24 reopened this Aug 26, 2015
@adriano-paula-ribeiro
Copy link

I confirm patch this one should not be suggested anymore.


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

@brianteeman
Copy link
Contributor

Thank you for creating this but it would appear that this has been resolved elsewhere in the code base. If this is not correct then this can be re-opened


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

@brianteeman brianteeman closed this May 8, 2016
@Giuse69
Copy link
Contributor

Giuse69 commented May 25, 2016

I just tested on J3.5.1 and autosuggester does not respect for example access level: as a guest I get a suggestion for a Administrator level article, so it is not resolved in codebase?


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

@Quy
Copy link
Contributor

Quy commented May 31, 2018

@brianteeman Should this be closed too as unfixable per #16011?

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.

None yet