Hippo implementation Google analytics broken after update 10.2

71 views
Skip to first unread message

Michel Drenthe

unread,
Feb 9, 2016, 3:51:42 AM2/9/16
to Hippo Community
Hello Hippo crew,


In Hippo 10.2 i can't upload the P12 key.
The problem i run into there isn't a option to add the property that binary anymore.

Further analyzing what gets added to the website i noticed the analytics url is ending with: ga.js

Cheers,

Michel Drenthe

marijan milicevic

unread,
Feb 9, 2016, 5:12:50 AM2/9/16
to hippo-c...@googlegroups.com
Hi,

On Tue, Feb 9, 2016 at 9:51 AM, Michel Drenthe <m.dr...@gmail.com> wrote:
Hello Hippo crew,


In Hippo 10.2 i can't upload the P12 key.
The problem i run into there isn't a option to add the property that binary anymore.


what do you mean by this? I just checked and adding hippogoogleanalytics:privateKey property properly creates Binary property:





 
Further analyzing what gets added to the website i noticed the analytics url is ending with: ga.js


as far as I know, you can change url/js files to whatever you want, example shows:
 <@hst.link var="googleAnalytics" path="/resources/google-analytics.js"/>

cheers
marijan

 
Cheers,

Michel Drenthe

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Michel Drenthe

unread,
Feb 9, 2016, 5:42:39 AM2/9/16
to Hippo Community
After a fresh build en no storage it worked again.










The screenshot above is without: hippogoogleanalytics:privateKey yesterday i didn't get it to change. Wanted to selected it form the list where it don't exist.

Another problem i got with the field is when I upload my key and let it export it as xml it can't get it loaded again at startup getting the following stacktrace twice:

[INFO] [talledLocalContainer] [Fatal Error] googleAnalyticsConfiguration.xml:7:25: Character reference "&#2" is an invalid XML character.
[INFO] [talledLocalContainer] 11:27:39 ERROR Failed to read content resource configuration/modules/googleAnalyticsConfiguration.xml as xml.
[INFO] [talledLocalContainer] org.xml.sax.SAXParseException; systemId: file:***/bootstrap/configuration/src/main/resources/configuration/modules/googleAnalyticsConfiguration.xml; lineNumber: 7; columnNumber: 25; Character reference "&#2" is an invalid XML character.
[INFO] [talledLocalContainer] at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
[INFO] [talledLocalContainer] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
[INFO] [talledLocalContainer] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.InitializeItem.initContentResourceValues(InitializeItem.java:213)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.InitializeItem.getContextPath(InitializeItem.java:114)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.InitializeItemRegistry.addInitializeItem(InitializeItemRegistry.java:123)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.Extension.parseDomDocument(Extension.java:117)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.Extension.<init>(Extension.java:71)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.Module.<init>(Module.java:46)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.EventProcessor.<init>(EventProcessor.java:125)
[INFO] [talledLocalContainer] at org.onehippo.cms7.autoexport.AutoExportModule.initialize(AutoExportModule.java:62)
[INFO] [talledLocalContainer] at org.onehippo.repository.modules.ModuleManager.startModule(ModuleManager.java:150)
[INFO] [talledLocalContainer] at org.onehippo.repository.modules.ModuleManager.startModules(ModuleManager.java:121)
[INFO] [talledLocalContainer] at org.onehippo.repository.modules.ModuleManager.start(ModuleManager.java:63)
[INFO] [talledLocalContainer] at org.hippoecm.repository.LocalHippoRepository.initialize(LocalHippoRepository.java:296)
[INFO] [talledLocalContainer] at org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:118)
[INFO] [talledLocalContainer] at org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:108)
[INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:497)
[INFO] [talledLocalContainer] at org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:178)
[INFO] [talledLocalContainer] at org.hippoecm.repository.RepositoryServlet.init(RepositoryServlet.java:189)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4914)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)

Cheers,

Michel Drenthe

Jasper Floor

unread,
Feb 9, 2016, 6:05:05 AM2/9/16
to Hippo Community
Hi,

the options for type are sensitive to the types it thinks it can handle. I have noticed that if you already have a hippogoogleanalytics:privateKey property then it won't offer the choice for binary or show up in the list. If it isn't there then it should work. This seems to be the case when I tested it.

Not sure about that error. Are you saying you use the xml export feature from the cms? In that case it may be a bug. Please make an issue in Jira. Also please if possible include a file that makes this error.

mvg,
Jasper

--

Michel Drenthe

unread,
Feb 9, 2016, 6:31:49 AM2/9/16
to Hippo Community
Given the first 20 chars of the export of the property field:
When using the link XML export:
MIIJqAIBAzCCCWIGCSqG

The auto export generates:
0� �&#2;&#1;&#3;0� b

That would explain a lot.

Op dinsdag 9 februari 2016 12:05:05 UTC+1 schreef Jasper Floor:

marijan milicevic

unread,
Feb 9, 2016, 6:36:03 AM2/9/16
to hippo-c...@googlegroups.com
Hi,
On Tue, Feb 9, 2016 at 12:31 PM, Michel Drenthe <m.dr...@gmail.com> wrote:
Given the first 20 chars of the export of the property field:
When using the link XML export:
MIIJqAIBAzCCCWIGCSqG

The auto export generates:
0� �&#2;&#1;&#3;0� b

That would explain a lot.


Is file exported part of a project which is open in an IDE (e.g. Intellij/Netbeans/Eclipse?)
I am asking because it happened to me in the past that IDE would convert file into different character set,
cheers
marijan

