<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Out-of-the-box WRO configuration not storefront-specific: doesn't work when running multiple storefronts in CRM and CX Q&amp;A</title>
    <link>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaa-p/12038043#M399066</link>
    <description>&lt;P&gt;Hi, I think the clean solution is as you mentioned, having storefront specific properties for each storefront extension.&lt;/P&gt;
&lt;P&gt;I don't think this approach is a "hacking way", since its just a property change. Just change the name of the property in ConfigWro4jBeforeViewHandler and you're good to go. Hope it helps!&lt;/P&gt;
&lt;P&gt;Cheers!
&lt;/P&gt;</description>
    <pubDate>Fri, 25 May 2018 19:32:03 GMT</pubDate>
    <dc:creator>former_member1014349</dc:creator>
    <dc:date>2018-05-25T19:32:03Z</dc:date>
    <item>
      <title>Out-of-the-box WRO configuration not storefront-specific: doesn't work when running multiple storefronts</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaq-p/12038042</link>
      <description>&lt;P&gt;We are running a configuration with multiple hybris 6.7 storefront applications, each having its own "storefront" extension.&lt;/P&gt;
&lt;P&gt;Each storefront has its own set of addons installed (b2b, b2c). 
With each addon, comes a set of js and css files that the storefront then relies on.
On top of that, the hybris-made wrapper for WRO4J is supposed to group together and compress these web resources(css/js).&lt;/P&gt;
&lt;P&gt;We have had issues on &lt;STRONG&gt;one B2B storefront not importing expected js resources&lt;/STRONG&gt;, to realize that &lt;STRONG&gt;web resources were fetched from another (B2C) storefront&lt;/STRONG&gt;, thus lacking b2b-specific resources (js in our current case).
The generated wro model processed by the wro &lt;EM&gt;ResourceBundleProcessor&lt;/EM&gt; was also the one from the B2C storefront.&lt;/P&gt;
&lt;P&gt;Our conclusion is that out-of-the-box, wro configuration not working on multiple storefront.&lt;/P&gt;
&lt;P&gt;2 reasons (at least) have been identified (so far):&lt;/P&gt;
 &lt;OL&gt;
  &lt;LI&gt;&lt;P&gt; The property &lt;STRONG&gt;&lt;EM&gt;storefront.wro4j.enabled&lt;/EM&gt;&lt;/STRONG&gt; to enable WRO processing &lt;STRONG&gt;is not storefront-specific&lt;/STRONG&gt;: if storefronts use different settings, you can't know which setting will be applied&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; WRO processing is based on the file storefront-extensions own wro.xml but &lt;STRONG&gt;the way this wro.xml is dynamically fetched is not storefront-specific&lt;/STRONG&gt;: the css/js resources from addons are imported by a directive:     classpath:wro_addons.xml. Obvisously, that is not ok when having multiple storefront, as you can't know for sure which model(wro.xml) will be fetched having multiple resources of the same name &lt;EM&gt;in the classpath&lt;/EM&gt;. WRO allows a servletContext aware type of import, which unfortunately is of no use here as the wro_addons.xml file is not part of the web context (it is placed in the resources folder)&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/OL&gt;
&lt;P&gt;We haven't identified a clean - ie: 100% out-of-the-box 0% hybris hacking- way of solving this issue. 
The "hacking way" of solving the issue is obviously to ensure &lt;/P&gt;
 &lt;UL&gt;
  &lt;LI&gt;&lt;P&gt; that each storefront has it own properties and 
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; that each storefront has its own uniquely-identified model(wro.xml) including uniquely-identified wro_addons resources (by naming them differently or by copy-pasting them at an appropriate place)&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/UL&gt;
&lt;P&gt;Have you experienced this issue yourself?
Did you guys find a &lt;STRONG&gt;&lt;EM&gt;"clean"&lt;/EM&gt;&lt;/STRONG&gt; way of solving this issue?&lt;/P&gt;
&lt;P&gt;Thanks for your feedback!&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 16:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaq-p/12038042</guid>
      <dc:creator>abderzakeboufeta</dc:creator>
      <dc:date>2018-05-25T16:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Out-of-the-box WRO configuration not storefront-specific: doesn't work when running multiple storefronts</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaa-p/12038043#M399066</link>
      <description>&lt;P&gt;Hi, I think the clean solution is as you mentioned, having storefront specific properties for each storefront extension.&lt;/P&gt;
&lt;P&gt;I don't think this approach is a "hacking way", since its just a property change. Just change the name of the property in ConfigWro4jBeforeViewHandler and you're good to go. Hope it helps!&lt;/P&gt;
&lt;P&gt;Cheers!
&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 19:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaa-p/12038043#M399066</guid>
      <dc:creator>former_member1014349</dc:creator>
      <dc:date>2018-05-25T19:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Out-of-the-box WRO configuration not storefront-specific: doesn't work when running multiple storefronts</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaa-p/12038044#M399067</link>
      <description>&lt;P&gt;Hi  @&lt;SPAN class="mention-scrubbed"&gt;abderzakeboufeta&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;May I know the solution of the problem where it is fetching resources from the B2C storefront path for B2B Storefront?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 19:41:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/out-of-the-box-wro-configuration-not-storefront-specific-doesn-t-work-when/qaa-p/12038044#M399067</guid>
      <dc:creator>former_member570877</dc:creator>
      <dc:date>2020-01-13T19:41:38Z</dc:date>
    </item>
  </channel>
</rss>

