otetard / ownpad

Ownpad is a Nextcloud application that allows to create and open Etherpad and Ethercalc documents.
GNU Affero General Public License v3.0
58 stars 24 forks source link

Ownpad shows just link to pad #18

Closed Manuelibt closed 7 years ago

Manuelibt commented 7 years ago

Hi, --this is another nextcloud installation than mentioned in the issue before..-- the image shows my problem better than i coul explain. After hovering over the filename it shows the destination and opens ist after clicking. sorry I´m no native speaker;)

pad

GregSutcliffe commented 7 years ago

I'm seeing the same thing. I'm new to OwnPad, so I don't know if this is expected behaviour or not. I was expecting the pad to load in a frame within Nextcloud - instead it's a clickable link as per @Manuelibt's screenshot.

I'm testing on Nextcloud 1.11.0.1 with OwnPad 0.5.7 (running on ArchLinux), and I've tested from an ArchLinux laptop using Firefox 51.0.1, Konqueror 5.0.97, and Brave 0.13.4 - all give the same result. Happy to provide more debug output if you need it.

g3n35i5 commented 7 years ago

I'm having the same issue here. Etherpad is working proberly and when i'm clicking on File > + > Pad i get this screen. If you have a look at the etherpad log while doing this, you will notice, that no pad gets created on Etherpad till you manually open the url in a second tab/window. So obviously, nextcloud resp. ownpad is not able to access the Etherpad instance.

Is there any workaround yet or did i/we failed during the ownpad setup?

otetard commented 7 years ago

Hi,

Sorry for the late answer.

Can you tell me if there are any errors in your browser’s console log? What happens if you try to access this page: https://ncinstance/index.php/apps/ownpad/?file=Ahh.pad&dir=%2F (after you created the file Ahh.pad in your root directory)? Can you paste (in private if you prefer) the HTML code that is returned by Ownpad?

Thanks.

Olivier;

g3n35i5 commented 7 years ago

@otetard Thank you for your reply. This is my console output when i create a pad via ownpad and then open it with a click in nextcloud:

Content Security Policy: The page’s settings blocked the loading of a resource at https://[mydomain]apps/ownpad/0.0.0.0:9005/p/i50FwAHIAbdI6N5u (“frame-src https://[mydomain] https://0.0.0.0:9005”).

When i create the pad "Ahh.pad" via [mydomain]:9005 this is my html return:

<!DOCTYPE html>
<html style="height: 100%;">
  <head>
    <link rel="stylesheet" href="/apps/ownpad/css/ownpad.css?v=0.5.7"/>
  </head>
  <body style="margin: 0px; padding: 0px; overflow: hidden; bottom: 37px; top: 0px; left: 0px; right: 0px; position: absolute;">
    <div id="filetopad_bar">
      <span>Title</span><strong>Ahh.pad</strong><span><a target="_parent" href=""></a></span><a id="filetopad_close">x</a>
    </div>
    <iframe frameborder="0" id="filetopad_frame" style="overflow:hidden;width:100%;height:100%;display:block;" height="100%" width="100%" src=""></iframe>    
  </body>
</html>

Best regards, g3n35i5

ghost commented 7 years ago

I'm facing a similar issue.

@otetard if i visit https://ncinstance/index.php/apps/ownpad/?file=Ahh.pad&dir=%2F (obviously after the creation of the file "Ahh.pad" in the root folder) I get this:

05-13-2017-03-15_1366x768

I've done a clean install of nextcloud and ownpad. I'll try again with an older version

Teasie commented 7 years ago

Hello, I installed ownpad in my nextcloud too and had the same issue here explained.

Teasie commented 7 years ago

I tried the same installation on an Owncloud and the result is the same :-((

otetard commented 7 years ago

From what I can see on @g3n35i5’s log, the problem comes from the way you configured your Etherpad instance in Ownpad. You need to add the full URL to your Etherpad instance, including the schema. For example : https://mensuel.framapad.org.

Teasie commented 7 years ago

Hi, the URL from my Host is https://xyzabc.de/nextcloud, here I put my Ownpad in the apps folder. What is the URL of my Etherpad instance? Sorry of this I am not a Pro.

GregSutcliffe commented 7 years ago

Sorry for the delay @otetard - here's my debugging.

Firstly, I am using a full URL in /settings/admin/additional -> Collaborative documents. Specifically, it's http://fqdn.of.my.ethpad:9001

Opening https://my.nextcloud.instance/index.php/apps/ownpad/?file=Shopping.pad&dir=%2F doesn't show a lot:

<!DOCTYPE html>
<html style="height: 100%;">
  <head>
    <link rel="stylesheet" href="/nextcloud/apps/ownpad/css/ownpad.css?v=0.5.7"/>
  </head>
  <body style="margin: 0px; padding: 0px; overflow: hidden; bottom: 37px; top: 0px; left: 0px; right: 0px; position: absolute;">
    <div id="filetopad_bar">
      <span>Title</span><strong>Shopping.pad</strong><span><a target="_parent" href=""></a></span><a id="filetopad_close">x</a>
    </div>
    <iframe frameborder="0" id="filetopad_frame" style="overflow:hidden;width:100%;height:100%;display:block;" height="100%" width="100%" src=""></iframe>    
  </body>
</html>

I note the href target is empty. If I open the file from the files view (/index.php/apps/files/?dir=/&fileid=2) then it's slightly different:

<body style="margin: 0px; padding: 0px; overflow: hidden; bottom: 37px; top: 0px; left: 0px; right: 0px; position: absolute;">
    <div id="filetopad_bar">
      <span>Title</span><strong>shopping.pad</strong><span><a target="_parent" href="http://fqdn.of.my.etherpad:9001/p/shopping">http://fqdn.of.my.etherpad:9001/p/shopping</a></span><a id="filetopad_close">x</a>
    </div>
    <iframe id="filetopad_frame" style="overflow:hidden;width:100%;height:100%;display:block;" src="http://fqdn.of.my.etherpad:9001/p/shopping" width="100%" height="100%" frameborder="0"></iframe>    
</body>

I do see a CSP violation on the console due to mixed schema content - my Nextcloud is on https, my etherpad is a docker container on http. Not sure if that's the cause, but I can always drop an Apache vhost with SSL infront of the docker image for testing, I guess.

otetard commented 7 years ago

Hi!

Sorry for the late answer.

Is your Etherpad instance accessible in a new browser tab?

Ownpad does not embed Etherpad nor communicate with it. It simply opens a new iframe with an Etherpad document. In your case, it opens http://fqdn.of.my.etherpad:9001/p/shopping. In order to make it work, you really need to make your EP instance accessible through HTTPS to prevent your browser from blocking mixed content (there’s nothing we can do to bypass that blocking).

Olivier;

GregSutcliffe commented 7 years ago

Using an HTTPS etherpad with Nextcloud 12 and Ownpad 0.5.9 seems to have resolved the issue for me - thanks! I'll see about getting HTTPS on my internal pad ;)

Manuelibt commented 7 years ago

my EP is accessible through https but still the same result