ValueError: Path cannot be empty in /var/www/consult/core/modules/locale/locale.module on line 1112

Created on 18 April 2022, almost 3 years ago
Updated 18 January 2023, about 2 years ago

Problem/Motivation

Can't update a page without a message "The website encountered an unexpected error. Please try again later."

Steps to reproduce

Try to update any page.

Proposed resolution

None

I join the Apache error log with full trace.

Regards

JP P

🐛 Bug report
Status

Closed: works as designed

Version

9.5

Component

ckeditor.module

Created by

🇫🇷France jppo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India nikhil_110

    I also faced the same problem so I added if (!str_starts_with($filepath, $dir) && !empty($filepath)) {
    in locale_js_translate function in local.module file at line number 528.

    check !empty($filepath) value

    After added this, it work again.

  • 🇪🇸Spain rzb Barcelona

    I faced the same problem after deploying to production, and could not reproduce in any other environment, even copying the production DB to local env.
    I guess the solution mentioned by @nikhil_110 only masks the root cause of the problem, but it is safe to protect the website from 500 errors in the case there is no js path to read.
    Here is a little patch to apply it.

  • 🇵🇱Poland lordzik

    Got this WSOD today after upgrade from Drupal 10.3.10 to Drupal 10.4.1
    Thanks for the patch!
    Can we commit this change?

Production build 0.71.5 2024