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
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;;
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
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.
Related
I am following the steps of this page:
https://learn.microsoft.com/en-us/composer/how-to-create-custom-actions
and have reached to the part where it is required to merge the two schemas: bots and your custom one. However when running the powershell script found inside the created project template (CoreAssistant template) I have the following error:
Error conflicting definitions of HelpDialog.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\HelpDialog.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\HelpDialog.dialog
Error conflicting definitions of HelpDialog.en-us.lu.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Error conflicting definitions of HelpDialog.lu.dialog
HelpDialog is a predefined dialog that was already present. I have installed NodeJs and #botframework-cli package because it was required from the powershell script in order to run bf dialog:merge and now it seems these two sources have some kind of conflict.
To add to other answers, changes that worked for me are as follows:
update-schema.ps1, line 11, change "!**/generated" to "!../generated" and add "!../dialogs/imported"
Also, make sure that your custom action project is INSIDE of your bot directory, it should be a folder next to the "schemas" folder for the script to find it.
Note/Edit: Having the project nested inside the bot works to get the script working, though I do not recommend it due to causing other errors. Oddly, I found it was best to move the whole custom solution up a level, next to the bot project. You may have to edit the [botName].sln file in notepad to reference the location of the project, as well as editing the bot project's project reference.
I fixed it by changing the script. I noticed the script was trying to ignore the folder imported and generated but the error message indicated it was not doing so. So I changed it from !**/generated to !../generated.
I experienced the same issue.
To fix this problem you could simply delete the corresponding dialogs in the "imported" folder. Note that this will, however, delete these dialogs in your bot, which is not optimal but should be of little concern for a sample application.
Initially all the Extensions were imported. But after some modifications (and tried to initialize), i am facing below issue.
Question: is how to debug it and fix the issue?
Edited:
As per suggestion of #Mafick.
i tried to update "sapbusinessagreementaddon" extension through hac. i found the cms-responsive-content_zh_CN.impex file( which was throwing the exception).
please find the code below:
cms-responsive-content_zh_CN.impex
$contentCatalog=powertoolsContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
$jarResourceCms=jar:com.sap.hybris.sapbusinessagreementaddon.constants.SapbusinessagreementaddonConstants&/sapbusinessagreementaddon/import/cockpit/cmscockpit
$contentCatalogName=Powertools Content Catalog
$addonExtensionName=sapbusinessagreementaddon
$lang=zh_CN
# update linkname
UPDATE CMSLinkComponent;$contentCV[unique=true];uid[unique=true];linkName[lang=$lang]
;;BusinessAgreementsLink;"商业协议"
The error thrown in the hac is: as below
UPDATE CMSLinkComponent;catalogVersion(CatalogVersion.catalog(Catalog.id[default=powertoolsContentCatalog]),CatalogVersion.version[default=Staged])[default=powertoolsContentCatalog:Staged][unique=true];uid[unique=true];linkName[lang=zh_CN]
,8796103869500,,,column 3: cannot resolve value '商业协议' for attribute 'linkName' because: cannot find language for value 'zh_CN';;BusinessAgreementsLink;商业协议
Conclusion:
As per the issue it cannot resolve "zh_CN" (linkName[lang]). So how can i resolve this issue? Where should i specify lang(zh_CN) to find the language by hybris?
Such that it execute's impex successfully.
As you can see this happens while you are importing 'project data'.
So go into your hybris admin console (/hac) -> Update and deselect all checkboxes and only activate sapbusinessagreementaddon below in project data. Than have a look on the console.
UPDATE
Have a look in to this impex file
/projects/hybris/custom/xxxinitialdata/resources/xxxinitialdata/import/coredata/common/essential-data.impex
There you can define your Languages. Add here your missing language
You probably have errors in one or more sample data impexes in the sapbusinessagreementaddon extension, try importing them manually one by one (from hac), and see which one crashes
Update :
Seems zh_CN language is missing from your database, try creating it using the following :
INSERT_UPDATE Language;isocode[unique=true];active[default=true]
;zh_CN;
Adapt this code to correspond more to your needs
In Robot Framework , I have segregated the details into Page objects, keywords and scripts.
After adding keywords in PO, I wanted to add details in Keywords. Here, in Settings section while I give the following details:
*** Settings ***
Library SeleniumLibrary
Resource Resources/PO/Sign-in.robot
I even tried using absolute path by referencing ../ at the beginning. Still, system is unable to recognize it and throwing an error message "Import File Not Found".
What Should I be doing? Please, let me know?
First, you show in the screenshot, the use of a variable ${Resources}, it would be normal for the IDE to not recognize that value for a path. Even so, running the test case may work as expected.
Second, if you want to use the relative path, then the correct value should be:
Resource ../PO/Sign-in.robot
I use SAP Cloud SDK 2.19.1 and odata-generator-maven-plugin:2.19.1.
When I try to generate VDM by metadata-file from oData service /sap/opu/odata/sap/API_PRODUCT_SRV I get an error during the execution of a command mvn clean install:
Error: URI=file:/D:/opensap/firstapp/application/edmx/ApiProductSrv.edmx Line=1: Document root element "edmx:Edmx", must match DOCTYPE root "null".
Error: URI=file:/D:/opensap/firstapp/application/edmx/ApiProductSrv.edmx Line=1: Document is invalid: no grammar found.
…
[ERROR] Failed to execute goal com.sap.cloud.s4hana.datamodel:odata-generator-maven-plugin:2.19.1:generate (generate-consumption) on project firstapp-application: Execution generate-consumption of goal com.sap.cloud.s4hana.datamodel:odata-generator-maven-plugin:2.1
9.1:generate failed: trying to create the same field twice: Продукт -> [Help 1]
I use the metadata-file obtained at the address /sap/opu/odata/sap/API_PRODUCT_SRV/$metadata, but it contains Russian-language text. For example, in sap-annotations:
<Property Name="Product" Type="Edm.String" Nullable="false" MaxLength="40" sap:display-format="UpperCase" sap:label="Продукт" sap:quickinfo="Номер продукта"/>
When I specify the locale when retrieving the metadata file ($metadata?sap-language=EN), it is possible to generate VDM.
But is it possible to generate correct VDM by metadata-file without special instructions sap-language?
Thanks!
For the generated code the locale does not really matter. Therefore, we suggest you use explicitly the English locale to retrieve the metadata.
The tutorial of the SAP Cloud SDK implicitly assume that the default locale of your system is English.
AFter using b2b_acc recipe, i want to do module gen. like:
ant modulegen -Dinput.module=accelerator -Dinput.name=qqq -Dinput.package=com.fffff.sampa -Dinput.template=develop
but it gives error of
hybris "java.util.regex.PatternSyntaxException": Illegal repetition near index 0 ${YMODULE_TOKEN}(.*)
And there is no information about how to do for b2b.
What can i do? I need to develop a b2b website. Should i use extgen?
Now it gives this:
java.lang.IllegalArgumentException: cannot merge namespace
((fulfilmentprocess)) into (()) due to duplicate attribute
'ConsignmentProcess.done(java.lang.Boolean):((fulfilmentprocess))::YAttributeDescriptor[fulfilmentprocess-items.xml:18(AttributeTagListener)][PROPERTY]'
vs
'ConsignmentProcess.done(java.lang.Boolean):((yacceleratorfulfilmentprocess))::YAttributeDescriptor[yacceleratorfulfilmentprocess-items.xml:18(AttributeTagListener)][PROPERTY]'
When you are creating your custom extension using modulegen, you should delete existing template extension as well in your localextension.properties file.
Remove any of the following extensions that might appear in your localextensions.xml file
yacceleratorcore
yacceleratorfacades
yacceleratorstorefront
yacceleratorinitialdata
yacceleratortest
yacceleratorcockpits
yacceleratorfulfilmentproces
Read Here for more details on how to customize Accelerator using modulegen :
https://help.hybris.com/6.6.0/hcd/8ace75c786691014a5e9dcafa29d5410.html
Removing yacceleratorbackoffice work for me.
This issue is version-dependent but try removing yacceleratorfulfilmentproces or yacceleratorbackoffice from localextensions.xml and that may help.