cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SmartEdit on Hybris 6.6 -

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes
1,645

When accessing SmartEdit on a 6.6 Hybris instance you'll get several frontend issues (CSS not loading, etc), making the whole interface partially not working and throwing this error on console:

org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized.

This is due to wrong Spring paths generated like below https://dev.local:9002/smartedit/static-resources/dist/smartedit//fonts/hyicon.woff?1509480052

(note the 2 slashes "//" before "fonts")

This is due to Spring StrictHttpFirewall

https://github.com/spring-projects/spring-security/issues/5044

https://github.com/spring-projects/spring-security/issues/5007

This is definitely something that needs to be addressed by Hybris, since the URL shouldn't be generated in such a wrong way. From a quick analysis URL was always generated in such a wrong way (ie. in 6.5.0.3 it was generated like this too) but due to the Spring StrictHttpFirewall they're not allowed anymore.

In order to fix it temporarily:

 StrictHttpFirewall.setAllowUrlEncodedSlash(true)

or revert to HttpFirewall

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

For me it works, when I remove the slash in the variable "hytech-path" in the following files:

  • /ext-content/npmancillary/resources/npm/node_modules/techne/src/less/styles.less

  • /ext-content/smartedit/web/app/smartedit/styling/variables.less

After rebuild the project, everything looks fine and no exceptions in the log file.

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes

this seems like a much cleaner workaround, thanks !

Answers (4)

Answers (4)

David_A_C
Participant
0 Likes

it Works! I used 6.4 spring security version. Thx

Former Member
0 Likes

Fixed in 6.6 patch 6

David_A_C
Participant
0 Likes

I have the same problem in 6.6.0.3 triying to setup a B2B acc recipe

I've found that

 <bean id="smarteditaddonCoreDataImportedEventListener" parent="abstractCoreDataImportedEventListener">
         <property name="supportedChannels">
             <list value-type="de.hybris.platform.commerceservices.enums.SiteChannel">
                 <value>B2C</value>
                 <!--
                                 <value>B2B</value>
                 -->
             </list>
         </property>
 ....


Former Member
0 Likes

We are facing problem on SAP Cloud server where nodemodule is not installed and hence, when we do ant clean all js, css are not getting generated

Former Member
0 Likes

[echo] FAILED to call grunt packageSkipTests on D:\Hybris-6.4\hybris\bin\ext-content\smartedit, node modules not found at D:\Hybris-6.4\hybris\bin\ext-content\npmancillary\resources\npm\node_modules

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes

we don't face such issue, sorry

Former Member
0 Likes

If you are using Hybris 6.4 (I see 6.4 in the path you mentioned) then npmancillary has the commited "binaries" in it. If you are using 6.6, then you should only need node_modules if you are doing a development build. In this case you should first run "ant npminstall"

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes

Attached raw/simple commit to temporarily fix the issue rawcommit-hybris-66-smartedit-bugfix.zip