Undefined local variable or method `cv' for Katello::ComponentViewPresenter:Class

Problem:

I Cannot acces to web page where i can add content-view to a composite content-view , It displays the error message bellow :

Expected outcome:

Something went wrong while retrieving the content view components! undefined local variable or method `cv’ for Katello::ComponentViewPresenter:Class


Foreman and Proxy versions:
Foreman 3.1
Katello 4.3

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:

Hey @siriwliw :

Could you also provide the foreman logs when you see this error?

Also, if possible can you also paste the details of the failed call in the network tab of the log of the browser when you land on this page?

Never mind! We were able to identify the root cause. It’s to do with translations and how the value is passed to the API from the translated UI. Thanks for raising this @siriwliw !

1 Like

Hi @sajha ,

Thank you for the time you gave me to solve this bug.
So, do I need to update my server to apply the latest correction ? Or just modify these files “ContentViewsConstants.js” “component_view_presenter.rb” as indicated in this Github link : https://github.com/Katello/katello/pull/9859/files ?

The javascript part of the patch might not help locally as installed katello instances use a pre-compiled version. However, the .rb file changes should be ok to apply and restarting the server should bring in that fix. The .rb fix should unblock you while 4.3 is packaged and goes GA.

We’re also targeting a larger patch around the same to take translations into account in 4.3.1.

1 Like

Perfect ! Thank you so much for your help.
I’ll try to modify the .rb tomorrow and I’ll tell you if the solution works on my server.

@siriwliw : Just remembered a more straight-forward way to get you unblocked.
The old UI is still available at https://yourserver.com/legacy/content_views .
You can use that for this particular task while we get the fix released in 4.3 GA.

2 Likes

Hi @sajha
I have tested your solution and I confirm that it works perfectly on my katello server, thank you !

1 Like