cancel
Showing results for 
Search instead for 
Did you mean: 

Removing default catalog

0 Kudos

How do i remove default catalog (both Staging and Online versions) from our environment as it seems to create few side-effects such as PDF view was not working etc. Appreciate your suggestion.

0 Kudos

Though i could remove Default catalog, the report feature in Product cockpit stopped working after the removal of Default Catalog. When we investigated this, we came to know that the reports that are taken from Product Cockpit are residing in the Default catalog. How do we address this?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member674342
Active Participant
0 Kudos

Hello ,

to remove the default catalog you could use one of this two ways:

  1. In a custom extension add an impex that gives no read access to the default catalog. This impex must also be loaded as essential data.

The admin user will se the catalog anyway, but for anyone else who logs into the backoffice applications should not see the default catalog.

Or you could create an impex, that will undo the catalog creation (it also should be loaded as essential data).

  1. You could override the CatalogManager class and supress the catalog creation. To do this you should add to your extension-spring.xml file this bean:

      <bean id="catalog.manager" class="de.hybris.platform.catalog.jalo.CustomCatalogManager" init-method="init" />
    
    

And create a new class for example CustomCatalogManager and override this method:

 public class CustomCatalogManager extends CatalogManager {
  
     @Override
     public boolean createDefaultCatalog(JspContext jspc) throws Exception {
         // no operation
         return false;
     }
 } 

But you should be carefull with this method, it could lead to several errors.

I hope this will help you.

Best Regards,

Former Member
0 Kudos

I have tried this. It's not working.

Former Member
0 Kudos

Hi Vinotth,

There are several solutions to remove the default catalog.

1) Set No Read Access In a custom extension, for example, myprojectcore, add an impex that gives no read access to the default catalog. The impex must also be loaded as essential data. This will make no difference for the admin user, but for anyone else who logs into the back office applications (Product Cockpit/Backoffice/hMC) they should not see the default catalog.

2) If no catalog is set as default, the CatalogManager creates a new catalog called default and creates an on-line (Online) and an off-line (Staged) catalog version within that new catalog. Therefore you must set your desired catalog as the default catalog, then remove the "Default-Online" one.

a) In the hMC, click on "Catalog", then "Catalog Browser".

b) From the listed catalogs in the system, right-Click on the catalog you want to make the default one, click on "Edit".

c) On the new editor window under the "Common" tab, set the RadioButton
'Default catalog in the system'to "Yes". Save it and Close.

d) Right-Click on the "Default" catalog, click "Edit". Click "Completely Remove Catalog" and then Click "Start" to run 'Remove catalog version' cronjob. After job is finished click 'Done'

e) Close the window.

f) Update system via hAC with "Create Essential Data" enabled.

Best Regards,

Reena

Former Member
0 Kudos

Hi ,
The default catalog (versions) cannot be removed in normal case, when you try to delete them, via hMC for example. it will throw "ModelRemovalException" by the "CheckVersionsRemoveInterceptor"

However, you could set it hidden from ProductCockpit for example, by removing all the principals from the "Permissions" tab in hMC. And the no one will see it in PCM.

And you may disable that interceptor (CheckVersionsRemoveInterceptor), but there might be "side-effects", which you have to test. BTW, when you mentioned

side-effects such as PDF view

it is not that clear what this refers to. Could you please give some more details?

Thanks a million!
Kind Regards,
Hongxian