Polls: continuous reload for public links

Created on 27 Oct 2016  ·  41Comments  ·  Source: nextcloud/polls

Polls Version: 0.7.2.1
NC Version: 10.0.1

Continuous reload does occur if polls will be accessed by public link without logon/user account.

Browser: Chrome 54.0.2840.71
2016-10-27-polls-reload-error_chrome

Browser: MS Edge
2016-10-27-polls-reload-error_edge

Browser: MS IE11
2016-10-27-polls-reload-error_ie11

bug

All 41 comments

I'll have a look at it this weekend. Are your screenshots from different browsers? Does this occur on all browsers? Or is there anything in the screenshots I missed? :smile:

@v1r0x have updated original post with information about the different browser engines.

Thanks for your support!

Does this only happen in IE11? Or in Edge/Chrome as well?

:-) it does happen on all the Browser Versions mentioned above.
I tried several other client computer in the same and in remote/other networks and all behave the same way.

The error message in the top is an indicator for the continuous reload problem.
-> translated: "Problem while loading the website. Website will be reloaded in 5 seconds."

I'm from germany, but thanks :wink:
I thought you refer to the "Waiting for" in IE11.

Is there anything in the oc/nc logfile? And does it happen for all (e.g. new) public polls?

... ok - there has no log entry created while doing the following actions:

  • delete old poll
  • setup new poll (public)
  • open public poll as anonymous/not logged in user and faced the reload problem

As there does not exist any "old" poll i've no possibility to check this scenario.

Thanks for your investigation!

Did you check owncloud.log and nextcloud.log (If you've switched from oc to nc)?

I tested it with firefox and had no problems. I'll do some tests with chrome/ie and maybe there is something wrong...:)

Only the nextcloud.log does exist and by now only with three share/dav relevant entries and four more from Rainloop webmail - so no issues documented by the polls plugin.

This is very weird. Is there anything in the browser's javascript console?

@v1r0x:
Sorry for the delay - here is what chromes console told me:

2016-11-03_polls_continuous_reload_console-output

Does this only happen in the polls app? Because the error in the console is caused by the apporder app, but maybe this error is unrelated to the reload error.

YOU ARE MY MAN! Thanks for the the sharp view to the log!
It's definitely related to app order and i think it's caused by it.

Workaround:
deactivate AppOrder

Possible solution:
Allow non authenticated users the access to AppOrder to avoid reload.

Glad it works now :)

Best would be to open an issue at the apporder repo. Don't know if there is something I could do about it.

... jipp - typing the latest infos to an new ticket already ;-)

Thanks for your time and patience!

... and for your app!!!

@v1r0x I think this should be fixed in the polls app, as other public pages (like in the gallery app) do not produce this error.

From https://github.com/juliushaertl/apporder/issues/24

I just had a quick look, but it looks like the TemplateResponse constructor in your controller needs an additional parameter ($renderAs='guest') for public pages. I'm sorry I cannot test that right now, but I'll do so if i find some time.

The current public page of the polls app also shows elements like the user menu on the left, which should not be visible for non logged in users.

Thanks for your reply and your suggestion. Will test your solution. Thanks!

reopen based on feedback of @juliushaertl

@juliushaertl I added 'guest' as parameter after the parameter array return new TemplateResponse('polls', 'goto.tmpl', [], 'guest'); but the result looks really weird.
guest-poll
Any idea what's wrong?

@v1r0x Ok, it should be 'base' not 'guest', sorry for the wrong information.

After testing, i saw that this will render the public pages, but will not show the top bar with logo.
Other apps with public pages, like the gallery app or even the shipped files_sharing for example add a custom template with the header bar.

https://github.com/nextcloud/gallery/blob/master/templates/public.php#L49-L69
https://github.com/nextcloud/server/blob/master/apps/files_sharing/templates/public.php#L37-L73

@v1r0x Is that issue still an issue?

I don't know, but I think yes. Haven't decided yet which template for not logged-in users is the best. Looks like every other app has another template...

As far as I saw, the public pages are ok, besides the fact, that there are navigation elements, which don‘t work, because the user is not logged in. I just find the topic of the issue is a little bit confusing. But is related to #140

@nextgen-networks @v1r0x: This Issues still points to the 0.7.4 milestone. I cannot reproduce this. Is this bug still present or could we close the PR?

Unfortunately bug is still present. Owncloud 10.0.3; Polls 0.8.0
Checked on several browsers on mobile and Desktop: Firefox, Safari, Chrome

Same issue here. Owncloud 10.0.3; Polls 0.8.0.
Safari, Chrome (Mac)
Chrome output:
screen

Does this happen in any other app? Is there anything special about this poll / the user the avatar fails to load for? Could you create an public poll to show us the issue / an account?

This happens just in the polls app.
And it just appears, if I set the poll public or hidden.
But it does not depend, if user names are anonymous or not.
As soon as I am logged in and open the poll, the error does not occur.
Any clues?

There seems to be some incopatibility with the avatarmanager, when the avatars are loaded via JS in public polls. I can reproduce this as well.

But I cannot see a relationship to the starting issue. Seesms to be a nother issue or do I understand something wrong?

And BTW: I still cannot reproduce the starting issue.

What exactly do you mean by „the starting issue“?
Any idea how to solve or workaroud this issue?

This issue started with something around a continuous loading of the page in public polls (see screenshots). Something I cannot reproduce.

The last comments regard an issue related to not loading avatars and which I can reproduce. I cannot see a relationship between both things.

And no, I have no workaround for that at the moment. I will investigate next week. Maybe someone else can solve that faster or better.

Well the relation is (but unfortunately I did not state this clearly): I get exactly the same error message and the same symptom as mentioned in the starting post: page reloads every 5 seconds (as announced in the error message).

Had a quick look and seems to be just another Nc vs. oC thing. Nc avatars are public https://github.com/nextcloud/server/blob/master/core/Controller/AvatarController.php#L115-L118 but oCs aren´t https://github.com/owncloud/core/blob/master/core/Controller/AvatarController.php#L107-L108. So we should check something like owncloud && public page and show the imageplaceholder instead of the avatar.

@muhackl Please try #266

I changed the code of vote.js. After that, the 5-second-reload issue was no longer there. But there are no Dates shown any longer. Just zeros (0).
Another symptom I was watching already before this fix: When adding a new poll, I just chose several dates and just one time so I get one column. After one anonymous took part on the poll and I get back as admin to the edit mode of the poll, it looks like that (see attachment). There is something terribly wrong I think.
bildschirmfoto 2017-12-14 um 06 59 01

There are several changes since the 0.8.0. So better pull the 0.8.1 branch to test. Just updating a single file will have side effects. If the continuous erload will no more occur, I would prefer to close this littel issue with this huge amount of comments 😬

Polls 0.8.1 fixed all issues for me.

  • 5-seconds-reload
  • Self-muliiplying rows
    Regarding me, issue can be closed.
    Thanks a lot!

👍 Great! Thanks.

Hi there!

I'm having this issue as well!

Any idea what is still wrong?
I'm running oc version 10.0.10.4
Poll version: 0.8.1

Try the 0.8.3 Release. As mentioned in the readme, we dropped support for ownCloud. Sorry for that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hanzei picture hanzei  ·  6Comments

khayman123 picture khayman123  ·  3Comments

amittel picture amittel  ·  5Comments

dartcafe picture dartcafe  ·  4Comments

andriusign picture andriusign  ·  6Comments