Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while adding a public link #763

Closed
RainerEmrich opened this issue Jan 21, 2020 · 8 comments
Closed

Error while adding a public link #763

RainerEmrich opened this issue Jan 21, 2020 · 8 comments
Assignees
Labels
Milestone

Comments

@RainerEmrich
Copy link

What is going wrong?

I try to add a public link in details/share. This doesn't work. Pop up saying: "Error while adding share"
In the nextcloud log I get:
{"reqId":"XXXXXXXXXXXXXXX","level":3,"time":"2020-01-21T15:02:37+00:00","remoteAddr":"XXXXXXXX","user":"XXXXX","app":"PHP","method":"POST","url":"/index.php/apps/polls/share/write/","message":"Undefined index: userEmail at /var/www/nc_01/nextcloud/apps/polls/lib/Controller/ShareController.php#156","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0","version":"17.0.2.1"}

Information about your polls installation

Polls version? (see apps page)
Version 1.0.0 updated from 0.10.4.
Updated from Appstore.

Information about your Instance of Nextcloud/ownCloud

Nextcloud 17.0.2

@tmlmt
Copy link

tmlmt commented Jan 21, 2020

Same issue here. Popup saying "Error while adding share".
Nextcloud 17.0.2 / Polls 1.0.0 / Firefox 68.0.2 ESR on Windows 10

Network tool says the POST payload sent it:
{"pollId":3,"share":{"type":"public","userId":"","pollId":3,"token":""}}
which returns an empty response

@dartcafe
Copy link
Collaborator

That's strange, I checked the code and the userEmail is set every time. I will debug again and add a check, to avoid this error.

@dartcafe dartcafe self-assigned this Jan 21, 2020
@dartcafe dartcafe added this to the 1.1 milestone Jan 21, 2020
@dartcafe dartcafe added the bug label Jan 21, 2020
@RainerEmrich
Copy link
Author

RainerEmrich commented Jan 21, 2020

For Invitations it's the same. You try to invite some user or contact, same issue.:-(

@dartcafe
Copy link
Collaborator

Something's wrong under the sun. I cannot reproduce that behavior. Anyway, I added a fix. Update is expected shortly.

@xadium
Copy link

xadium commented Jan 22, 2020

HI

I looked at the fix in the commit and implemented the fix to ShareController.php on my instance (as per my comment in #748 )

The line in the commit including the comma explodes Nextcloud - 'unexpected ('

$newShare->setUserEmail(isset($share['userEmail']) ? $share['userEmail'] : '' , );

the line without the comma has no effect on the issue:

$newShare->setUserEmail(isset($share['userEmail']) ? $share['userEmail'] : '');

I think something else is going on here...

@dartcafe
Copy link
Collaborator

Arrg. F***. Thanks for review. The problem is, I cannot reproduce this error. Of course the comma is a bug. I'll look after this issue.

@dartcafe

This comment has been minimized.

@dartcafe
Copy link
Collaborator

This stays hope. Now user shares have a bug. Stay tuned. I will fix this this evenling. Sorry for inconvenience

@dartcafe dartcafe reopened this Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants