server icon indicating copy to clipboard operation
server copied to clipboard

Undefined index: `extension` at /apps/files_versions/lib/Storage.php#466

Open rubrik opened this issue 8 years ago • 11 comments

Just a heads up about an undefined extension error.

I was testing automated tagging and deleted a tagged text file at the time.

System setup in #7831 but with RC2

rubrik avatar Jan 19 '18 19:01 rubrik

@schiessle

juliusknorr avatar Jan 20 '18 10:01 juliusknorr

@schiessle Ping

MorrisJobke avatar Mar 09 '18 09:03 MorrisJobke

cc @nickvergessen

MorrisJobke avatar Aug 24 '18 14:08 MorrisJobke

string(25) "pathinfo('path/test.txt')"
array(4) { ["dirname"]=> string(4) "path" ["basename"]=> string(8) "test.txt" ["extension"]=> string(3) "txt" ["filename"]=> string(4) "test" }

string(21) "pathinfo('path/test')"
array(3) { ["dirname"]=> string(4) "path" ["basename"]=> string(4) "test" ["filename"]=> string(4) "test" } 

So yes extension can be missing. But in the versions there should always be the timestamp. Fighting the problem in Storage sounds like only hiding the real issue

nickvergessen avatar Sep 10 '18 12:09 nickvergessen

cc @schiessle please have a look

nickvergessen avatar Sep 10 '18 12:09 nickvergessen

Ping! :)

skjnldsv avatar Aug 14 '19 20:08 skjnldsv

I'm closing this issue due to inactivity. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

szaimen avatar May 26 '21 10:05 szaimen

This still an issue in recent (20) versions.

solracsf avatar Jun 09 '21 17:06 solracsf

A full log message with one of the recent versions might be helpful and giving more hints on the root cause. @acsfer Could you maybe check if you can provide that?

juliusknorr avatar Jun 10 '21 04:06 juliusknorr

@juliushaertl tell me if this helps:

{
  "reqId": "BWSFySiQhgROtREuoISE",
  "level": 3,
  "time": "2021-06-10T15:40:45+00:00",
  "remoteAddr": "77.159.197.226",
  "user": "benja",
  "app": "PHP",
  "method": "DELETE",
  "url": "/remote.php/dav/files/benja/Partage%20Service%20Technique/00%20-%20Pilotage/04%20-%20Factures",
  "message": {
    "Exception": "Error",
    "Message": "Undefined index: extension at /apps/files_versions/lib/Storage.php#465",
    "Code": 0,
    "Trace": [
      {
        "file": "/apps/files_versions/lib/Storage.php",
        "line": 465,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          8,
          "Undefined index: extension",
          "/apps/files_versions/lib/Storage.php",
          465,
          {
            "0": "And 6 more entries, set log level to debug to see all entries",
            "uid": "GroupServiceTechnique",
            "filename": "04 - Factures",
            "userFullPath": "",
            "versions": [],
            "view": {
              "__class__": "OC\\Files\\View"
            }
          }
        ]
      },
      {
        "file": "/apps/files_versions/lib/Storage.php",
        "line": 250,
        "function": "getVersions",
        "class": "OCA\\Files_Versions\\Storage",
        "type": "::",
        "args": [
          "GroupServiceTechnique",
          "04 - Factures"
        ]
      },
      {
        "file": "/apps/files_versions/lib/Hooks.php",
        "line": 76,
        "function": "delete",
        "class": "OCA\\Files_Versions\\Storage",
        "type": "::",
        "args": [
          "/Partage Service Technique/00 - Pilotage/04 - Factures"
        ]
      },
      {
        "file": "/lib/private/legacy/OC_Hook.php",
        "line": 110,
        "function": "remove_hook",
        "class": "OCA\\Files_Versions\\Hooks",
        "type": "::",
        "args": [
          {
            "run": true,
            "path": "/Partage Service Technique/00 - Pilotage/04 - Factures"
          }
        ]
      },
      {
        "file": "/lib/private/Files/View.php",
        "line": 1280,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::",
        "args": [
          "OC_Filesystem",
          "post_delete",
          {
            "run": true,
            "path": "/Partage Service Technique/00 - Pilotage/04 - Factures"
          }
        ]
      },
      {
        "file": "/lib/private/Files/View.php",
        "line": 1208,
        "function": "runHooks",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          [
            "delete"
          ],
          "/Partage Service Technique/00 - Pilotage/04 - Factures",
          true
        ]
      },
      {
        "file": "/lib/private/Files/View.php",
        "line": 350,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "rmdir",
          "/Partage Service Technique/00 - Pilotage/04 - Factures",
          [
            "delete"
          ]
        ]
      },
      {
        "file": "/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 309,
        "function": "rmdir",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "/Partage Service Technique/00 - Pilotage/04 - Factures"
        ]
      },
      {
        "file": "/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 183,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->",
        "args": []
      },
      {
        "file": "/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 295,
        "function": "delete",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "files/benja/Partage Service Technique/00 - Pilotage/04 - Factures"
        ]
      },
      {
        "file": "/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpDelete",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 474,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:DELETE",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 251,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 319,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/apps/dav/lib/Server.php",
        "line": 320,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/remote.php",
        "line": 167,
        "args": [
          "/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/lib/private/Log/ErrorHandler.php",
    "Line": 91,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
  "version": "19.0.12.0",
  "id": "60c23a192dd20"
}

solracsf avatar Jun 10 '21 16:06 solracsf

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

szaimen avatar Jan 09 '23 11:01 szaimen