Last modified: 2014-03-13 16:19:52 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 T64007, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62007 - VisualEditor: Add media does not search local repo when MW is in root
VisualEditor: Add media does not search local repo when MW is in root
Status: RESOLVED INVALID
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Moriel Schottlender
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-27 17:34 UTC by Robert Labrie
Modified: 2014-03-13 16:19 UTC (History)
7 users (show)

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


Attachments
visual editor pcap (14.66 KB, application/octet-stream)
2014-02-27 17:35 UTC, Robert Labrie
Details
search pcap (21.89 KB, application/octet-stream)
2014-02-27 17:36 UTC, Robert Labrie
Details
My local settings file (5.35 KB, application/octet-stream)
2014-02-27 17:39 UTC, Robert Labrie
Details

Description Robert Labrie 2014-02-27 17:34:34 UTC
Intention:
Add media with visual editor

Steps to Reproduce:
LocalSettings.php and wiresharks are attached. The MW search does work. I can do a partial name search for an image in the File namespace and it works. The gallery in mediawiki does not.

Actual Results:  
No images

Expected Results:  
Images

Reproducible: Always
Comment 1 Robert Labrie 2014-02-27 17:35:56 UTC
Created attachment 14702 [details]
visual editor pcap

This shows the whole experience from clicking edit to clicking add media. You can see the call to API.php where it asks for repos, it gets nothing back.
Comment 2 Robert Labrie 2014-02-27 17:36:45 UTC
Created attachment 14703 [details]
search pcap

This is just proving that the search does work. Something is broken in the way VisualEditor calls the API, or in the results the API returns.
Comment 3 Robert Labrie 2014-02-27 17:39:08 UTC
Created attachment 14704 [details]
My local settings file
Comment 4 James Forrester 2014-02-27 22:27:55 UTC
Is this related to the issue we found (fixed?) in MediaWiki core recently about certain configurations of document root and the file search API?
Comment 5 Robert Labrie 2014-02-28 13:29:06 UTC
Hi James,

I'm not sure. What I do know is that VE never sends a search to the API. It does a filerepoinfo and that's the end of it. Whatever I type in the searchbox, nothing gets sent to the API.

If you give me a sample querystring I'll change the srsearch param to match something that should be found and test it.
Comment 6 James Forrester 2014-03-01 02:18:56 UTC
Moriel – was this what Gerrit change #112491 fixed?
Comment 7 Moriel Schottlender 2014-03-10 22:54:59 UTC
(In reply to James Forrester from comment #6)
> Moriel – was this what Gerrit change #112491 fixed?

That change fixed another related bug, but apparently there are other remaining issues after that fix that I'm trying to understand. 

I think it has to do with the fact the wiki is installed in the root directory. The media search seems to skip looking for files in the local repository.
Comment 8 Krinkle 2014-03-11 18:13:32 UTC
If you access the MediaWiki core api.php entry point directly in your browser, what do you get back?

It should look like this: https://www.mediawiki.org/w/api.php

If it doesn't then there is nothing VisualEditor can do as it means your server is not configured correctly to expose MediaWiki's entry points (perhaps you only whitelisted index.php?).

This likely means other features are broken as well (the autocompleting of page names in the search box, the "Watch this page" button etc.).

Serving the MediaWiki application directory from your document root is highly discouraged.  If you don't like exposing a /wiki/ path in URLs you can keep the application in /w/ but let Apache rewrite your urls from /Page_name to /w/index.php. That way you have both nice urls in the root, but still keep your application's internal files tucked away safely in /w. See https://www.mediawiki.org/wiki/Manual:Short_URL and related pages.
Comment 9 James Forrester 2014-03-13 16:19:52 UTC
This appears to be a core MW issue with unsupported hosting paths. Closing as INVALID.

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


Navigation
Links