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

How to set a custom Webroot for smartedit?

Former Member
0 Likes
1,065

Hi,

I want to customize for smartedit the webroot to have it like for example /custom/smartedit.

I tried smartedit.webroot= /custom/smartedit and some other variations, but this didn't worked.

How could I do this?

BR Goran

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Likes

Update with 2005 version and following major release should be similar

  1. Update SMARTEDIT_ROOT value from‘smartedit’to‘youredit’in hybris/bin/modules/smartedit/smartedit/web/app/common/services/rest/resourceLocations.ts
  2. In resourceLocations.ts, several constants import fromsmarteditconstants.ts, such as SMARTEDIT_RESOURCE_URI_REGEXP,CONFIGURATION_URI,SETTINGS_URI,SSO_OAUTH2_AUTHENTICATION_ENTRY_POINT, replace the value‘/smartedit/’ to‘/youredit/’
  3. Addsmartedit.webroot=/youreditin local.properties
  4. Executeant clean allunder platform folder, then ./hybrissever.sh

0 Likes

Hi,

add properties in local.properties

smartedit.webroot=/customedit
then do "ant deploy"

Now Replace "smartedit" with "customedit" (or give your custom name) in below file
FileName: resourceLocations.ts (you will find this file in 2 localtion. update values in both)

Values to be updated:

Original Values:
.constant('SMARTEDIT_ROOT', 'smartedit')
.constant('SMARTEDIT_RESOURCE_URI_REGEXP', /^(.*)\/smartedit/)
.constant('CONFIGURATION_URI', '/smartedit/configuration/:key')
.constant('CONFIGURATION_COLLECTION_URI', '/smartedit/configuration')

Update Values:
.constant('SMARTEDIT_ROOT', 'customedit')
.constant('SMARTEDIT_RESOURCE_URI_REGEXP', /^(.*)\/customedit/)
.constant('CONFIGURATION_URI', '/customedit/configuration/:key')
.constant('CONFIGURATION_COLLECTION_URI', '/customedit/configuration')

Also update "smarteditcommons.js" (there are 2 file with this name on different location. update in both file)
search for above properties and do the same replacement.

Now open "https://localhost:9002/customedit"

VinayKumarS
Active Contributor
0 Likes

The other option is go to your smartedit extensioninfo.xml which is in /hybris/bin/ext-content/smartedit/extenioninfo.xml ->

 <webmodule jspcompile="false" webroot="/custom/smartedit"/>
 


This will surely work without any problem 🙂

VinayKumarS
Active Contributor
0 Likes

this is working for me

Former Member
0 Likes

This didn't worked for me I get following error:

thirdparties.js:114 GET https://localhost:9012/smartedit/configuration 404 (Not Found)

Former Member
0 Likes

Yes I added it in the local.properties, but it won't open the smartedit. The webroot is set, as I saw it in the hac Configuration Properties. In the stack trace are no errors.

VinayKumarS
Active Contributor
0 Likes

by default smart edit has some issues before updating the webroot. does your smartedit is working. which version of hybris you are using. Can you please try the new webroot in IE, CHROME and FIREFOX?

Former Member
0 Likes

I am using Hybris version 6.6. I tried it in IE, Chrome and Firefox and didn't got a result.

VinayKumarS
Active Contributor
0 Likes

Have you added this in local.properties??

smartedit.webroot=/custom/smartedit