Git Product home page Git Product logo

radiant-concurrent_draft-extension's People

Contributors

bogado avatar coat avatar dayne avatar seancribbs avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

radiant-concurrent_draft-extension's Issues

can't modify frozen hash

If I remove a page part from a page and click "Save and Publish" I consistently get the following exception:

A TypeError occurred in pages#update:
 can't modify frozen hash
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:313:in `[]='
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:313:in `write_attribute_without_dirty'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/dirty.rb:139:in `write_attribute'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211:in `content='
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/base.rb:2745:in `send'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/base.rb:2745:in `attributes='
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/base.rb:2741:in `each'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/base.rb:2741:in `attributes='
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/base.rb:2627:in `update_attributes'
 [RAILS_ROOT]/vendor/extensions/concurrent_draft/lib/concurrent_draft/model_extensions.rb:43:in `promote_draft!'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `__send__'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_proc'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:364:in `method_missing_without_paginate'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:219:in `each'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:219:in `send'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
 /usr/local/lib/ruby/gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:364:in `method_missing_without_paginate'
 [RAILS_ROOT]/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:164:in `method_missing'
 [RAILS_ROOT]/vendor/extensions/concurrent_draft/lib/concurrent_draft/page_extensions.rb:4:in `promote_draft_without_notify_content_manager!'
 [RAILS_ROOT]/vendor/extensions/draft_notification/lib/draft_notification/page_extensions.rb:9:in `promote_draft!'
 [RAILS_ROOT]/vendor/extensions/concurrent_draft/lib/concurrent_draft/admin_controller_extensions.rb:21:in `check_for_promote_now'
...

One fix is to add a reload to #promote_draft! in page_extensions.rb, like so:

def promote_draft!
  parts.reload.each(&:promote_draft!)
  update_attribute('status_id', Status[:published].id)
  super
end

center() function no longer available in 0.9.1

This extension relies on the center() function from javascripts/admin/admin.js (lines 134-142). This function is no longer available in Radiant 0.9.1. In fact, admin.js has been completely removed. The center() function should be relocated to concurrent_draft.js

Installing concurrent-draft disables the ability to create "hidden" pages.

In some Radiant sites, hidden pages are used to collect assets or provide other content that the designer may not want visible in a direct way. Existing pages that have a status of "hidden" at the time of the extension installation can retain that status, but creating new pages with a status of "hidden" appears impossible since concurrent-draft removes the standard publish setting and the replacement UI does not provide this option. This makes maintaining sites that use this feature very difficult.

JS errors on draft controls in Firefox

The draft controls were only working for my client in IE and Safari, not in Firefox. When he was clicking on the box to expose the controls, he was getting this error:

this.element.up(".active") is undefined

It looks like the following behavior instruction in concurrent_draft.js was being ignored by Firefox:

'#draft-controls': Draft.ControlBox

Firefox was dropping through and firing a click event on this instead:

'#draft-controls li.schedule_draft a': Draft.ScheduleLink

I spent an hour trying to figure out why this was happening, but eventually was forced to give up and hack in a solution:

Event.addBehavior({
  // This breaks in Firefox for whatever reason
  //'#draft-controls': Draft.ControlBox,
  '#draft-controls:click': function(e) { e.stop(); this.addClassName('active'); },
  'body:click': function() { $('draft-controls').removeClassName('active') },
  '#draft-controls li.revert a': Draft.RevertLink,
  '#draft-controls li.schedule_draft a': Draft.ScheduleLink
});

Thought I'd share it here. I'd love to know a more elegant way to solve this. Clearly, the problem is with Firefox, but it would be nice for the code to work across all three browsers.

Feature: display a publish status on the lists

On page/snippets/layout lists there should be an status showing if there were any changes to the page in comparison with the currently published page and if there is a "publish at" date currently set.

I intend to attack this problem some time latter, please comment with any ideas or suggestions on how to do it.

quoting non-html text on pages.

After installing this extension it seems that some characters are coming quoted from the DB into the pages, so for instance a '"' would become " and if I save the page when it loads again this will become even more mangled """ and so on.

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.