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

Bookmarklet: 500 Internal Server Error #1009

Closed
jdaKoko opened this issue Oct 15, 2015 · 10 comments
Closed

Bookmarklet: 500 Internal Server Error #1009

jdaKoko opened this issue Oct 15, 2015 · 10 comments
Assignees

Comments

@jdaKoko
Copy link

jdaKoko commented Oct 15, 2015

@jcuanm I cannot use the bookmarklet function. It results in a 500 message.
Please let me know if you modifying the bookmarklet.
screen shot 2015-10-15 at 2 15 37 pm

@meeshmon
Copy link
Contributor

@horak @jcuanm can you guys investigate this?
probably happened after the last merge

@spacemansteve
Copy link
Contributor

The log file at /var/www/jda/app/logs/prod.log contains many entries about bookmarklet:

[2015-10-19 22:24:44] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /bookmarklet" (uncaught exception) at /var/www/jda/app/cache/prod/classes.php line 5219 [] []

This is in the function RouterListener.onKernelRequest. The exception is handled by:
catch (ResourceNotFoundException $e) {
$message = sprintf('No route found for "%s %s"', $request->getMethod(), $request->getPathInfo());

@spacemansteve
Copy link
Contributor

/var/www/jda/src/JDA/CoreBundle/Resources/config/routing.yml contains:
bookmarklet:
pattern: /{_locale}/bookmarklet/
defaults: { _controller: JDACoreBundle:Bookmarklet:index, _locale: ja }
requirements:
_locale: en|ja

@rchen152
Copy link

The bookmarklet displays properly in dev:
http://jdarchive.org/widget
gives 500 Internal Server Error but
http://dev.jdarchive.org/rebecca/web/widget
looks fine.

(The url needs to be changed manually, since the code currently leaves out the "[name]/web/" part when trying to open the bookmarklet in dev - this needs to be fixed.)

@rchen152
Copy link

Submitted a patch (#1012) that should fix this. As int turns out, the reason that the bookmarklet was displaying properly on my dev instance is that I hadn't yet pulled the latest code. Once I did that, I got the 500 Internal Server Error along with a helpful debug message that told me that there was an illegal byte order mark at the beginning of a file. (If at the command line, you type
less /var/www/[name]/src/JDA/CoreBundle/Resources/views/Widget/widget.html.twig
you'll see <U+FEFF> on the first line.) I removed it by opening the file with Emacs, changing the file encoding to utf-8 (see http://stackoverflow.com/questions/3859274/removing-byte-order-marks-boms-using-emacs), and deleting and re-inserting the first blank line in the file.

@horak
Copy link
Contributor

horak commented Oct 26, 2015

Cool, I just merged this and will push live soon.

@horak horak closed this as completed Oct 26, 2015
@meeshmon
Copy link
Contributor

still cannot use the bookmarklet. Getting the same 500 internal Server Error.

@rchen152
Copy link

I think the fix has been merged but not pushed to production, so the changes aren't live yet.

@meeshmon
Copy link
Contributor

Ok cool. Thanks Rebecca for the note.

@horak
Copy link
Contributor

horak commented Nov 1, 2015

Live now! Let me know if it persists

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

6 participants