Michel Drenthe

unread,
Feb 9, 2016, 7:05:10 AM2/9/16
to Hippo Community
Yes I have IntelliJ 14 open at that moment (Windows 10).
And hippo is running from IntelliJ run command (mvn -Pcargo.run -Pjrebel -Drepo.path=storage)
JDK 1.8.0_71 (no public JRE installed)

Op dinsdag 9 februari 2016 12:36:03 UTC+1 schreef marijan milicevic:

marijan milicevic

unread,
Feb 9, 2016, 8:20:50 AM2/9/16
to hippo-c...@googlegroups.com
On Tue, Feb 9, 2016 at 1:05 PM, Michel Drenthe <m.dr...@gmail.com> wrote:
Yes I have IntelliJ 14 open at that moment (Windows 10).
And hippo is running from IntelliJ run command (mvn -Pcargo.run -Pjrebel -Drepo.path=storage)
JDK 1.8.0_71 (no public JRE installed)


ok, could you and see if following works:
1) Go to Hippo Console and disable auto export (temporary) 
2) Export affected node to a folder which is located outside of Intellij folder
3) Delete affected node, save session and try to import XML from step 2) 

If you still get the error, please file a bug report so we can look into it,

Michel Drenthe

unread,
Feb 10, 2016, 4:33:44 AM2/10/16
to Hippo Community
Hi Marijan,

Looking at your steps it will not be the same use case.
1) Will result in no auto export
2) With the 2 examples given we know it is different output
3) Import correct XML into JCR will result in valid node (I agree when this won't work. There is a need for an issue)

After have seen the different outputs I just copy the valid content in the already created XML inside bootstrap/configuration.
Resulting in expected behavior.

The original case would be:
pre: have IDE open and run your project from IDE

1) add binary field
2) upload p12 key
3) hit "Write changes to repository"

results into invalid XML export.

Because this might be development environment dependent I accept the solution where XML export needs to be used.

marijan milicevic

unread,
Feb 10, 2016, 4:56:04 AM2/10/16
to hippo-c...@googlegroups.com
Hi,

I am bit lost at what you are describing here. 
Whole point was to see if auto export produces invalid XML or not and if Intellij is screwing it up. 
In the latter case, there is no much we (as Hippo) can do about. 
cheers,
marijan

Michel Drenthe

unread,
Feb 10, 2016, 7:56:42 AM2/10/16
to Hippo Community
Hi Marijan,

Inside the googleAnalytics node:
After uploading the P12 key and hit Write to repository open the XML found in booststrap/configuration:
0� �&#2;&#1;&#3;0� b

When using the still not closed console/hippo using the XML export link it will produce a XML containing
MIIJqAIBAzCCCWIGCSqG

Now to the guide:
1) Go to Hippo Console and disable auto export (temporary)
-- it will not create the file inside the boostrap/configuration

2) Export affected node to a folder which is located outside of Intellij folder
-- This is a valid the XML file

3) Delete affected node, save session and try to import XML from step 2) 
-- The file inside bootstrap/configuration is XML uploaded
-- This is just like all other XML imports with valid structures in them.
-- All field are just Strings no special action needed around the binary when it was the original file uploaded

Whats happens when I press "Write to repository" with export on:
When I created the node where I uploaded the file?
When I created the node from a XML import?

Will the "Write to repository" during export on just write the file created in XML export or does it have it own sub-routine?

Cheers,

Michel Drenthe

marijan milicevic

unread,
Feb 10, 2016, 8:10:32 AM2/10/16
to hippo-c...@googlegroups.com
Hi,

On Wed, Feb 10, 2016 at 1:56 PM, Michel Drenthe <m.dr...@gmail.com> wrote:
Hi Marijan,

Inside the googleAnalytics node:
After uploading the P12 key and hit Write to repository open the XML found in booststrap/configuration:
0� �&#2;&#1;&#3;0� b

When using the still not closed console/hippo using the XML export link it will produce a XML containing
MIIJqAIBAzCCCWIGCSqG

Now to the guide:
1) Go to Hippo Console and disable auto export (temporary)
-- it will not create the file inside the boostrap/configuration

2) Export affected node to a folder which is located outside of Intellij folder
-- This is a valid the XML file

3) Delete affected node, save session and try to import XML from step 2) 
-- The file inside bootstrap/configuration is XML uploaded
-- This is just like all other XML imports with valid structures in them.
-- All field are just Strings no special action needed around the binary when it was the original file uploaded


thx for detailed description testing. 
 
Whats happens when I press "Write to repository" with export on:
When I created the node where I uploaded the file?
When I created the node from a XML import?

Will the "Write to repository" during export on just write the file created in XML export or does it have it own sub-routine?


I think my assumption that Intellij is messing with stuff is correct, so, to answer your question: 
auto-export is not a problem here (you can test it by closing Intellij, importing your key and checking autoexported file).
A while ago I had pretty much same problem with some security certificates which Idea encoded wrongly. 
I solved it by removing affected files from maven filtering [1], you could give it a try,
cheers
marijan





 
Cheers,

Michel Drenthe

marcelo...@xintec.cl

unread,
May 24, 2016, 4:37:28 PM5/24/16
to Hippo Community
Hello.

How did you solve this?

---------------------
Further analyzing what gets added to the website i noticed the analytics url is ending with: ga.js
---------------------

Thanks in advanced.
Marcelo.
Reply all
Reply to author
Forward
0 new messages