Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Granite.I18n.get() language JSON lookup gets 404 when using contextpath

Avatar

Avatar
Validate 10
Level 3
joell91868939
Level 3

Likes

6 likes

Total Posts

55 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 3
joell91868939
Level 3

Likes

6 likes

Total Posts

55 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
joell91868939
Level 3

10-08-2017

AEM: 6.2 SP1 CFP4

OS: Windows 7 Enterprise

Start script: java -XX:MaxPermSize=256m -Xmx1024m -jar cq5-author-p4502.jar -Dsling.run.modes=author,nosamplecontent -contextpath webforms

Issue: When I use "-contextpath webforms", Granite translation no longer works. JSON gets 404.

Details:

We have a JSP outside of AEM (we pass Granite into JSP):

(function(document, $, Granite, util, HTTP) {

...

>> Granite.I18n.get(errorCode)

English and French have JSON registered as jcr:language "en", and jcr:mixinTypes "mix:language"

***This works fine when there is no contextpath. French translation works***

But the json lookup for en/fr gets a 404 when there is a contextpath.

Suggestions? Some config I am missing for the contextpath during translations???\

Thanks,

Joel

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

11-08-2017

"We have a JSP outside of AEM" - do you mean that this JSP is not in the JCR repository?

Avatar

Avatar
Validate 10
Level 3
joell91868939
Level 3

Likes

6 likes

Total Posts

55 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 3
joell91868939
Level 3

Likes

6 likes

Total Posts

55 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
joell91868939
Level 3

21-08-2017

The JSP is outside the repository.

We connect to the form from outside AEM. We register for the submit events and talk to guidebridge.

We pass Granite into the JS on the JSP.