Project

General

Profile

Actions

Bug #21979

closed

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

Added by Bernhard Suttner over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
Difficulty:
Triaged:
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 2 (0 open2 closed)

Related to Katello - Bug #21955: Improve repository sets apiClosedJustin Sherrill12/12/2017Actions
Related to Katello - Bug #22017: updating a repo fails with "undefined method content"ClosedJustin Sherrill12/18/2017Actions
Actions #1

Updated by Jonathon Turel over 6 years ago

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

Updated by Jonathon Turel over 6 years ago

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

Actions #3

Updated by Bernhard Suttner over 6 years 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'

Actions #4

Updated by Eric Helms about 6 years ago

  • Assignee set to Jonathon Turel
  • translation missing: en.field_release set to 284
Actions #5

Updated by Eric Helms about 6 years ago

  • Target version set to 242
Actions #6

Updated by Jonathon Turel about 6 years ago

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

Updated by Jonathon Turel about 6 years 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 :)

Actions #8

Updated by Brad Buckingham about 6 years ago

  • Target version changed from 242 to 245
Actions #9

Updated by Jonathon Turel about 6 years 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!

Actions

Also available in: Atom PDF