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

fix: Do not attempt to use l10n files as sources for combined js files #38237

Merged
merged 1 commit into from
May 15, 2023

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented May 13, 2023

My personal instance turned out an empty page after upgrading to 27.0.0-beta.2 and the log showed the trace below.

It seems that #38207 caused that translation json files were considered sources for the js combiner and its structure of course doesn't match the expected one as no file path is listed in there.

Iirc we don't use the combiner if debug mode is enabled so this might be the reason why this hasn't shown during development.

{
  "reqId": "pJgZ85GSItQ361CMiuVs",
  "level": 3,
  "time": "2023-05-13T07:48:53+00:00",
  "remoteAddr": "92.225.64.107",
  "user": "jus",
  "app": "index",
  "method": "GET",
  "url": "/apps/dashboard/",
  "message": "Object of class stdClass could not be converted to string",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0",
  "version": "27.0.0.3",
  "exception": {
    "Exception": "Error",
    "Message": "Object of class stdClass could not be converted to string",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php",
        "line": 96,
        "function": "cache",
        "class": "OC\\Template\\JSCombiner",
        "type": "->",
        "args": [
          "/var/www/nextcloud/apps-extra/richdocuments/l10n",
          "de.json",
          [
            "OC\\Files\\SimpleFS\\SimpleFolder"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php",
        "line": 145,
        "function": "process",
        "class": "OC\\Template\\JSCombiner",
        "type": "->",
        "args": [
          "/var/www/nextcloud/apps-extra/richdocuments",
          "l10n/de.json",
          "richdocuments"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php",
        "line": 103,
        "function": "cacheAndAppendCombineJsonIfExist",
        "class": "OC\\Template\\JSResourceLocator",
        "type": "->",
        "args": [
          "/var/www/nextcloud/apps-extra/richdocuments",
          "l10n/de.json",
          "richdocuments"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/ResourceLocator.php",
        "line": 73,
        "function": "doFind",
        "class": "OC\\Template\\JSResourceLocator",
        "type": "->",
        "args": [
          "l10n/de"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
        "line": 377,
        "function": "find",
        "class": "OC\\Template\\ResourceLocator",
        "type": "->",
        "args": [
          [
            "core/js/common",
            "core/js/main",
            "core/js/unsupported-browser-redirect",
            "core/l10n/de",
            "core/js/files_fileinfo",
            "And 58 more entries, set log level to debug to see all entries"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
        "line": 222,
        "function": "findJavascriptFiles",
        "class": "OC\\TemplateLayout",
        "type": "::",
        "args": [
          [
            "core/js/common",
            "core/js/main",
            "core/js/unsupported-browser-redirect",
            "core/l10n/de",
            "core/js/files_fileinfo",
            "And 58 more entries, set log level to debug to see all entries"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 182,
        "function": "__construct",
        "class": "OC\\TemplateLayout",
        "type": "->",
        "args": [
          "user",
          "dashboard"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php",
        "line": 213,
        "function": "fetchPage",
        "class": "OC_Template",
        "type": "->",
        "args": [
          [
            "#app-dashboard",
            null
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 182,
        "function": "render",
        "class": "OCP\\AppFramework\\Http\\TemplateResponse",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Dashboard\\Controller\\DashboardController"
          ],
          "index"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Dashboard\\Controller\\DashboardController",
          "index",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "dashboard.dashboard.index"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1061,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/dashboard/"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Template/JSCombiner.php",
    "Line": 163,
    "CustomMessage": "--"
  }
}

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 15, 2023
@juliusknorr
Copy link
Member Author

Failure unrelated

@juliusknorr juliusknorr merged commit 25f3678 into master May 15, 2023
@juliusknorr juliusknorr deleted the bugfix/noid/no-combine-l10n branch May 15, 2023 07:17
@blizzz blizzz mentioned this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug high regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants