Project

General

Profile

Bug #21979

Not possible to view/edit repository: undefined method 'product' for #

Added by Bernhard Suttner 12 months ago. Updated 5 months ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

The following issue occurs while using: http://[ip]:3000/katello/api/v2/products/7 (VERIFY_URL)

{"displayMessage":"undefined method `product' for #\u003cKatello::Content:0x00000010b74098\u003e","errors":["undefined method `product' for #\u003cKatello::Content:0x00000010b74098\u003e"]}

Steps to reproduce:
- Add a new product (only enter the name)
- Verify that the product exists with VERIFY_URL
- Add a repository to this product (only enter the name and set the type to yum)
=> Broken

 NoMethodError: undefined method `product' for #<Katello::Content:0x007fc958087018>
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:in `method_missing'
 | /home/vagrant/katello/app/models/katello/glue/candlepin/product_content.rb:10:in `modified_product_ids'
 | /home/vagrant/katello/app/views/katello/api/v2/products/_product_content.json.rabl:12:in `block in eval_source'

- Verify that the product exists with VERIFY_URL => broken

Related issues

Related to Katello - Bug #21955: Improve repository sets apiClosed2017-12-12
Related to Katello - Bug #22017: updating a repo fails with "undefined method content"Closed2017-12-18

History

#1 Updated by Jonathon Turel 12 months ago

  • Related to Bug #21955: Improve repository sets api added

#2 Updated by Jonathon Turel 12 months ago

I think this has been addressed by the related issue which I've just attached. Please pull down master and take a look :)

#3 Updated by Bernhard Suttner 12 months ago

Better than before. Thank you very much.

I still get this issues while updating a already existing repository:

An error occurred saving the Repository: undefined method `content' for #

2017-12-15T13:23:11 74d93d01 [app] [E] NoMethodError: undefined method `content' for #<Katello::Repository:0x007f9d224b3090> | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:in `method_missing' | /home/vagrant/katello.local/app/lib/actions/katello/repository/update.rb:18:in `plan' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/action.rb:473:in `block (3 levels) in execute_plan' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `call' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `pass' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware.rb:18:in `pass'

#4 Updated by Eric Helms 11 months ago

  • Legacy Backlogs Release (now unused) set to 284
  • Assignee set to Jonathon Turel

#5 Updated by Eric Helms 11 months ago

  • Target version set to 242

#6 Updated by Jonathon Turel 11 months ago

  • Related to Bug #22017: updating a repo fails with "undefined method content" added

#7 Updated by Jonathon Turel 11 months ago

Bernhard Suttner wrote:

Better than before. Thank you very much.

I still get this issues while updating a already existing repository:

An error occurred saving the Repository: undefined method `content' for #

2017-12-15T13:23:11 74d93d01 [app] [E] NoMethodError: undefined method `content' for #<Katello::Repository:0x007f9d224b3090> | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:in `method_missing' | /home/vagrant/katello.local/app/lib/actions/katello/repository/update.rb:18:in `plan' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/action.rb:473:in `block (3 levels) in execute_plan' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `call' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `pass' | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware.rb:18:in `pass'

Ah! Sorry for the delay. This also appears to have been fixed over the recent holiday by the second issue I have just attached here. Please take another look :)

#8 Updated by Brad Buckingham 11 months ago

  • Target version changed from 242 to 245

#9 Updated by Jonathon Turel 11 months ago

  • Status changed from New to Closed

This issue has been addressed by the two associated bugs, so I am going to close this one out. Thank you for the report!

Also available in: Atom PDF