Closed barnett closed 10 years ago
What version is that? Not seeing anything cms related in the stack trace.
1.11.2
Definitely not something with CMS as there are tons of them in production. 1.11.0 sample app is on Heroku. I can try bumping it and redeploying just to check, but I'm sure it should be fine. There are tons of hits on google about Circular+dependency+detected+while+autoloading+constant Let me know what you find.
So here it mentions to have controllers for the backend inherit from Admin::Cms::BaseController
. This worked well in development, yet I believe thus seems to be the error source in production.
I'm not sure what is happening, but is it possible that cms gem is not loaded for some reason during that? That's the only reason why Admin::Cms::BaseController
not going to be accessible.
I used to have the controllers local so that made sense so ended up deleting them so they use the gem but still errors. Ended up being able to access any scaffold model I did for the backend but cannot access the Pages/Layouts/Files/Sites pages. Here is the repo for the project. Any ideas?
You gotta give me access to the repo if you want me to check it out
@GBH its open now, thank you.
I can't see anything that sticks out. Locally your app loads and tests run.
I thought maybe there's something particular about Heroku environment. So I updated demo app and generated a scaffold to try it out. It got deployed and runs fine. Take a look: https://github.com/comfy/comfy-demo maybe it will give you a clue. I have no idea at the moment.
@GBH this is my routes/controller another warning I am seeing when I launch console in development. I feel like my routing is causing the problems?
I left a comment: https://gist.github.com/blklane/25d2e7f88527145c2533#comment-1209943 Does it help?
@GBH left another comment. I updated from the master but than got an error of an initialized constant to do with ComfyBlog. Then I set ComfyBlog to pull from master and still had the same error.
Ah yeah, blog is definitely going to be out of sync with cms at the moment. I'll have to update it as well.
So with keeping CMS at 1.11.2
and Blog at 1.1.1
(according to my Gemfile.lock
) how am I able to fix this in the short term? I saw your link to that pull request, just unsure what exactly I should be doing since I only have some of the views over written, no controllers. And then what do I do with my controllers re-using the backend/authentication?
I think it's worth updating Blog to use same namespace as the master branch of CMS. I'll try to do this over the weekend. It's actually not a very complicated thing to do.
@GBH is there anyway I can fix it fix short-term quickly, just to launch over the weekend? Working on a non-profits site and they really wanted to start loading content today.
Super-short term: remove blog component for the time being.
Removing the blog gem/routes/initializer also stopped the issue this ticket is originally for! Thank you so much @GBH
@blklane about the blog component. Give 1.12 branch a try. It should theoretically work with current master branch CMS.
@GBH, set my gem for that branch, and now receiving an error uninitialized constant Comfy::Admin::Cms
and have the following routes:
Cwi::Application.routes.draw do
mount RailsEmailPreview::Engine, at: 'admin/emails'
comfy_route :blog_admin, :path => '/admin'
comfy_route :blog, :path => '/blog'
namespace :admin do
# ....
resources :maps, :endorsements, :users, :stories, :campaigns, :projects, :employee_profiles
end
devise_for :users
comfy_route :cms_admin, :path => '/admin'
root :to => "cms/content#show"
# Make sure this routeset is defined last
comfy_route :cms, :path => '/', :sitemap => false
end
Any idea why that's coming up?
I just developed a project locally and am pushing to Heroku when I received this error after pushing/migrating. The error has the follow trace, any ideas?