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

Strange paging behavior in production environment... #288

Open
statespindle opened this issue Apr 1, 2016 · 5 comments
Open

Strange paging behavior in production environment... #288

statespindle opened this issue Apr 1, 2016 · 5 comments

Comments

@statespindle
Copy link

Hello.

Have a project that has multiple routing constraints in the routing file setup by subdomain. When wice_gird is rendered, on the development machine the paging links in the paginator are correct and go to the correct links. However, moving the project to a production environment (different config), the paging links are appending multiple constraints subdomains into the links themselves.

For instance (development), the paging link that is generated for the arrows/pages, etc. may look like this (this works):
https://admin.localhost.dev:3000/books?grid%5Bpage%5D=4

But in the production environment (this doesn't work for paging) -- (notice the 'api' subdomain addition):
https://admin.api.productionpath.com/books?grid%5Bpage%5D=4

I'm not sure if this is due to the environment config files in production environment. These are the settings I'm using:
config.cache_classes = true (false in development)
config.eager_load = true (false in development)
config.consider_all_requests_local = false (true in development)
config.action_controller.perform_aching = true (false in development)
config.assets.compile = false (not in development config)
config.assets.digest = true (true in development)
config.force_ssl = true (not in development config)

These are the only things (other than database connections) that are different between the two environments.

The routing file looks like this:
constraints subdomain: 'admin' do
# Bunch of defined routes ... NOT using resources keyword in either contraint, all paths are defined like below:
get 'path/path', to: 'path to controller/action', as: :name_of_path
end

constraints subdomain: 'marketing' do
# Same as above different names, etc.
end

constraints subdomain: 'api' do
# Same as above but diffrent controllers, etc.
end

Anyone have any reason why pathing for paging works in development, but acts strange in production?

@leikind
Copy link
Owner

leikind commented Apr 1, 2016

you probably have some JS magic on your page messing with the DOM, right?

@statespindle
Copy link
Author

I do have some Javascript, but why would this make a difference from a development to production environment?

@statespindle
Copy link
Author

So, I've tried changing the config settings to match as closely to Development as possible with the same result. The production environment is using Heroku. Is there anything you might think of that could be an issue using Heroku?

@statespindle
Copy link
Author

I updated the routing issue in the question.. I updated the production route to show whats happen, I had inadvertently omitted the "2nd" subdomain... so perhaps that will clarify it more... Sorry...

@leikind
Copy link
Owner

leikind commented Apr 2, 2016

I still can't see what difference between prod and development can result in such effect :-(

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

2 participants