Closed iwkse closed 9 years ago
Hi @iwkse what version of Etherpad are you currently using?
Also have a look at share.log
to make sure you're not hitting the CSRF filter.
Hi @cetra3 As for the version I'm using the latest available on etherpad. About CSRF..mm I will take a deeper look..but from the share.log I see connection refused. I don't have etherpad running on the same server of alfresco..could this be the culprit?
It could be, I would say make sure your endpoint-url
directives in the share-config-custom.xml
is set correctly. The examples given are talking on 127.0.0.1 on port 9001, which may not align with your environment.
I'll give this a crack on 5.0.c
with the latest Etherpad and see whether I can replicate the issue easily.
Yes I was editing this with the right url, actually I dind't use the IP but the name..I guess it should work the same. But for some reason in the share.log it says connection refused. I can access from the browser to that url though and see etherpad.
@iwkse I've updated the project to include a better proxy. Pull down the changes and let me know how you go.
Hi @cetra3 thanks for this, I will test it as soon as possible and let you know. I just want to inform you I got this warning while compiling it.
gradle jar :compileJavaNote: /mnt/wdblue/work/sinusia/alfresco/maven/etherpad-alfresco/share/src/main/java/com/parashift/etherpad/BetterProxyController.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
Laters
Yeah, I got that warning too, I'll look into it but I'm extending a class that's in use by alfresco.
gradle jar :compileJava/mnt/wdblue/work/sinusia/alfresco/maven/etherpad-alfresco/share/src/main/java/com/parashift/etherpad/BetterProxyController.java:148: warning: [deprecation] setStatus(int,String) in HttpServletResponse has been deprecated res.setStatus(HttpServletResponse.SC_UNAUTHORIZED, ^ /mnt/wdblue/work/sinusia/alfresco/maven/etherpad-alfresco/share/src/main/java/com/parashift/etherpad/BetterProxyController.java:202: warning: [deprecation] setStatus(int,String) in HttpServletResponse has been deprecated res.setStatus(HttpServletResponse.SC_UNAUTHORIZED, ^ It seems [0] the implementation of setStatus(int,String) is the deprecated one in favor of the setStatus(int) Since you are raising an error you should use setError instead so you could leave the message. HTH
[0] https://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServletResponse.html
I've pushed changes to address the deprecated warnings if you want to pull them down.
I've also just pushed changes to address that tagName error. Alfresco's inline editor doesn't include <html>
tags which the html importer looks for
Great, thanks @cetra3 Tomorrow I'll be able to test it on my environment but I'm sure everything is going to be okey. I will leave you a feedback. regards
Hi @cetra3 unluckily I have this error.
TypeError: pad.collabClient is null in http://localhost:8080/share/proxy/etherpad/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define at line 253'
do you have an idea about what could it be?
I'm not too sure, but it looks like etherpad is working now, which is great!
I'd say update to the latest version of etherpad, clear your cookies and give it another shot
Yeah! I'm using the git version of etherpad, I googled for that error [0] and it seems to have been into a previous version. I've tried with Chromium and the error is slightly different (before was Firefox):
Uncaught TypeError: Cannot read property 'setChannelState' of null in http://localhost:8080/share/proxy/etherpad/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define at line 254'
This gives a 400 error
Must be around here
Made it to work! It's connected to CSRF policy, must be something wrong in there. I've just disabled it and it just works fine. In the share-config-custom.xml should be both the share-security-config.xml plus the rule for etherpad, right?
Fixed it! I think in the example it's missing replace="true" also for snipped to add in share-config-custom.xml glued to the share-security-config.xml. Adding it now everything is okey
Awesome! Are you talking about this part here in the doco:
<config evaluator="string-compare" condition="CSRFPolicy">
<filter>
<rule>
<request>
<method>POST</method>
<path>/proxy/etherpad/.*</path>
</request>
</rule>
<-- OTHER RULE STATEMENTS FROM share-security-config.xml -->
</filter>
</config>
Should be:
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter>
<rule>
<request>
<method>POST</method>
<path>/proxy/etherpad/.*</path>
</request>
</rule>
<-- OTHER RULE STATEMENTS FROM share-security-config.xml -->
</filter>
</config>
Yeah, exactly like that. How did you include the XML code? :) I tried with code tag but it didn't work.
Ok cool, I'll update the readme so noone else gets caught out. Github uses markdown formatting, it's just 3 backticks (i.e, ```) on their own line before and after code blocks. Download the readme and look at it in notepad for an idea.
Thanks @cetra3
<mode type="ok"/>
Hi @cetra3 sorry for being back :-) Actually I think I found an issue with the plugin but I still didn't understand what is causing this problem. With the etherpad-alfresco JAR the advanced search in Alfresco 5.x is broken. It raises an error as there's an error with the search. Please do you have the chance to test it towards Alfresco 4.x? Regards
Raise as a separate issue from this, I'll have a look
Okey
Hi, I compiled the package and configured it as showed in the page but when I click on edit in Etherpad it open the window and there's the label Loading... and it never shows the etherpad control and text, seems like stuck.
This has been tested on Alfresco 5.0.c community.
Any hints are welcome,
Such logs I think are not related (alfresco creates HTML documents without html,head,body tags)
Logs: [2015-01-15 01:29:10.691] [WARN] ImportHtml - HTML was not properly formed [TypeError: Cannot read property 'tagName' of undefined] TypeError: Cannot read property 'tagName' of undefined at Object.domInterface.nodeTagName (/home/www/etherpad-lite/src/static/js/contentcollector.js:49:15) at isBlockElement (/home/www/etherpad-lite/src/static/js/contentcollector.js:91:31) at Object.cc.collectContent (/home/www/etherpad-lite/src/static/js/contentcollector.js:374:19) at Object.setPadHTML (/home/www/etherpad-lite/src/node/utils/ImportHtml.js:40:8) at /home/www/etherpad-lite/src/node/db/API.js:413:16 at Object.exports.getPad (/home/www/etherpad-lite/src/node/db/PadManager.js:161:5) at /home/www/etherpad-lite/src/node/db/API.js:1108:18 at Object.callback (/home/www/etherpad-lite/src/node/db/PadManager.js:193:7) at /home/www/etherpad-lite/src/node_modules/ueberDB/CloneAndAtomicLayer.js:100:17 at /home/www/etherpad-lite/src/node_modules/ueberDB/CacheAndBufferLayer.js:185:7 [2015-01-15 01:29:10.693] [INFO] API - RESPONSE, setHTML, {"code":0,"message":"ok","data":null}