Git Product home page Git Product logo

cms-fortress's People

Contributors

darrenzully avatar gbh avatar mcrip avatar melvinsembrano avatar moeffju avatar saldan avatar ssilvius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cms-fortress's Issues

Asset Path

Asset pipeline is loading assets from old path. This is causing 404's for asset requests.

Possible to hide sites dropdown from login?

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,

Comfy > 1.12.4 is breaking admin locally

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 ;-)

Error occurred when executing rails generate cms:fortress

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

identical config/locales/devise.en.yml

Some setup you must do manually if you haven't yet:

  1. 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.

  2. Ensure you have defined root_url to something in your config/routes.rb.
    For example:

    root to: "home#index"

  3. Ensure you have flash messages in app/views/layouts/application.html.erb.
    For example:

    <%= notice %>

    <%= alert %>

  4. 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.

  5. 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'

Make sure this routeset is defined last

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:inreplace!'
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:inaction'
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:inblock 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:inblock in inside'

Suppose I already have a user model

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.

window.media -> othersPath not working

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

No WYSIWYG editor shows up when using wide-theme

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 )

Page workflow error prevents fixtures from being imported or exported

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.

Needs to be updated to latest CMS

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)

path in role.rb is wrong - change code

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

Default route inserted when already exists

  1. generate comfy
  2. generate fortress

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

ComfyBlog compatibility

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

Only the last revision visible

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

Have two different contents for one page?

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?

Err, the instructions are missing a key fact

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.

flash messages are not shown in admin area

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!!

generate error

"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)

missing transition button in workflow

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

error creating CMS Fortress Users

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.

including ComfyBlog

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!)

Conflicting dependencies with newest CMS

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
tinymce-rails (
> 4.0.0) ruby

comfortable_mexican_sofa (>= 0) ruby depends on
  tinymce-rails (4.1.2)

Copy function for pages

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 ...

Question: Don't let anyone edit a published post directly

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?

How about adding a dashboard

I was wondering, if it would be cool to have a dashboard in the administration. I could imagine to finde the following info there:

  • count users by role
  • count published pages
  • count unpublished pages
  • count websites
  • count assets

And the like. All the above statistics should be linked to the corresponding section.

What do you think?

tinymce settings take no effect

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

  • login / logout
  • destroyed session
  • flushed memcache

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.