Skip to content

Broken public links in 5.0.0-alpha.2 #2554

@julien-nc

Description

@julien-nc

Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug
Public links to a forms seem broken. When accessing one while not being authenticated, there's a redirection to the login page. And while being authenticated there's an internal server error.

According to our sysadmins, here is the related log line:

{
  "reqId": "PuWUmLsisN1cvj3DK9l7",
  "level": 3,
  "time": "2025-02-14T13:24:34+00:00",
  "remoteAddr": "",
  "user": "",
  "app": "index",
  "method": "GET",
  "url": "/apps/forms/s/…",
  "message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*forms_v2_forms` WHERE `hash` = :dcValue1\"; ",
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0",
  "version": "31.0.0.15",
  "exception": {
    "Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
    "Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*forms_v2_forms` WHERE `hash` = :dcValue1\"; ",
    "Code": 0,
    "Trace": [
      {
        "file": "…/lib/public/AppFramework/Db/QBMapper.php",
        "line": 375,
        "function": "findOneQuery",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\DB\\QueryBuilder\\QueryBuilder"
          }
        ]
      },
      {
        "file": "…/apps/forms/lib/Db/FormMapper.php",
        "line": 94,
        "function": "findEntity",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\DB\\QueryBuilder\\QueryBuilder"
          }
        ]
      },
      {
        "file": "…/apps/forms/lib/Controller/PageController.php",
        "line": 74,
        "function": "findByHash",
        "class": "OCA\\Forms\\Db\\FormMapper",
        "type": "->",
        "args": [
          "s"
        ]
      },
      {
        "file": "…/apps/forms/lib/Controller/PageController.php",
        "line": 89,
        "function": "index",
        "class": "OCA\\Forms\\Controller\\PageController",
        "type": "->",
        "args": [
          "s"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 200,
        "function": "views",
        "class": "OCA\\Forms\\Controller\\PageController",
        "type": "->",
        "args": [
          "s"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Forms\\Controller\\PageController"
          },
          "views"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Forms\\Controller\\PageController"
          },
          "views"
        ]
      },
      {
        "file": "…/lib/private/Route/Router.php",
        "line": 306,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Forms\\Controller\\PageController",
          "views",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "hash": "s",
            "view": "",
            "_route": "forms.page.views"
          }
        ]
      },
      {
        "file": "…/lib/base.php",
        "line": 1018,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/forms/s/…"
        ]
      },
      {
        "file": "…/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "…/lib/public/AppFramework/Db/QBMapper.php",
    "Line": 277,
    "message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*forms_v2_forms` WHERE `hash` = :dcValue1\"; ",
    "exception": {},
    "CustomMessage": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*forms_v2_forms` WHERE `hash` = :dcValue1\"; "
  }
}

To Reproduce
Steps to reproduce the behavior:

  1. Create a form
  2. Create a public link
  3. Browse it while being authenticated and while not being authenticated

Expected behavior
See the form.

Screenshots

Nextcloud (please complete the following information):

  • Nextcloud-Version: 31
  • Forms-Version: 5.0.0-alpha.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developAccepted and waiting to be taken care ofbugSomething isn't workinghighHigh priorityphpPHP related ticketregressionRegression of a previous working feature

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions