Topic on Project:Support desk

Uploads not working in 1.20.1 - Internal Error - Not Found in Stash

11
94.116.167.73 (talkcontribs)

I upgraded from 1.19.2 to 1.20.1 and am having an issue with uploads. A few scenarios:

1. I have a wanted file, and so I click on it which redirects me to the upload page. I can upload the file, and the file is clearly in the wiki. However, links to the file do not work.

2. I try to re-upload the file, and MediaWiki correctly tells me that the file exists. I choose to Ignore Warnings and get an Internal Error:

Internal error key '111qvbp6y0yk.1yyrqh.1.pdf' not found in stash Backtrace:

  1. 0 /home/site/includes/upload/UploadStash.php(159): UploadStash->getFile('111qvbp6y0yk.1y...')
  2. 1 /home/site/includes/upload/UploadFromStash.php(99): UploadStash->getMetadata('111qvbp6y0yk.1y...')
  3. 2 /home/site/includes/upload/UploadFromStash.php(122): UploadFromStash->initialize('111qvbp6y0yk.1y...', 'MFE_MT_Week_6_A...')
  4. 3 /home/site/includes/upload/UploadBase.php(166): UploadFromStash->initializeFromRequest(Object(WebRequest))
  5. 4 /home/site/includes/specials/SpecialUpload.php(86): UploadBase::createFromRequest(Object(WebRequest))
  6. 5 /home/site/includes/specials/SpecialUpload.php(159): SpecialUpload->loadRequest()
  7. 6 /home/site/includes/SpecialPage.php(611): SpecialUpload->execute(NULL)
  8. 7 /home/site/includes/SpecialPageFactory.php(494): SpecialPage->run(NULL)
  9. 8 /home/site/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
  10. 9 /home/site/includes/Wiki.php(536): MediaWiki->performRequest()
  11. 10 /home/site/includes/Wiki.php(446): MediaWiki->main()
  12. 11 /home/site/index.php(59): MediaWiki->run()
  13. 12 {main}

I couldn't find any reference to this - any help would be greatly appreciated.

94.116.167.73 (talkcontribs)

I have done the bad thing of reverting to 1.20.0 (despite security risk), and the issue does not appear in 1.20.0.

85.4.57.190 (talkcontribs)

I also upgraded from 1.19.2 to 1.20.1 and experience exactly the same behaviour.

Uploading a file works, but links to the newly uploaded file that were created before uploading the file are not rendered correctly. Example: A link of the form

[[Media:foo.pdf|foo file]]

is still rendered as

<a href="/path/to/my/wiki/index.php?title=Special:Upload&wpDestFile=Foo.pdf" class="new" title="Foo.pdf">foo file</a>

. Only if the page containing the link is edited and saved (even without making any changes), the link is rendered correctly as

<a href="/path/to/my/wiki/img_auth.php/8/8f/Foo.pdf" class="internal" title="Foo.pdf">foo file</a>

.

80.4.216.184 (talkcontribs)

That is a useful workaround that will let me go back to 1.20.1, although I think this is a bug.

85.4.57.190 (talkcontribs)

Well, this is not the only problem I found. Another one is that

[[File]]

links that were created before the upgrade are wrecked now. So it's maybe too early to got back to 1.20.1.

Krenair (talkcontribs)
77.73.244.218 (talkcontribs)

I upgraded to MediaWiki 1.20.2 and the issue with the incorrect Media rendering went away. Great!

However, File links are still not rendered correctly. Example: a previously (i.e., before the update to 1.20.1/1.20.2) created link like

[[File:IMG_3334.JPG|thumb]]

is now rendered as

[<a rel="nofollow" class="external autonumber" href="File:IMG_3334.JPG%7Cthumb">[2]</a>]

It seems like File is not recognised as all. The inner brackets are interpreted as a link to an external resource, and the contents are rendered accordingly.

Any hints are appreciated.

Krenair (talkcontribs)

Ok, but does it fix the upload problem?

77.73.244.218 (talkcontribs)

Yes, it does. (Sorry for the very late reply.)

77.73.244.218 (talkcontribs)

I found the problem (my bad). I had the following in my LocalSettings.php:

$wgUrlProtocols = array(
    'http://',
    'https://',
    'ftp://',
    'mailto:',
    'file:'
);

This didn't cause problem until a recent upgrade of the MediaWiki software (unfortunately, I cannot easily reconstruct which version it was). Fixing the last line (the file:// protocol) solved the problem:

<pre>
$wgUrlProtocols = array(
    'http://',
    'https://',
    'ftp://',
    'mailto:',
    'file://'
);

</pre>

Reply to "Uploads not working in 1.20.1 - Internal Error - Not Found in Stash"