Git Product home page Git Product logo

Comments (7)

duarme avatar duarme commented on September 20, 2024

Also, after I manually reinserted the values from the "Settings" tab, copying them from another working project, and after I edited them again from the "Inquiries" tab ('update who gets notified' and 'edit confirmation email') now I have duplicate values:

screen-shot-2013-07-22-at-1 56

For each value there is now onother one with '(inquiries)' appended at its title.
What's even weirder if that I try to delete a record, say, this one:

remove

The one that actually gets deleted is the one with '(inquiries)' in the title:

after-remove

WDYT?

from refinerycms-inquiries.

duarme avatar duarme commented on September 20, 2024

After I generated a custom engine with rails generate refinery:engine ... as described in the getting started guide, as soon as I run rake db:seed I get this error:

➜  my_app_name[news] ✗ rake db:seed
rake aborted!
undefined method `children' for nil:NilClass
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/refinerycms-inquiries-2.0.3/db/seeds.rb:43:in `'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/railties-3.2.13/lib/rails/engine.rb:520:in `load_seed'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/dairweb/dev/rails/my_app_name/db/seeds.rb:13:in `'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/railties-3.2.13/lib/rails/engine.rb:520:in `load_seed'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:347:in `block (2 levels) in '
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/bin/ruby_noexec_wrapper:14:in `eval'
/Users/dairweb/.rvm/gems/ruby-1.9.3-p194@my_app_name/bin/ruby_noexec_wrapper:14:in `'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
➜  my_app_name[news] ✗

For now I worked around commenting Refinery::Inquiries::Engine.load_seed line in seeds.rb.

from refinerycms-inquiries.

ugisozols avatar ugisozols commented on September 20, 2024

I fixed undefined methodchildren' for nil:NilClass` bug in cee41a4.

Can't reproduce multiple contact pages when running rake db:seed more than once ...

Haven't looked into settings yet.

from refinerycms-inquiries.

duarme avatar duarme commented on September 20, 2024

It doesn't produce multiple pages, only settings.

from refinerycms-inquiries.

alepore avatar alepore commented on September 20, 2024

This is related with caching: find_or_set() gets the setting values from the cache so it don't insert the value in db.
I solved by calling Rails.cache.clear before seeding: alepore@8b4a2f2

Do you think this is the right approach?

from refinerycms-inquiries.

ugisozols avatar ugisozols commented on September 20, 2024

@alepore if it works then it's all good :)

Also wanted to note that @parndt removed caching from settings extension in refinery/refinerycms-settings@df3849b but it will only be in Refinery CMS 3.0.0 (or 2.2 if that ever comes out).

from refinerycms-inquiries.

ugisozols avatar ugisozols commented on September 20, 2024

Since caching was removed I assume this shouldn't be an issue anymore. Closing.

from refinerycms-inquiries.

Related Issues (20)

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.