Last modified: 2010-10-24 09:29:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27436, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25436 - Autocompletion does not work with MW ResourceLoader
Autocompletion does not work with MW ResourceLoader
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-06 09:35 UTC by Jeroen De Dauw
Modified: 2010-10-24 09:29 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jeroen De Dauw 2010-10-06 09:35:34 UTC
jQuery is not defined:
jQuery.event.add(window, "load", attachAutocompleteToAllDocumentFields); 

Firebug reports this error and the auto-completion doesn't work.

I'm getting this with SF trunk, on both MW trunk and MW 1.15.5.

The form where I'm getting this is a copy of http://mapping.referata.com/wiki/Special:FormEdit/Location/Narnia
Comment 1 Paul Oranje 2010-10-12 09:22:56 UTC
Autocomplete not working either here (http://www.heritage-activities.nl/mch-wiki/index.php?title=Albert_van_den_Belt&action=formedit, form=http://www.heritage-activities.nl/mch-wiki/index.php?title=Form:Expert-form).

Firebug console reports:
  jQuery is not defined
   jQuery.noConflict(); [several times)
and also:
  jQuery is not defined
   jQuery.event.add(window, "load", attachAutocompleteToAllDocumentFields);
and several others.

version info (http://www.heritage-activities.nl/mch-wiki/index.php?title=Special:Version):
  MediaWiki  	1.17alpha (r74614)
  PHP 	5.2.6 (cgi)
  MySQL 	5.0.51a-24-log
  Semantic Forms (Version 2.0.1)  	(r74614)
  Semantic MediaWiki (Version 1.5.3 alpha)  	(r74614)
Comment 2 Jeroen De Dauw 2010-10-12 12:40:11 UTC
(In reply to comment #1)

It turns out that it is working just fine, except for versions of MediaWiki using the new resource loader (which currently is only 1.17 alpha). In order to fix this, a bunch of non-minor changes to SF will be needed, which are planned, but can take a while. So if you want to use SF (and many other extensions that have similar issues with 1.17), I suggest you use MediaWiki 1.16.
Comment 3 Paul Oranje 2010-10-12 12:55:59 UTC
Seems a bit of a catch 22: with 1.16 edit-with-form did not work, but with 1.17 it does work well.
Since the edit with form functionality is more needed now, I'll stich around and wait for the autocompletion functionality to be restored.

Any hint on how long it may take to fix this bug?
Comment 4 Yaron Koren 2010-10-12 13:00:28 UTC
Changing name to be more accurate.

Paul - I don't know what the issue you're having is, but it seems unrelated - I would create a different bug report for it, if you want to use Bugzilla.
Comment 5 Yaron Koren 2010-10-22 17:03:27 UTC
As far as I know, Semantic Forms now works fully with ResourceLoader, in the code on SVN, and in what will be version 2.0.2. I'm marking this as "fixed" - if you find any problems with SF and MediaWiki 1.17, please let me know about it, either by contacting me separately, or by re-opening this bug, or by creating a more specific bug report.
Comment 6 Paul Oranje 2010-10-22 20:29:14 UTC
Sorry, autocompletion still does not work as well as with phase3 1.16 branch and the previous version of SF (r74684).

Switched phase3 (from branch REL1_16) to trunk and updated SF to r75211.

A field defined as:

"! Organisations (one per line):
| {{{field|organisations|input type=textarea|autogrow|autocomplete on category=Organisation|list|delimiter=\n|remote autocompletion}}}"

yields wrong output in the field after autocompletion by selection of an offered value; then shown output in the textarea is:

"Amoksi Architectuur\n "
(so not a newline is output but its character literal is shown).

Also with SF r75211 and phase3 of branch REL 1.16 produces the same erroneous output.

SF r74684 with phase3 branch REL1_16 yielded correct behaviour, in this case:

"Amoksi Architectuur
 "

BTW: When using a newline as delimiter the extra space character can be omitted since a newline is allready white space by itself.
Comment 7 Paul Oranje 2010-10-22 20:43:18 UTC
The revisions mentioned in the previous comment where of the extensions directory. More SF specific it should likely be r75174 for the previous revision where autocompletion worked with 1.16 but not with 1.17 and r75206 for the revision where autocompletion seems to work but produces erroneous output.

Goodluck.
Comment 8 Yaron Koren 2010-10-22 22:31:45 UTC
Indeed, autocompletion wasn't working with the "\n" delimiter in the new code. This is fixed now.
Comment 9 Yaron Koren 2010-10-22 22:33:40 UTC
Removing dependency on the general MW ResourceLoader tracker bug - whether or not SF works is (mostly) unrelated to whether ResourceLoader works.
Comment 10 Paul Oranje 2010-10-23 11:13:35 UTC
Still producing the same wrong output on autocompletion with r75215.
Looks like the code on line 60 and following in SemanticForms.js is never reached, anyway not when an item is selected from a list.
Comment 11 Yaron Koren 2010-10-24 06:55:03 UTC
Hi - I didn't realize before that you were using remote autocompletion. Indeed, it wasn't working with remote autocompletion; I think it's fixed now, though, in SVN. As always, feel free to re-open the bug report.
Comment 12 Paul Oranje 2010-10-24 09:29:32 UTC
Yaron, it works. Well done! (and quickly). S.y. Paul

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links