Dan-nl has uploaded a new change for review.
https://gerrit.wikimedia.org/r/107038
Change subject: image url not evaluated
......................................................................
image url not evaluated
david ran into an issue on commons where the extension was not able to properly
analyze a media-file url; there is no issue on the beta cluster.
the error message currently gives only the url to the media file. this patch
adds
any mw http request message that may be available in order to help further
troubleshoot the issue.
Change-Id: Iac8d72a25b88b9a62d7b95733391a3a6103d0807
---
M GWToolset.i18n.php
M includes/Handlers/UploadHandler.php
2 files changed, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset
refs/changes/38/107038/1
diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php
index 42722d2..ca7362d 100644
--- a/GWToolset.i18n.php
+++ b/GWToolset.i18n.php
@@ -203,7 +203,7 @@
'gwtoolset-global-tooltip' => 'These category entries will be applied
globally to all uploaded items.',
'gwtoolset-maps-to' => 'Maps to',
'gwtoolset-mapping-media-file-url-extension-bad' => 'The file extension
could not be determined from the file URL: $1.',
- 'gwtoolset-mapping-media-file-url-bad' => 'The media file URL could not
be evaluated. The URL delivers the content in a way that is not yet handled by
this extension. URL given was "$1".',
+ 'gwtoolset-mapping-media-file-url-bad' => 'The media file URL could not
be evaluated. The URL delivers the content in a way that is not yet handled by
this extension or there was an Http Request issue. URL given was "$1". Http
Request error "$2"',
'gwtoolset-mapping-no-title' => 'The metadata mapping contains no
title, which is needed in order to create the page.',
'gwtoolset-mapping-no-title-identifier' => 'The metadata mapping
contains no title identifier, which is used to create a unique page title. Make
sure you map a metadata field to the MediaWiki template parameter title
identifier.',
'gwtoolset-metadata-field' => 'Metadata field',
@@ -567,7 +567,8 @@
Parameters:
* $1 - the URL to the file or the file name given',
'gwtoolset-mapping-media-file-url-bad' => 'User error message when the
extension can not evaluate the media file URL. Parameters:
-* $1 is the URL provided.',
+* $1 is the URL provided.
+* $2 is the Http Request error message.',
'gwtoolset-mapping-no-title' => 'User error message when the metadata
mapping contains no title.',
'gwtoolset-mapping-no-title-identifier' => 'User error message when the
metadata mapping contains no title identifier.',
'gwtoolset-metadata-field' => 'Text for the table column heading, which
is at the top of the mapping metadata table in the HTML form.',
diff --git a/includes/Handlers/UploadHandler.php
b/includes/Handlers/UploadHandler.php
index 49b1e37..26d81af 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -264,7 +264,7 @@
if ( !$Status->ok ) {
throw new GWTException(
array(
- 'gwtoolset-mapping-media-file-url-bad'
=> array( $url )
+ 'gwtoolset-mapping-media-file-url-bad'
=> array( $url, $Status->getMessage() )
)
);
}
@@ -301,7 +301,7 @@
if ( empty( $options['url'] ) ) {
throw new GWTException(
- array( 'gwtoolset-mapping-media-file-url-bad'
=> array( $options['url'] ) )
+ array( 'gwtoolset-mapping-media-file-url-bad'
=> array( $options['url'], '' ) )
);
}
--
To view, visit https://gerrit.wikimedia.org/r/107038
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac8d72a25b88b9a62d7b95733391a3a6103d0807
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits