Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim Application Error messages not being displayed #194

Open
zanhecht opened this issue Feb 16, 2024 · 0 comments
Open

Slim Application Error messages not being displayed #194

zanhecht opened this issue Feb 16, 2024 · 0 comments

Comments

@zanhecht
Copy link

If I try to open Croptool directly from the URL on an uncroppable file (e.g. using https://croptool.toolforge.org/?site=commons.wikimedia.org&title=IMAGENAME.jpg) it just opens CropTool without any error being displayed. The browser console does contain:

angular.js:12701 
GET https://croptool.toolforge.org/api/file/info?page=&site=commons.wikimedia.org&title=IMAGENAME.jpg 500 (Internal Server Error)

Pasting IMAGENAME.jpg in and clicking "Open" will either produce the message File «IMAGENAME.jpg» not found on «commons.wikimedia.org». or File «IMAGENAME.jpg» found on «commons.wikimedia.org». However, if the error is something else, such as "This file is currently waiting for license review", it will just display the green found text without actually opening the editor or displaying any sort of error message. Again, the console with show a 500 (Internal Server Error), and opening the URL in the console displays a "Slim Application Error" page that does correctly display the error:

Slim Application Error
The application could not run because of the following error:

Details
Type: RuntimeException
Code: 0
Message: This file is currently waiting for license review. Please wait until the review has been completed before cropping the file, since cropped files cannot be auto-reviewed by the FlickreviewR bot.
File: /workspace/src/php/WikiPage.php
Line: 92

I assume this is due to a difference in how Slim handles error messages after @sohomdatta1 migrated the code from Slim 3 to Slim 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant