Link to the folder/file is broken/wrong in the email sent via internal share. #23197

Closed
imjalpreet opened this Issue Mar 13, 2016 · 8 comments

Projects

None yet

6 participants

@imjalpreet
Member

Steps to reproduce

As a logged-in user,

  1. Try to share a folder with another ownCloud user(i.e., via internal share).
  2. Notify that user via email by selecting that check-box.

Expected behaviour

The ownCloud user should receive a mail such as the one in the screenshot. The email contains a link to the shared folder/file. On clicking that link, we should be redirected to the respective folder/file in the ownCloud app.

Actual behaviour

The link is broken/wrong. The screenshot is attached.

Server configuration

Operating system: Ubuntu 14.04

Web server: Apache/2.4.7

Database: mysql Ver 14.14 Distrib 5.6.28, for debian-linux-gnu (x86_64)

PHP version: PHP 5.5.9-1ubuntu4.14

ownCloud version: 9.1.0 pre alpha

Where did you install ownCloud from: Git

Signing status (ownCloud 9.0 and above):

Integrity checker has been disabled. Integrity cannot be verified.

List of activated apps:

Enabled:
  - comments: 0.3.0
  - dav: 0.2.1
  - federatedfilesharing: 0.2.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_sharing: 0.10.0
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - gallery: 15.0.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.0
Disabled:
  - encryption
  - files_external
  - testing
  - user_ldap

The content of config/config.php:

{
    "system": {
        "instanceid": "oc4z46udfiog",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost:8080"
        ],
        "datadirectory": "\/var\/www\/GSoC\/data",
        "overwrite.cli.url": "http:\/\/localhost:8080",
        "dbtype": "mysql",
        "version": "9.1.0.0",
        "dbname": "ownCloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "jalpreet.cse",
        "mail_smtpmode": "smtp",
        "mail_domain": "gmail.com",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "smtp.gmail.com",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0
    }
}

Are you using external storage, if yes which one: No

Are you using encryption: no

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Chrome 49.0.2623.75 (64-bit)

Operating system: Ubuntu 14.04

Logs

ownCloud log (data/owncloud.log)

[Log](https://gist.github.com/imjalpreet/2188043ccc6bcfcc487f)

issuecore2
issuecore

@imjalpreet imjalpreet referenced this issue in owncloud/gallery Mar 13, 2016
Merged

Issue #213: No possibility to send an email in share dialog #586

4 of 4 tasks complete
@imjalpreet
Member

Possible Error: /lib/private/share/mailnotifications.php
So, changes are to be done in the above mentioned file, maybe one or two small changes would make it to work.

@oparoz
Contributor
oparoz commented Mar 13, 2016

Interesting, it works when using a real domain (redirected to correct URL), but files/index.php should be /index.php/apps/files/ instead, or a URL without index.php if the server supports it.

What do you think @rullzer ?

@oparoz oparoz added the app:files label Mar 13, 2016
@ghost
ghost commented Mar 13, 2016

Something similar was also reported for the links within the activity feed here:

https://forum.owncloud.org/viewtopic.php?f=38&t=34260

@PVince81 PVince81 added this to the 9.0.1-current-maintenance milestone Mar 14, 2016
@rullzer
Contributor
rullzer commented Mar 14, 2016

Mmmm weird. Let me try to reproduce this (and then hopefullt fix)... seems the url generation is indeed going wrong like @oparoz noticed.

@rullzer rullzer self-assigned this Mar 14, 2016
@LukasReschke
Member

@rullzer My bet is on #23190

We changed to the AppFramework there => index.php is gone and it is now a controller 🙈

@rullzer
Contributor
rullzer commented Mar 14, 2016

@LukasReschke thanks. Let me try the same approach :)

@rullzer rullzer added a commit that referenced this issue Mar 14, 2016
@rullzer rullzer Generate a valid URL for link notification
fixes #23197
ae4af0f
@rullzer rullzer referenced this issue Mar 14, 2016
Merged

Generate a valid URL for link notification #23226

1 of 1 task complete
@rullzer
Contributor
rullzer commented Mar 14, 2016

PR in #23226 with the same fix @LukasReschke used.
Please test.

@oparoz
Contributor
oparoz commented Mar 14, 2016

There are still a couple of those in core should all of them be removed?

https://github.com/owncloud/core/search?utf8=%E2%9C%93&q=Util%3A%3AlinkToAbsolute

@rullzer rullzer added a commit that referenced this issue Mar 14, 2016
@rullzer rullzer Generate a valid URL for link notification
fixes #23197
ba642ce
@rullzer rullzer added a commit that referenced this issue Mar 14, 2016
@rullzer rullzer Generate a valid URL for link notification
fixes #23197

* Updated unit test
8fc0902
@rullzer rullzer added a commit that referenced this issue Mar 15, 2016
@rullzer rullzer Generate a valid URL for link notification
fixes #23197

* Updated unit test
3a5e90f
@rullzer rullzer added a commit that referenced this issue Mar 15, 2016
@rullzer rullzer Generate a valid URL for link notification
fixes #23197

* Updated unit test
1db8207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment