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

Storing the app URL in the session can cause hangs #35

Open
mbethke opened this issue May 5, 2015 · 0 comments
Open

Storing the app URL in the session can cause hangs #35

mbethke opened this issue May 5, 2015 · 0 comments

Comments

@mbethke
Copy link

mbethke commented May 5, 2015

I'm not sure what the rationale is for storing the application URL in the session cookie but if you change some things in the server setup it can cause problems. I just switched from a plackup development server on port 5000 to Apache and kept getting a CSS- and JS-less site that hung waiting for these resources to be loaded from the old URL. Clearing the cookie fixed this.

There are four different ways to reference these resources being used in the templates:

views/emails/new_comment.tt
10:     <link href="[% url %]/blog/css/bootstrap.min.css" rel="stylesheet">
views/emails/new_user.tt
10:     <link href="[% app_url %]/blog/css/bootstrap.min.css" rel="stylesheet">
views/layouts/admin.tt
19:      <link href="[% session.app_url %]/admin/css/bootstrap.min.css" rel="stylesheet">
views/components/datatables.tt
2:<script src="/css/DT_bootstrap.js"></script>

At least the last one will probably break on installations that don't live in the server root. Changing session.app_url to app_url in views/theme/styles.tt doesn't seem to cause any ill effects (haven't tested much though).

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