I'm not opposed to your solution in anyway. I think it'd be helpful. I just think that the "right" solution for my extension would be to:

   *  have my extension's default settings installed via the initial
     migrate task
   * offer a rake task to allow administrators (server admins) to
     change the css/js settings on the fly.  This need only be run once
     manually (after bootstrap) and not at every init.  I'd probably
     throw in a "restore_defaults" task too.

I designed the StylesNScripts::Config bit with the future UI designs of Radiant in mind -- for the day when we'll have a settings/configuration admin panel where extensions can add into the Radiant UI (instead of sticking settings in some tab or hard coded and loaded at init).

My problem is that I broke this rule and made the settings load during init "just for now" and shot myself in the foot. If I do what I've outlined above, it'll be trivial to hook into Radiant's shiny new settings UI when it arrives

-Chris


Sean Cribbs wrote:
Chris,

We might be able to make a rake task that loads the environment with no extensions installed. In fact, it should be as easy as something like this:

task :minimal_environment do
   Radiant::Initializer.run do |config|
      config.extensions = []
   end
end

Then we could make db:bootstrap and anything else that needs to prevent extensions from loading depend on that instead of the default :environment task.

Sean

Chris Parrish wrote:
For anyone (now or in the future) following this thread, I've identified the issue nurullah mentioned here. It is indeed a bug with the SnS extension and will be resolved in the upcoming 0.5 release.

For those interested, it's caused by the interplay between the way SnS extension stores its settings, and the way Radiant rake tasks are performed.

SnS creates its default settings and then overwrites those with any custom settings during initialize.

Well, it turns out that extensions are initialized during any Rake task -- including 'rake db:bootstrap' So, if you're including SnS in a *brand new* installation of Radiant (not already bootstrapped), when you try to create the database, the SnS extension gets initialized and tries to store some settings in the not-yet-created config table. Doh!

Those adding SnS to an existing Radiant install will never see this issue.

-Chris

nurullah wrote:
although all installation steps fail it adds tabs on panels and some columns
on config table


5|stylesheet_mime_type|text/css
6|response_cache_directory|text_asset_cache
7|javascript_mime_type|text/javascript
8|javascript_directory|js
9|stylesheet_directory|css

but you are right production.log says it cannot find text_assets table and
right there is no such table on db file




On 5/19/08, Chris Parrish <[EMAIL PROTECTED]>
wrote:
The Styles 'n Scripts extension makes use of Radiant's built-in
Radiant::Config settings (which get stored in the config table). So this
sound like a Radiant setup issue. (The only table my extension adds is
text_assets).

Remove my extension (all extensions, really) and make sure that your
plain-vanilla Radiant extension has this table created (should have been
created when you ran:
 rake db:bootstrap (or rake production db:bootstrap if running in
production mode).

-Chris

Arik Jones wrote:

I think this is a fault of Radiant. Could be wrong.

nurullah wrote:


I could get it run on a clean install (0.6.7) tho, with sqlite3 and no
other extension installed

it gives Could not find table 'config' error

On 5/18/08, Chris Parrish <[EMAIL PROTECTED]>



_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to