Skip to content

Internal Server error, when URL is opened by not logged in user #399

Description

@GAS85

Describe the bug
When Form is created as public and URL shared with users, they will see only an error page, till login.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Public Form
  2. Copy URL
  3. Open Private session in Browser and paste URL
  4. See error
    grafik
{"reqId":"3diLOS2hyeVLkKUhYpZX","level":3,"time":"2020-05-18T11:28:05+00:00","remoteAddr":"111.111.111.111","user":"--","app":"index","method":"GET","url":"/index.php/apps/forms/form/bmHbkXVFyTHvP2Yr","message":{"Exception":"Exception","Message":"Argument 2 passed to OCA\\Forms\\Db\\NotificationMapper::findByUserAndForm() must be of the type string, null given, called in /var/www/nextcloud/apps/forms/lib/Controller/PageController.php on line 277","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Forms\\Controller\\PageController"},"gotoForm"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Forms\\Controller\\PageController","gotoForm",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"hash":"bmHbkXVFyTHvP2Yr","_route":"forms.page.goto_form"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"hash":"bmHbkXVFyTHvP2Yr","_route":"forms.page.goto_form"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"hash":"bmHbkXVFyTHvP2Yr","_route":"forms.page.goto_form"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/forms/form/bmHbkXVFyTHvP2Yr"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"Argument 2 passed to OCA\\Forms\\Db\\NotificationMapper::findByUserAndForm() must be of the type string, null given, called in /var/www/nextcloud/apps/forms/lib/Controller/PageController.php on line 277","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/forms/lib/Controller/PageController.php","line":277,"function":"findByUserAndForm","class":"OCA\\Forms\\Db\\NotificationMapper","type":"->","args":[2,null]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"gotoForm","class":"OCA\\Forms\\Controller\\PageController","type":"->","args":["bmHbkXVFyTHvP2Yr"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Forms\\Controller\\PageController"},"gotoForm"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Forms\\Controller\\PageController"},"gotoForm"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Forms\\Controller\\PageController","gotoForm",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"hash":"bmHbkXVFyTHvP2Yr","_route":"forms.page.goto_form"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"hash":"bmHbkXVFyTHvP2Yr","_route":"forms.page.goto_form"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"hash":"bmHbkXVFyTHvP2Yr","_route":"forms.page.goto_form"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/forms/form/bmHbkXVFyTHvP2Yr"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/apps/forms/lib/Db/NotificationMapper.php","Line":65},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0","version":"18.0.4.2","id":"5ec2720a8afd8"}

Expected behavior
If Form is Public all Users that have this URL should be able to vote.

Nextcloud (please complete the following information):

  • Nextcloud-Version: 18.0.4
  • Forms-Version: 1.1.1

Desktop (please complete the following information):

  • Browser FF and Chrome
    Browser log
Firefox Console
TypeError: r is undefinedrouting.js:143:42
    f routing.js:143
    <anonym> viewer.js:23
    Webpack 3
        o
        <anonym>
        <anonym>

grafik

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions