Bug #24375
closedKatello unable to add yum repo to content view (undefined local variable or method `auto_publish')
Description
When trying to add a new yum repository to an existing content view the following error appears in the production.log:
2018-07-24T07:22:17 323b4ad9 [background] [E] undefined local variable or method `auto_publish' for #<Katello::ContentView:0x00000000100cabd8> (NameError)
The same error shows up when trying to create a new content view.
If I click "Add Repositories" again on the same page after getting the first error, this error is triggered:
2018-07-24T07:30:40 9958e741 [background] [E] Validation failed: Repository has already been taken (ActiveRecord::RecordInvalid)
I've attached the production.log contents (katello-cv-errors.log) showing the errors. NameError
is at 2018-07-24T07:30:31
and RecordInvalid
is at 2018-07-24T07:30:40
Files
Updated by Kevin Carrasco over 6 years ago
Forgot the mention that the UI shows the following popup warning when trying to add a yum repo to an existing CV or when trying to create a new CV:
An error occurred updating the Content View: undefined local variable or method `auto_publish' for #
and the following popup warning when clicking the "Add Repositories" button again after getting the first warning:
An error occurred updating the Content View: has already been taken
Please let me know if you need more information to help me troubleshoot this.
Updated by Kevin Carrasco over 6 years ago
- Status changed from New to Resolved
This was due to a patch that was applied to /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/content_view.rb
Restoring the file using yum reinstall -y tfm-rubygem-katello
solved the problem.