0
votes

I created a project with ant modulegen. b2b from b2c recipe, because hybris wiki says this.

But i could not get a proper result on backoffice / wcms / website

for that, mystore shows empty for

Name

and

Content Catalogs

I found that inpex that is not working on hac admin.

This is path

mystoreinitialdata/import/coredata/stores/mystore/site.impex

This is the error:

INSERT_UPDATE CMSSite;uid[unique=true];theme(code);channel(code);stores(uid);contentCatalogs(id);defaultCatalog(id);defaultLanguage(isoCode);siteMapConfig(&siteMapConfigId);urlPatterns;active;previewURL;startingPage(uid,catalogVersion(CatalogVersion.catalog(Catalog.id[default=mystoreContentCatalog]),CatalogVersion.version[default=Staged])[default=mystoreContentCatalog:Staged]);urlEncodingAttributes;defaultPromotionGroup(Identifier)[default=mystorePromoGrp] ,8796093187112,,,column 12: could not resolve item for homepage| column 12: cannot resolve value 'homepage' for attribute 'startingPage';mystore;blue;B2C;mystore;mystoreContentCatalog;mystoreProductCatalog;en;mystoreSiteMapConfig;(?i)^https?://[^/]+(/[^?])?\?(.\&)?(site=mystore)(|\&.)$,(?i)^https?://mystore.[^/]+(|/.|\?.)$,(?i)^https?://api.hybrisdev.com(:[\d]+)?/rest/.$,(?i)^https?://localhost(:[\d]+)?/rest/.*$;true;/?site=mystore;homepage;storefront,language;

error is for that line

>     # CMS Site
>     INSERT_UPDATE CMSSite;uid[unique=true];theme(code);channel(code);stores(uid);contentCatalogs(id);defaultCatalog(id);defaultLanguage(isoCode);siteMapConfig(&siteMapConfigId);urlPatterns;active;previewURL;startingPage(uid,$contentCV);urlEncodingAttributes;defaultPromotionGroup(Identifier)[default=$promoGrp]
>     ;$siteUid;blue;B2C;$storeUid;$contentCatalog;$productCatalog;$defaultLanguage;$storeUidSiteMapConfig;(?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://api\.hybrisdev\.com(:[\d]+)?/rest/.*$,(?i)^https?://localhost(:[\d]+)?/rest/.*$;true;$storefrontContextRoot/?site=$siteUid;homepage;storefront,language

I followed the recipe wiki and

https://wiki.hybris.com/pages/viewpage.action?pageId=294094425

that wiki. What am i doing wrong?

    INSERT_UPDATE CMSSite;uid[unique=true];theme(code);channel(code);stores(uid);contentCatalogs(id);defaultCatalog(id);defaultLanguage(isoCode);urlPatterns;active;previewURL;startingPage(uid,$contentCV);urlEncodingAttributes;defaultPromotionGroup(Identifier)[default=PromoGrp];# unknown attributes [ContentPage.$contentCV] - cannot resolve item reference;# invalid item expression '# unknown attributes [ContentPage.$contentCV] - cannot resolve item reference' - unexpected expression at 45
,,,,unknown attributes [ContentPage.$contentCV] - cannot resolve item reference, invalid item expression '# unknown attributes [ContentPage.$contentCV] - cannot resolve item reference' - unexpected expression at 45;$siteUid;lambda;B2B;$storeUid;$contentCatalog;$productCatalog;$defaultLanguage;(?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$;true;$storefrontContextRoot/?site=$siteUid;homepage;storefront,language,currency
3
The error is caused by the lack of a ContentPage instance named 'homepage' in the mentioned content catalogue. Make sure you create the content page as well before creating the CMSSite or use another existing content pagedj_frunza
When i go to backoffice/wcms, i see that Content Catalogs part is selected with mystore.startpage was empty, i slected appareluk homepage but still can not import and i got error when i go to localhost:9002 : ` May 30, 2018 3:29:29 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is de.hybris.platform.cms2.exceptions.CMSItemNotFoundExh root cause de.hybris.platform.cms2.exceptions.CMSItemNotFoundException: No page with id [homepage] found`user9708984

3 Answers

1
votes

Add this to your impex before importing CMS Site

INSERT_UPDATE SiteMapPage;&siteMapPage;code(code)[unique=true];frequency(code)[unique=true];priority[unique=true];active[default=true]
;Homepage;Homepage;daily;1.0;;
1
votes

I think some Impex might have failed during your system initialization. So what I would suggest.

  • Since you have set up the custom extension with your store data, remove all OOTB stores(powertools, apparel-us etc.) from your localextension.xml file
  • Initialize your system. Look for the error log in the console, note down all Impex which fail to load
  • Correct those Impex and run it through hac Impex-Import
  • Once setup correctly your store correctly, you can follow this to access your site as root
-1
votes

You're using a version 6.7 of Hybris but you're following the wiki for the version 5.7. Follow this link. Here instead you can find the trails.