Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13591 closed defect (worksforme)

Not working

Reported by: Massimo Owned by: Ryan J Ollos
Priority: normal Component: KeywordSuggestPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description

The plugin loads but nothing happens when starting to type on the keywords field.

2019-08-23 11:33:39,436 Trac[loader] DEBUG: Loading plugin "keywordsuggest.web_ui" from "/mnt/data/trac/projects/trac-pp/plugins/TracKeywordSuggest-0.5.0.dev0-py2.7.egg"

The jQuery UI of the example and also AutocompleteUsersPlugin are working fine.

The current configuration of the KeywordSuggestPlugin:

[keywordsuggest]
field = keywords
mustmatch = False
matchcontains = True
multipleseparator = ,

Maybe also concerned: The keywords field is part of [ticketfieldslayout] fields =... (TracTicketFieldsLayoutPlugin).

Attachments (0)

Change History (21)

comment:1 Changed 5 years ago by Ryan J Ollos

comment:2 Changed 5 years ago by Massimo

There were some missing resources, I did a re-deployment of static resources, now the only entry in Browser Console after reloading the ticket page, modify and trying to enter some keywords is this:

JQMIGRATE: Migrate is installed, version 1.4.1  
jquery-migrate-1.4.1.min.js:2:542

But no popup with suggestions appears.

comment:3 Changed 5 years ago by Ryan J Ollos

Do you see this log message?:

13:41:49 Trac[web_ui] DEBUG:
                No keywords found. KeywordSuggestPlugin is disabled.

comment:4 Changed 5 years ago by Ryan J Ollos

Also, please look for a snippet of code on the page:

  <script type="text/javascript">
            jQuery(document).ready(function($) {
                var keywords = [ 'backport','deploy','dupsearch','patch' ]
                var sep = ' '.trim() + ' '
                function split( val ) {
                    return val.split( / \s*|\s+/ );
                }
                });
...
  </script>

comment:5 Changed 5 years ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newaccepted

Do you have TagsPlugin installed? The functionality has been added to TagsPlugin. The component is tractags.web_ui.TagInputAutoComplete.

If you aren't using TagsPlugin, you need to define keywords in the [keywordsuggest] section.

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:6 Changed 5 years ago by Ryan J Ollos

See also: #9871.

You can also try the latest: r17470.

comment:7 in reply to:  3 Changed 5 years ago by Massimo

Replying to Ryan J Ollos:

Do you see this log message?:

13:41:49 Trac[web_ui] DEBUG:
                No keywords found. KeywordSuggestPlugin is disabled.

No. Filtering for "Suggest" I only see:

Trac[loader] DEBUG: Adding plugin "TracKeywordSuggest 0.5.0.dev0" from "/mnt/data/trac/projects/trac-pp/plugins/TracKeywordSuggest-0.5
.0.dev0-py2.7.egg"
Trac[loader] DEBUG: Loading plugin "keywordsuggest.web_ui" from "/mnt/data/trac/projects/trac-pp/plugins/TracKeywordSuggest-0.5.0.dev0
-py2.7.egg"
Trac[perm] DEBUG: DefaultPermissionPolicy allows Mo performing WIKI_VIEW on <Resource u'wiki:KeywordSuggestModule'>
Trac[perm] DEBUG: DefaultPermissionPolicy allows Mo performing WIKI_VIEW on <Resource u'wiki:KeywordSuggestPlugin'>

comment:8 in reply to:  4 Changed 5 years ago by Massimo

Replying to Ryan J Ollos:

Also, please look for a snippet of code on the page:

I see that piece of code filled var keywords with all our keywords.

comment:9 in reply to:  5 Changed 5 years ago by Massimo

Replying to Ryan J Ollos:

Do you have TagsPlugin installed? The functionality has been added to TagsPlugin. The component is tractags.web_ui.TagInputAutoComplete.

Yes, it's installed, loaded and all tractags.* components are enabled.

comment:10 Changed 5 years ago by Ryan J Ollos

Please uninstall KeywordSuggestPlugin. Do you have TagsPlugin 0.10? That is the latest released version.

You should still see the snippet of code after TracKeywordSuggest is uninstalled, as it's provided by TracTags. Here are the options: tagsplugin/tags/0.10/tractags/web_ui.py#L42.

comment:11 Changed 5 years ago by Ryan J Ollos

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:12 Changed 5 years ago by Ryan J Ollos

Resolution: worksforme
Status: acceptedclosed

comment:13 Changed 5 years ago by Massimo

Still does not work.

I removed the KeywordSuggestPlugin. I currently have the r17247 TracTags 0.11dev from the repo trunk installed. In the page source I still see the jQuery code snippet.

comment:14 Changed 5 years ago by Ryan J Ollos

In 17471:

TracTags 0.11dev: Make autocomplete compatible with Trac 1.4

Refs #13591.

comment:15 Changed 5 years ago by Ryan J Ollos

If r17471 doesn't fix the issue for you, then it's probably a plugin conflict.

comment:16 Changed 5 years ago by Ryan J Ollos

In 17472:

TracTags 0.11dev: Adapt test cases to r17471

Refs #13591.

comment:17 Changed 5 years ago by Massimo

Still doesn't complete. I don't find that snippet anymore now.

I just see this definition with a list of our keywords:

var tags={"autocomplete_field":"field-keywords","help_href":null,"help_new_window":false,"keywords":["keywordA","keywordB"];

But searching for tags I don't see a line where this variable is used.

comment:18 Changed 5 years ago by Ryan J Ollos

Snippet has been removed. Instead, autocomplete_tags.js is added to the page.

Please disable all of your other plugins and retest.

comment:19 in reply to:  18 Changed 5 years ago by Ryan J Ollos

Replying to Ryan J Ollos:

Please disable all of your other plugins and retest.

First try just disabling AutocompleteUsersPlugin. That seems like a likely candidate.

Then you can proceed by disabling first the plugins that have a known effect on the ticket page. Primarily, those that add JavaScript to the ticket page.

comment:20 Changed 5 years ago by Ryan J Ollos

I think the issue is probably #9599. AutocompleteUsersPlugin adds autocomplete.js to the page. jQuery UI has an autocomplete function that TagsPlugin uses for autocomplete. AutocompleteUsersPlugin needs to use autocomplete from jQuery UI so that we don't need to add autocomplete.js to the page, which likely conflicts with autocomplete from jQuery UI.

So please try disabling AutocompleteUsersPlugin, and if that fixes the issue, I'll implemented #9599.

comment:21 in reply to:  20 Changed 5 years ago by Massimo

Replying to Ryan J Ollos:

So please try disabling AutocompleteUsersPlugin, and if that fixes the issue, I'll implemented #9599.

Yes, that fixed it, thanks. So I'll wait for #9599.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.