Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Client Lib Debug Mode Fixes a Javascript Problem

Avatar

Level 3

Hi,

I'm currently having a problem if I view a page as published.

I get a javascript error saying "Uncaught ReferenceError: KmlMapParser is not defined" but if I add "?debugClientLibs=true" to the end of the URL my problem is fixed.

Can anyone explain what is happening here?

Thanks,

Karl

1 Accepted Solution

Avatar

Correct answer by
Level 3

I have sorted this now.

It was a scoping issue that was caused by the different ways the different modes compile the JS.

Thanks,

Karl

View solution in original post

10 Replies

Avatar

Employee

To me the option writes out separate lines in the JS. Can you check that?

Avatar

Level 3

Do you mean that the Javascript isn't compressed?

Thanks,

Karl

Avatar

Level 3

How long do we usually have to wait for an answer?

Thanks,

Karl

Avatar

Employee

Missed your previous answer, my bad :-)

The option "debugClientLibs=true" is not compressing, but it writes out files one by one in the HTML source.

And around the wait-time: this is a community forum with SLA :-)

Avatar

Level 3

I thought that about the community but I wasn't sure how active it was that's all.

I don't have my local site to compress the JS even without the Debug mode activated.

Everything seems to look like it's in the correct order.

I'll keep checking but it just seems weird how it works in Debug mode.

Thanks,

Karl

Avatar

Employee

Compressing is done via the minify option via the OSGi-configuation

Avatar

Level 3

Thank you but my code isn't compressing right now and I don't think it should be doing on my local version.

Thanks,

Karl

Avatar

Level 10

Community can respond right away or may take a bit of time - that is the nature of community.

Avatar

Correct answer by
Level 3

I have sorted this now.

It was a scoping issue that was caused by the different ways the different modes compile the JS.

Thanks,

Karl