[Radiant] problem with has_many_polymorphs plugin
I installed has_many_polymorphs plugin in a freshly generated Radiant application. Then I generated a simple Person-Disk-Book example models (with script/generate extension_model), declared the polymorphic associations as explained in many plugin tutorials, and put some test data into the database. Then I get this strange behavior in the script/console: xonmac:~/Development/labs/radiant/mycms skozlov$ ./script/console Loading development environment. has_many_polymorphs: has_many_polymorphs: Rails environment detected b = Book.find :first = #Book:0x3456f48 @attributes={id=1} b.people NoMethodError: undefined method `people' for #Book:0x3456f48 @attributes={id=1} from /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/base.rb:1860:in `method_missing' from (irb):2 p = Person.find :first = #Person:0x3411d08 @attributes={id=1} b.people = [] To wrap it up: the Book class doesn't have the people method defined until I do the a find on class Person. After that all works normally. Direct associations (Person - Book/Disk) work always fine. This problem is not reproducible with a normal Rails application. In case of any interest, I will be willing to put the whole application source tree somewhere on the Internet. I would appreciate any help with fixing this issue. -- Posted via http://www.ruby-forum.com/. ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] MySQL SystemStackError: stack level too deep:
Mark Kirby wrote: stack level too deep SystemStackError: stack level too deep: SELECT * FROM page_parts WHERE (page_parts.page_id = 6) AND (page_parts.`name` = 'extended') LIMIT 1 Any one have any ideas? Do tests run for you? -- John Long http://wiseheartdesign.com ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] MySQL SystemStackError: stack level too deep:
Hi, if i create a vanilla radiant app using the styled blog and an empty mysql database (though postgres displays the same problem) i get the following trace when i try to delete an article. Also when going to the front page each article body has stack level too deep SystemStackError: stack level too deep: SELECT * FROM page_parts WHERE (page_parts.page_id = 6) AND (page_parts.`name` = 'extended') LIMIT 1 Normal rails applications have no issues. Any one have any ideas? Thanks Mark kirby Rendered admin/page/_node (0.01905) ArchivePage Columns (0.006102) SHOW FIELDS FROM pages SQL (0.000967) SELECT count(*) AS count_all FROM pages WHERE (pages.parent_id = 4) Page Load (0.001191) SELECT * FROM pages WHERE (pages.`id` = 1) Page Load (0.001439) SELECT * FROM pages WHERE (pages.parent_id = 4) ORDER BY virtual DESC, title ASC ArchiveMonthIndexPage Columns (0.006044) SHOW FIELDS FROM pages SQL (0.002736) SELECT count(*) AS count_all FROM pages WHERE (pages.parent_id = 10) Page Load (0.00) SystemStackError: stack level too deep: SELECT * FROM pages WHERE (pages.`id` = 4) ActionView::TemplateError (SystemStackError: stack level too deep: SELECT * FROM pages WHERE (pages.`id` = 4) ) on line #29 of admin/ page/_node.rhtml: 26: %= icon % 27: %= title % 28: % else -% 29: %= expander %a href=%= page_edit_url(:id = page) % title=%= page.url %%= icon % %= title %/a 30: %= page_type % 31: %= spinner % 32: % end -% /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/connection_adapters/ abstract_adapter.rb:128:in `log' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/connection_adapters/mysql_adapter.rb: 243:in `execute' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/connection_adapters/mysql_adapter.rb: 399:in `select' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/connection_adapters/abstract/ database_statements.rb:7:in `select_all' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:427:in `find_by_sql' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:997:in `find_every' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:1028:in `find_one' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:1014:in `find_from_ids' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/base.rb:419:in `find' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/belongs_to_association.rb: 44:in `find_target' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/association_proxy.rb: 131:in `load_target' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations/association_proxy.rb: 55:in `reload' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ activerecord/lib/active_record/associations.rb:891:in `parent' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/models/page.rb: 232:in `parent?' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/models/page.rb: 79:in `url' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/views/admin/ page/_node.rhtml:29:in `_run_rhtml_47usr47pkg47lib47ruby47gems47146847gems47radiant45046646247a pp47views47admin47page47_node46rhtml' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:326:in `send' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:326:in `compile_and_render_template' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:301:in `render_template' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:260:in `render_file' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/base.rb:275:in `render' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_view/partials.rb:59:in `render_partial' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:26:in `benchmark' /usr/pkg/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/pkg/lib/ruby/1.8/benchmark.rb:307:in `realtime' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/ actionpack/lib/action_controller/benchmarking.rb:26:in `benchmark' /usr/pkg/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/
Re: [Radiant] MySQL SystemStackError: stack level too deep:
On 19 Sep 2007, at 14:05, John W. Long wrote: Mark Kirby wrote: stack level too deep SystemStackError: stack level too deep: SELECT * FROM page_parts WHERE (page_parts.page_id = 6) AND (page_parts.`name` = 'extended') LIMIT 1 Any one have any ideas? Do tests run for you? The 1st block of tests all pass, on the second block i get one error: 1) Error: test_index__with_cookie(Admin::PageControllerTest): ActionView::TemplateError: stack level too deep On line #29 of admin/page/_node.rhtml 26: %= icon % 27: %= title % 28: % else -% 29: %= expander %a href=%= page_edit_url(:id = page) % title=%= page.url %%= icon % %= title %/a 30: %= page_type % 31: %= spinner % 32: % end -% Mark Kirby ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] MySQL SystemStackError: stack level too deep:
stack level too deep SystemStackError: stack level too deep: SELECT * FROM page_parts WHERE (page_parts.page_id = 6) AND (page_parts.`name` = 'extended') LIMIT 1 Do you have any extensions installed? They could be breaking things. If not, It could actually be that the stack level is too deep. Your system might have a low stack size limit. The following will show how deep your ruby stack can go: ruby -e '$x=0;def r;$x+=1;r;end;r rescue puts $x'; My system can go 5050 levels. Ruby relies on the system limit on the C stack to limit its own stack. ulimit -s will show your current stack limit. My system has a limit of 8192. Radiant uses up more of the stack than a vanilla rails app (as it processes through the normal rails stack and then its own libs). Dan. ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant