melvinsembrano / cms-fortress Goto Github PK
View Code? Open in Web Editor NEWComfortable Mexican Sofa (CMS) - Users and Role Management extension
License: MIT License
Comfortable Mexican Sofa (CMS) - Users and Role Management extension
License: MIT License
Asset pipeline is loading assets from old path. This is causing 404's for asset requests.
Hi, Really love cms-fortress, thanks for all the hard work.
I was wondering if there was any way to hide the 'Sites' dropdown from the login screen. It is potentially sensitive which clients are using this system to have it displayed publicly.
Thanks,
Hi,
when upgrading comfy to > 1.12.4 I get an routing error for comfy css and js in cms-fortress admin. I am aware that @GBH changed the integration in 1.12.5 (https://github.com/comfy/comfortable-mexican-sofa/releases/tag/v1.12.5). Funny fact - in production it works. Locally I get:
ActionController::RoutingError - Page Not Found at:
"javascripts/comfortable_mexican_sofa/application":
comfortable_mexican_sofa (1.12.7) app/controllers/comfy/cms/content_controller.rb:64:in `rescue in
page_not_found'
comfortable_mexican_sofa (1.12.7) app/controllers/comfy/cms/content_controller.rb:58:in
`page_not_found'
I have some custom js and css in app/assets/javascripts and app/assets/stylesheets/. I changed the paths there to: /app/assets/javascripts/comfy/admin/cms/ e.g. But still javascripts/comfortable_mexican_sofa/application is included in the markup . I am not sure why this is and where to fix this.
Any help is highly appreciated as I want to upgrade to 1.12.7 and use redactor as the editor ;-)
Do we have LDAP feature?
Hi,
I am commenting config.theme = :wide
in config/initializers/cms_fortress.rb
but I still see the wide layout. Am I overseeing sth.?
Cheers
Andy
hpx@hpx-TM4750:/media/447A35833DDCC091/work/cms-fortress$ rails generate cms:fortress
generate devise:install
conflict config/initializers/devise.rb
Overwrite /media/447A35833DDCC091/work/cms-fortress/config/initializers/devise.rb? (enter "h" for help) [Ynaqdh] y
force config/initializers/devise.rb
Some setup you must do manually if you haven't yet:
Ensure you have defined default url options in your environments files. Here
is an example of default_url_options appropriate for a development environment
in config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost:3000' }
In production, :host should be set to the actual host of your application.
Ensure you have defined root_url to something in your config/routes.rb.
For example:
root to: "home#index"
Ensure you have flash messages in app/views/layouts/application.html.erb.
For example:
<%= notice %>
<%= alert %>
If you are deploying on Heroku with Rails 3.2 only, you may want to set:
config.assets.initialize_on_precompile = false
On config/application.rb forcing your application to not access the DB
or load models when precompiling your assets.
You can copy Devise views (for customization) to your app by running:
rails g devise:views
Found existing cms_create.rb migration. Remove it if you want to regenerate.
identical config/initializers/comfortable_mexican_sofa.rb
route comfy_route :cms_admin, :path => '/cms-admin'
comfy_route :cms, :path => '/', :sitemap => false
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in binread': No such file or directory - /media/447A35833DDCC091/work/cms-fortress/config/routes.rb (Errno::ENOENT) from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in
replace!'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:59:in invoke!' from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions.rb:94:in
action'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:in insert_into_file' from /var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/generators/actions.rb:224:in
block in route'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions.rb:194:in block in in_root' from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions.rb:184:in
block in inside'
I have a scenario where multiple users can approve specific page.
I can see currently it only considers the workflow per page and once it's approved its waiting for Publish / Schedule.
When a page is rendered with inserted images form the file archive, the alt attribute is missing. Not sure if this should be fixed in Comfy but I guess so.
One can create many websites and then choose one to work with. It would be helpful when it is shown in the navbar, which website is actually choosen.
it would be extremely helpful if one can upload a photo directly inside the editors image popup
Suppose I already have a user/account/member/customer model how do I tell the generator to use that model rather than create cms_fortress_users. Suppose that model has already been Devise-ified?
I'd like to use the workflow changes and editor changes introduced in this extension, but leave out the cms_fortress_users table and all the Devise stuff.
Is it possible to split it into a gem that adds Devise to a parameterised model and another gem that does cool things to the Comfy workflow and adds stuff to the content editor? That way I can leave out one gem and use the other.
These possibilities need to be taken into account otherwise the extension can't be used. E.g. I want to use it in a real site that has it's own member list, it has it's own roles structure. Which incidentally is many to many with members. You've got role_id in cms_fortress_users which is a v.bad design.
In https://github.com/melvinsembrano/cms-fortress/blob/master/app/assets/javascripts/cms/fortress/media.js.coffee#L13 the path to the uploaded files is set. Unfortunatley in our stage environment under https not working at all. The problem is the path:
window.media.othersPath: "http://stage/cms-admin/sites/1/files/others.json"
This should be:
othersPath: "/cms-admin/sites/1/files/others.json"
like it is for videos and images:
imagesPath: "/cms-admin/sites/1/files/images"
videosPath: "/cms-admin/sites/1/files/videos"
I guess this is a quick fix. I did not find the place where the path is created. Would appreciate your help.
Thanks
Hi there! (awesome gem by the way) I just had a couple of minor issues when using the wide-theme: The WYSIWYG editor buttons only appear, when I change the theme in the initializer to :default
(explicitly - commenting config.theme = :wide
wasn't enough)... Same goes for the ability to switch Layouts when editing / creating pages, which only works using the default-theme (i.e. layouts can be changed in the Layout-Dropdown using the wide-theme - but the corresponding form fields don't update accordingly - seems to be a javascript issue).
In case it helps / matters: I installed cms-fortress v1.3.9 on a rails 4.2.1 / ruby 2.1.5 project with an existing Comfortable Mexican Sofa (v1.12.8) installation (using rails generate cms:fortress --no-comfy
)
All edit pages should have a back button
Trying to import fixtures results in an error:
I, [2014-09-14T08:49:11.192291 #2] INFO -- : [FIXTURES] Imported Layout layout_name
rake aborted!
NoMethodError: undefined method `page_workflow' for #<Comfy::Cms::Page:0x000000056b7948>
/app/vendor/bundle/ruby/1.9.1/gems/activemodel-4.1.5/lib/active_model/attribute_methods.rb:435:in `method_missing'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-4.1.5/lib/active_record/attribute_methods.rb:208:in `method_missing'
/app/vendor/bundle/ruby/1.9.1/gems/cms-fortress-1.3.0/lib/comfortable_mexican_sofa/fixture/page.rb:29:in `block in import!'
/app/vendor/bundle/ruby/1.9.1/gems/cms-fortress-1.3.0/lib/comfortable_mexican_sofa/fixture/page.rb:7:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/cms-fortress-1.3.0/lib/comfortable_mexican_sofa/fixture/page.rb:7:in `import!'
/app/vendor/bundle/ruby/1.9.1/gems/comfortable_mexican_sofa-1.12.2/lib/comfortable_mexican_sofa/fixture.rb:46:in `import!'
/app/vendor/bundle/ruby/1.9.1/gems/comfortable_mexican_sofa-1.12.2/lib/tasks/comfortable_mexican_sofa.rake:16:in `block (3 levels) in <top (required)>'
Tasks: TOP => comfortable_mexican_sofa:fixtures:import
The export also gives me workflow-related errors. I've tried exporting and importing with page workflow enabled and disabled. Simply commenting out the page workflow related bits from page.rb does fix the issue.
Then there's a read_from_haml call that I cannot find any reference to. I've tried the CMS sources, Fortress sources and even Google.
For now, as a workaround, I've been using page.rb from Comfy. It does make loading fixtures to Heroku difficult though (because I'd have to make sure Heroku uses my modified gem..).
If you need any extra information, let me know.
Rails 4.1.5, Comfy 1.12.2 and Fortress 1.3.0. I also have the blog enabled.
I am not sure if I miss sth. but it should be possible to configure TinyMCE. I tried to ad a config/tinymce.yml
as written in the docu (https://github.com/spohlenz/tinymce-rails/blob/master/README.md) but it does not work. It only works when I putt all the settings into the js configuration file in the gem
Bundler could not find compatible versions for gem "comfortable_mexican_sofa":
In Gemfile:
cms-fortress (>= 0) ruby depends on
comfortable_mexican_sofa (= 1.8.1) ruby
comfortable_mexican_sofa (1.10.3)
in https://github.com/melvinsembrano/cms-fortress/blob/master/app/models/cms/fortress/role.rb#L15 is a hardcoded path. I am not sure why. When defining file
in L11 - L13 the result is:
[50] kenny(Cms::Fortress::Role) » File.join(Rails.root, "config", "roles.yml")
=> "/Users/andwen/project/sumcumo/kenny/config/roles.yml"
When using the other definition in L15, the result is
[51] kenny(Cms::Fortress::Role) »
File.expand_path(File.join(File.dirname(__FILE__), "../../../../", "config", "roles.yml"))
=> "/Users/config/roles.yml"
what is completely wrong. So imho it would be better to throw an exception, that the role.yml file is missing and leave off the rest of the method:
def load_defaults
# load user custom roles
if File.exist?(file = File.join(Rails.root, "config", "roles.yml"))
load_from_file(file)
else
raise Error::MissingRoleConfigurationFile
end
end
and then create a new folder app/models/error
with the file missing_role_configuration_file.rb
with content:
module Error
# log error to the Rails log
def self.log_error(name, message)
Rails.logger.fatal("[ERROR:] in #{name} with message: #{message}\n\n")
end
class MissingRoleConfigurationFile < StandardError
def initialize
Error.log_error(self, "missing the roles.yml file in config/roles.yml")
end
end
end
What do you think? When discussed I can send a PR.
Cheers
Andy
comfy_route :cms_admin, :path => '/cms-admin'
comfy_route :cms, :path => '/', :sitemap => false
comfy_route :cms_admin, :path => '/admin'
comfy_route :cms, :path => '/', :sitemap => false
It's possible that I'm just blind but, when using ComfyBlog there's no link to the blogs in the menu, but browsing to /admin/sites/:id/blogs work just fine and managing blogs from there does as well -- would be neat if this was in the menu
Hi,
in the wide layout, I can only jump back to the last revision. In comfortable-mexican-sofa, I remember that that it was possible to choose from all existing revisions and activate one. Is this a missing feature in the wide layout? Will you add this or do you want me to send a PR? If yes some info about the needed steps would be helpful.
Thanks and Cheers
Andy
Create ability model generator.
Hi, I'm new to fortress but it seems exactly like what I need. I'm currently trying to have two sections of contents for one page that I can then reference in different places in my layout. Is there an obvious way that I'm missing for doing this or is this something that I'd have to custom make, potentially send a PR?
The key fact missing from the instructions is that you can't add this gem into an already existing Comfortable Mexican Sofa installation.
If you try then
rails g cms:fortress
will try to install Comfy again and fuck up routes.rb so when you run
rake db:migrate
you'll get
rake aborted!
ArgumentError: Invalid route name, already in use: 'comfy_cms_render_css'
You may have defined two routes with the same name using the `:as` option, or you
may be overriding a route already defined by a resource with the same naming. For
the latter, you can restrict the routes created with `resources` as explained here:
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created
Looking at routes.rb I see
Rails.application.routes.draw do
cms_fortress_routes :path => '/cms-admin'
comfy_route :cms_admin, :path => '/cms-admin'
# Make sure this routeset is defined last
comfy_route :cms, :path => '/', :sitemap => false
comfy_route :cms_admin, :path => '/admin'
# Make sure this routeset is defined last
comfy_route :cms, :path => '/', :sitemap => false
WTF! It's added an extra
comfy_route :cms, :path => '/', :sitemap => false"
and messed with
comfy_route :cms_admin, :path => '/cms-admin'
without cleaning up
comfy_route :cms_admin, :path => '/admin'
Key idea: An extension extends the thing it's built on, it shouldn't mess with the basic thing itself.
As far as I can see if this extension were plugged into an existing Comfy installation you'd be totally stuffed. Luckily I'm only trying Comfy out so I can throw it away and start a new app.
I've added some scaffolding to my app with:
rails g comfy:scaffold Location name:string distance:integer
but flash messages are not shown by creating or updating records!!
Site should have the ability to have own set of roles and users.
"rails generate cms:fortress" using latest Sofa.
cms-fortress-1.1.2/lib/cms/fortress/rails/engine.rb:10:in `block (2 levels) in class:Engine': uninitialized constant Cms::ContentController (NameError)
this is the view of the edit page: http://screencast.com/t/sPvxnsi7
I am not sure how the "published at" field works. Can you explain please?
when changing the status to publish, there is no way back to create a draft again. Moritz said, that there are some missing rights, which have to be setup per default.
Moritz will fix this
The migration devise_create_cms_fortress_users.cms_fortress_engine.rb
fails under Rails 4.2.1 using SQLite, with the following error:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: cms_fortress_users.site_id: SELECT 1 AS one FROM "cms_fortress_users" WHERE ("cms_fortress_users"."email" = '[email protected]' AND "cms_fortress_users"."site_id" IS NULL) LIMIT 1
[path to migration file]_devise_create_cms_fortress_users.cms_fortress_engine.rb:8:in `migrate'
SQLite3::SQLException: no such column: cms_fortress_users.site_id
[path to migration file]_devise_create_cms_fortress_users.cms_fortress_engine.rb:8:in `migrate'
It appears that the migration
method is running before the change
. The work around is to comment out the Cms::Fortress::User.create!
code, run the migration and then execute the offending code in the console.
Hope that's useful. Great gem btw (from experience using this in the past). Looking forward to seeing what's new.
Is there a way to include the administration of other comfy plugins, like ComfyBlog? I installed the gem, but as cms-fortress is installed I can not access the "normal" CMS admin interface (which makes sense!)
If you try and bundle install version 1.3.0 or 1.2.X you get:
Bundler could not find compatible versions for gem "tinymce-rails":
In Gemfile:
cms-fortress (> 1.3.0) ruby depends on> 4.0.0) ruby
tinymce-rails (
comfortable_mexican_sofa (>= 0) ruby depends on
tinymce-rails (4.1.2)
I would be great to have the possibility to copy a page. I am not sure if this is an enhancement for cms-fortress or for comfy. I am thankful for any thoughts ...
We have two roles. One admin that can do anything and one role that can only write articles and update them but nothing else. My problem is that I don't see a way to disable updating a published page without taking away the ability to create new pages for a user.
Is there any way to do this?
I was wondering, if it would be cool to have a dashboard in the administration. I could imagine to finde the following info there:
And the like. All the above statistics should be linked to the corresponding section.
What do you think?
I have hard times understanding, why changes of the tinymce settings in the config file I created (see last PR's) do not take effect for the editor or do take effect randomly. I am using the cms-fortress gem locally. I change the settings for the editor in tinymce.yml and expect, that the changes are made after
Nothing is changing and I was not able to find out, when they change or what I have to do that the new settings are being used. Is there a cache in cms-fortress in the admin are - e.g the edit page? During development, everything should change immediately.
Thanks a lot for any help or hints
Cheers
Andy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.