Page MenuHomePhabricator

next button does nothing
Closed, ResolvedPublic

Description

Author: j.nailor

Description:
I've seen that several people have this same problem; but no one seems to have gotten an answer. whenever i try to upload an image to my wiki the "next" button on the "describe" page does nothing. it just turns grey and the page does not load or anything. I am currently on firefox 12.0, however i have tried multiple browsers, i've tried updating my media wiki installation to 1.20.1. i am using uploadwizard 1.3


Version: unspecified
Severity: major
OS: Windows XP
Platform: PC

Details

Reference
bz42640

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:12 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz42640.

First of all I'd recommend to upgrade to a supported browser (Firefox 12 saw its end of life by Mozilla a few months ago).

This sounds like bug 37073 to me.

  • This bug has been marked as a duplicate of bug 37073 ***

j.nailor wrote:

Okay, I've tested it on Firefox 17, also on IE8 (unable to upgrade IE further).
This does not seem to be a duplicate of bug 37073, as when I'm trying to upload, I"m not removing or adding files, I'm only uploading the one, also the next button is rendering, however it seems to not actually do anything. However I have tried applying the fix listed in but 37073, and it did not resolve the issue. Thank you again.

(In reply to comment #2)

Okay, I've tested it on Firefox 17, also on IE8 (unable to upgrade IE further).
This does not seem to be a duplicate of bug 37073, as when I'm trying to
upload, I"m not removing or adding files, I'm only uploading the one, also the
next button is rendering, however it seems to not actually do anything. However
I have tried applying the fix listed in but 37073, and it did not resolve the
issue. Thank you again.

So if this is a different issue and if "the next button is rendering, however it seems to not actually do anything" there's no reason to close this as INVALID. :)
Reopening.

j.nailor wrote:

sorry, didn't mean to close it, still new to bugzilla.

Does anything appear in your browser's JavaScript console when you press next?

j.nailor wrote:

no it does not appear so, interesting development though i just tried to install extension:WikiEditor which uses javascript to provide a WYSIWIG editing page and the publish button in that does the same thing. the button seems to do nothing. changes color but does not load anything. now i do notice a bunch of notifications in the firefox error console that state "unknown property 'box-sizing'. Declaration dropped." in there. don't know if that's related though.

j.nailor wrote:

firefox java error console

Attached:

j.nailor wrote:

attached error console output.

(In reply to comment #7)

firefox java error console

I guess you meant JavaScript error console as we don't use Java. :)
For future reference, please attach text as plain text (txt). Thanks!

j.nailor: Could you please clean the content in your JS console, then press "Next", and then paste the output in the JS console here as plaintext? Thanks!

j.nailor wrote:

[16:36:22.634] Error in parsing value for 'margin-left'. Declaration dropped. @ http://10.25.21.82/mediawiki/index.php/Special:UploadWizard
[16:36:22.634] Error in parsing value for 'margin-top'. Declaration dropped. @ http://10.25.21.82/mediawiki/index.php/Special:UploadWizard

this is all that comes up, there doesn't seem to be anything else that comes up when i click on the button.

The last two entries in the log you posted are

[13:25:54.590] mw.DestinationChecker::checkUnique> error in checkUnique result: http @ http://10.25.21.82/mediawiki/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20121203T182355Z&*:15
[13:25:54.613] mw.Api error: @ http://10.25.21.82/mediawiki/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20121203T182355Z&*:15

Both indicate problems making an API call to your server.

Can you please run the upload wizard with the debug=true option?

Just go to http://10.25.21.82/mediawiki/index.php/Special:UploadWizard?debug=true
and then got through the upload wizard.

Also, what's the output of

http://10.25.21.82/mediawiki/api.php?action=query&titles=File:<YOURFILENAME>.<YOUREXTENSION>&prop=imageinfo&iiprop=url|mime|size&iiurlwidth=150&format=jsonfm

where you replace <YOURFILENAME> by the filename as shown in the "Title" field, and replace <YOUREXTENION> by "jpg" or "jpeg" or "png", or whatever, as appropriate for your file? What is the name of the file anyway? Does the problem always occur or only with a particular file name?

Do you have the API enabled on your wiki? Is the write API enabled? Are uploads enabled at all?

Also, there's bug 32408: errors in collapsed parts of the form are not shown. Click on "Add categories and more information..." to make sure all input fields are shown. Do any of them have a red border, or is there anything else red?

If you have Firebug installed, I'd also like to see the result of the queries the UploadWizard does. Go to the UploadWizard on your wiki, then enable Firebug. Select the "Net" tab in Firebug. Then go through the UploadWizard. After you hit the problem, you should examine the last few http requests shown in Firebug: I'm interested in the last few http requests to URLs beginning with "http://10.25.21.82/mediawiki/api.php?" (POST or GET api.php). Click on the triangle to the left of the request: Firebug shows you several tabs for the request. I need the URL and the contents of the Request or Post tabs, and of the Response tab.

A screenshot would also help. If the page is too long to capture in one screenshot, see if you can print the page to a PDF, then attach that to this bug report.

I know that's quite a handful, but since I can't reproduce this problem on my end, I depend on you to do things if we're to find the cause of this problem.

Furthermore, I'd like to know your UploadWizard configuration. What do you have in LoacalDefaults.php for $wgUploadWizardConfig?

j.nailor wrote:

issue

Attached:

uploadwizard_issue.jpg (705×1 px, 54 KB)

j.nailor wrote:

So i ran alot of stuff. I also attached a screenshot, i understand this is hard to troubleshoot as you're not able to reproduce the issue.

this is from "debug=true":
[07:36:26.237] Error in parsing value for 'margin-left'. Declaration dropped. @ http://10.25.21.82/mediawiki/index.php/Special:UploadWizard?debug=true
[07:36:26.237] Error in parsing value for 'margin-top'. Declaration dropped. @ http://10.25.21.82/mediawiki/index.php/Special:UploadWizard?debug=true

This is what i have listed in my localsettings.php:

require_once( "$IP/extensions/UploadWizard/UploadWizard.php" );
$wgApiFrameOptions = 'SAMEORIGIN';
$wgUseInstantCommons = true;
$wgEnableAPI = true;
$wgEnableWriteAPI = true;
$wgExtensionFunctions[] = function() {

$GLOBALS['wgUploadNavigationUrl'] = SpecialPage::getTitleFor( 'UploadWizard' )->getLocalURL();
return true;

};
$wgUploadWizardConfig = array(

  'debug' => false,
 'autoCategory' => 'Uploaded with UploadWizard',
 'feedbackPage' => 'FeedbackTest2',
'altUploadForm' => 'Special:Upload',
 'fallbackToAltUploadForm' => false,
 'enableFormData' => true,  # Should FileAPI uploads be used on supported browsers?
 'enableMultiFileSelect' => true,
 'skipTutorial' => true

);

this is what i get from running <file name>.<your extension>:

Fatal error: Class 'ApiQueryORM' not found in C:\Program Files\EasyPHP-12.1\www\mediawiki\extensions\UploadWizard\api\ApiQueryUploadCampaigns.php on line 16

i'm using mediawiki 1.20.1 so api write is enabled by default, and i have it included in my localsettings.php to enable it.

no errors appear in the colapsed fields. i tried checking those too.

this is what firebug spit out, though i don't know if it's what you need:

<br />
<b>Fatal error</b>: Class 'ApiQueryORM' not found in <b>C:\Program Files\EasyPHP-12.1\www\mediawiki\extensions\UploadWizard\api\ApiQueryUploadCampaigns.php</b> on line <b>16</b><br />

mw.DestinationChecker::checkUnique> error in checkUnique result: http

load.p...3302Z&* (line 15)

mw.Api error:

There's your problem. MW 1.20.1 doesn't have APIQueryORM, but the UploadWizard you got most probably comes from master and expects it.

You can fix that easily for your install by addding https://gerrit.wikimedia.org/r/#/c/10378/ to your installation: that adds the missing class APIQueryORM and adds it to the autoloader.

You don't need to use GIT for that:

That should do it.

@Jeroen: the only way users can get the UploadWizard extension from www.mediawiki.org is by downloading from GIT master. The extension distributor doesn't work at all for UW. So how are people supposed to get an UploadWizard extension that works with their MW install? It'll only work if they run based on core master...

I suppose most users would not know how to download the right snapshot from git.

(In reply to comment #16)

  • download the missing file from

https://gerrit.wikimedia.org/r/cat/10378%2C7%2Cincludes/api/ApiQueryORM.php%5E0
(zipped), unzip it and put it into C:\Program
Files\EasyPHP-12.1\www\mediawiki\includes\api

Rename the file to ApiQueryORM.php before putting it there.

j.nailor wrote:

So i did exactly as you guys stated. however i did not have an Autoloader.php file in /includes/.

it still seems to be doing the exact same thing though.

<br />
<b>Fatal error</b>: Class 'ApiQueryORM' not found in <b>C:\Program Files\EasyPHP-12.1\www\mediawiki\extensions\UploadWizard\api\ApiQueryUploadCampaigns.php</b> on line <b>16</b><br />

mw.DestinationChecker::checkUnique> error in checkUnique result: http

load.p...3302Z&* (line 15)

mw.Api error:

Re

however i did not have an Autoloader.php file in /includes/.

Sorry, I find this hard to believe. If there really is no AutoLoader.php in the "includes" directory (which is a sibling of the "extensions" directory), then your installation is really screwed up. I don't think anything would work then.

What's the value of $IP in LocalSettings.php? What's the full path of that file LocalSettings.php?

j.nailor wrote:

Okay, so i figured out why things seemed so odd.
i was placing these files in \www\mediawiki\extensions\uploadwizard\includes\api. rather than \www\mediawiki\includes\api. that would by why things seem so off. so i put in the APIqueryORM file in, and added that line to autoloader.php. so the uploadwizard now works, the only problem is that it has the same issue that the next button does not work. However it does work if you click on the next button several times, i don't know if it needs to load something first or what's happening on it, but it's kind of odd that it's working and not at the same time.

(In reply to comment #21)

i was placing these files in
\www\mediawiki\extensions\uploadwizard\includes\api. rather than
\www\mediawiki\includes\api.

I suspected so. (Not right away, though. Occurred to me only a few hours later.)

so the uploadwizard now works

Good. We're one step further.

the only problem is that it has the same issue that the next button does not
work. However it does work if you click on the next button several times, i
don't know if it needs to load something first or what's happening on it, but
it's kind of odd that it's working and not at the same time.

Yeah, that's still weird. Same questions as before: anything in the error console of Firefox? If not: anything in the server logs (only entries around the time you tried to upload, please)? If you monitor the requests in Firebug's "Net" tab, anything special? Any query that seems to take very long, or that returns something else than "200 OK"? If so, what's the query URL, and what does it return? (Firebug can show you.)

j.nailor wrote:

Okay,
So it doesn't seem to be dependent upon the number of times the button is clicked. it seems to be waiting for something to load.

firefox error console just keeps giving me this:

"error in parsing value 'margin-left'. Declaration dropped.

http://10.25.21.82/mediawiki/index.php/Special:UploadWizard"

In bugzilla this is the GET that it seems to be waiting for, and it takes roughly 20seconds to complete:

http://10.25.21.82/mediawiki/api.php?action=query&format=json&titles=File%3AAvthte%2Ejpg&prop=imageinfo&iiprop=url%7Cmime%7Csize&iiurlwidth=150

firebug lists this as taking 21.44s (NOT ms), and shows in the response:

{"query":{"pages":{"-1":{"ns":6,"title":"File:Avthte.jpg","missing":"","imagerepository":""}}}}

j.nailor wrote:

btw, thank you guys for everything! you've been very helpful!

(In reply to comment #24)

btw, thank you guys for everything! you've been very helpful!

You're welcome. I'm sorry you had such trouble; the UploadWizard really should work out-of-the box with the latest stable MediaWiki release (1.20 at the time of this writing). That it doesn't is a shame and a bug.

Now why that query takes so long I don't know. It seems to be something with your setup; I'm afraid I can't help you further with this. If I execute this query either on my own private test install or at the commons, I get a response rather quickly.

j.nailor wrote:

okay, well thank you anyways, i'll try and do some googling, to see why it might be taking so long any advice on what that query would be called so i can read up on it? and or what to google?

No, not really. Maybe a slow connection to the Commons? Try disabling InstantCommons.

I'm closing this bug as "fixed" since the basic problem reported here is solved.

There's a follow-up bug 42729 for the incompatibility of UploadWizard with MW 1.20.

@j.nailor: if you can track down the slowness of that query to something in MediaWiki as opposed to something in your server or network setup, feel free to open a new bug for the "slow query" issue.

j.nailor wrote:

So i was finally able to resolve the slowness issue.
It seemed to be related to instant commons.

all i had to do was set $wgUseInstantCommons = false;

this sped up my uploads exponentially.
Thank you again everyone!

Gilles triaged this task as Unbreak Now! priority.Dec 4 2014, 10:10 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Needs Triage.Dec 4 2014, 11:23 AM