Hey Lachlan, 

You could create 
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/migrate/20170321012632_fill_in_content_view_components.rb
 (or similar based on your Katello version) with the contents of: 

https://github.com/Katello/katello/pull/6690/files 

...then run a --upgrade if you don't have luck with the console. 

Regards, 

j 



From: "Lachlan Musicman" <[email protected]> 
To: "Foreman Users" <[email protected]> 
Sent: Tuesday, May 9, 2017 6:08:57 PM 
Subject: Re: [foreman-users] Foreman 1.14/Katello 3.3 upgrade make CCVs useless 

Thanks Klaas. I'm not 100% sure how foreman-rake console works so I'll need to 
look into it. 

Appreciate your help. 

cheers 
L. 

------ 
"Mission Statement: To provide hope and inspiration for collective action, to 
build collective power, to achieve collective transformation, rooted in grief 
and rage but pointed towards vision and dreams." 

- Patrice Cullors, Black Lives Matter founder 

On 9 May 2017 at 17:15, Klaas Demter < [ mailto:[email protected] | [email protected] 
] > wrote: 


Sorry wrong link - right solution: 
[ http://projects.theforeman.org/issues/18820 | 
http://projects.theforeman.org/issues/18820 ] 


Greetings 
Klaas Demter 

ATIX - The Linux & Open Source Company 
[ http://www.atix.de/ | www.atix.de ] 

----- Ursprüngliche Mail ----- 
Von: "Klaas Demter" < [ mailto:[email protected] | [email protected] ] > 
An: [ mailto:[email protected] | [email protected] ] 
Gesendet: Dienstag, 9. Mai 2017 09:12:13 
Betreff: Re: [foreman-users] Foreman 1.14/Katello 3.3 upgrade make CCVs useless 

Hey, 
this sounds like [ http://projects.theforeman.org/issues/19024 | 
http://projects.theforeman.org/issues/19024 ] . 

you can fix it by applying it manually - something like this in "foreman-rake 
console" - or wait for 3.3.2: 
class FakeContentView < ActiveRecord::Base 
self.table_name = 'katello_content_views' 

has_many :content_view_components, :class_name => "FakeContentViewVersion", 
:dependent => :destroy, 
:inverse_of => :composite_content_view, :foreign_key => 
:composite_content_view_id 
end 

class FakeContentViewVersion < ActiveRecord::Base 
self.table_name = 'katello_content_view_versions' 

has_many :content_view_components, :inverse_of => :content_view_version, 
:dependent => :destroy, :class_name => 'FakeContentViewComponent' 
end 

class FakeContentViewComponent < ActiveRecord::Base 
self.table_name = 'katello_content_view_components' 

belongs_to :content_view_version, :class_name => "FakeContentViewVersion", 
:inverse_of => :content_view_components 
belongs_to :content_view, :class_name => "FakeContentView", 
:inverse_of => :component_composites 
end 

FakeContentViewComponent.find_each do |cvc| 
if cvc.content_view_id.nil? && cvc.content_view_version_id 
cvc.content_view_id = cvc.content_view_version.content_view_id 
cvc.save! 
end 
end 


Greetings 
Klaas Demter 

ATIX - The Linux & Open Source Company 
[ http://www.atix.de/ | www.atix.de ] 

----- Ursprüngliche Mail ----- 
Von: "Lachlan Musicman" < [ mailto:[email protected] | [email protected] ] > 
An: [ mailto:[email protected] | [email protected] ] 
Gesendet: Dienstag, 9. Mai 2017 07:46:03 
Betreff: [foreman-users] Foreman 1.14/Katello 3.3 upgrade make CCVs useless 

Hi 

I upgraded Foreman/Katello successfully (ie, without warning or error) from 
1.13/3.2 -> 1.14/3.3 

Now, when I go to a Composite Content Views, their "List/Remove Content 
Views" has the right number of rows in the table, but there is no text nor 
any ability to update to a newer version. 

This makes them useless, and I'm not sure how to solve it? 

I have rebooted the machine, and checked in Firefox and Chromium on Debian 
Stretch, Chrome in Windows. 

See attached images for eg 

Also attached: the html source code for the table cell with the missing 
value 

How do I fix this? 

cheers 
L. 
------ 
"Mission Statement: To provide hope and inspiration for collective action, 
to build collective power, to achieve collective transformation, rooted in 
grief and rage but pointed towards vision and dreams." 

- Patrice Cullors, *Black Lives Matter founder* 

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [ mailto:foreman-users%[email protected] | 
[email protected] ] . 
To post to this group, send email to [ mailto:[email protected] | 
[email protected] ] . 
Visit this group at [ https://groups.google.com/group/foreman-users | 
https://groups.google.com/group/foreman-users ] . 
For more options, visit [ https://groups.google.com/d/optout | 
https://groups.google.com/d/optout ] . 

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [ mailto:foreman-users%[email protected] | 
[email protected] ] . 
To post to this group, send email to [ mailto:[email protected] | 
[email protected] ] . 
Visit this group at [ https://groups.google.com/group/foreman-users | 
https://groups.google.com/group/foreman-users ] . 
For more options, visit [ https://groups.google.com/d/optout | 
https://groups.google.com/d/optout ] . 

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [ mailto:foreman-users%[email protected] | 
[email protected] ] . 
To post to this group, send email to [ mailto:[email protected] | 
[email protected] ] . 
Visit this group at [ https://groups.google.com/group/foreman-users | 
https://groups.google.com/group/foreman-users ] . 
For more options, visit [ https://groups.google.com/d/optout | 
https://groups.google.com/d/optout ] . 






-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [ mailto:[email protected] | 
[email protected] ] . 
To post to this group, send email to [ mailto:[email protected] | 
[email protected] ] . 
Visit this group at [ https://groups.google.com/group/foreman-users | 
https://groups.google.com/group/foreman-users ] . 
For more options, visit [ https://groups.google.com/d/optout | 
https://groups.google.com/d/optout ] . 

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to