after enabling webform, cannot reach the structure/webform UI

getting alert :The website encountered an unexpected error. Please try again later.

log:Uncaught PHP Exception Exception: "Only local files should be passed to _locale_parse_js_file()."

Comments

sealionking created an issue. See original summary.

jrockowitz’s picture

I need more information so that I can replicate this issue...

  • Is this issue reproducible using simplytest.me?
  • What are the steps required to reproduce the issue?
  • Is the issue affecting a clean install?
jrockowitz’s picture

Status: Needs work » Postponed (maintainer needs more info)
ChrisSnyder’s picture

I am receiving the same issue. I hope I can add a little more information.

* I had an existing web form that I had created with Webform 5.0.0-beta4
* I updated from 5.0.0-beta4 to 5.0.0-beta5
* When editing the existing web form I get the error:

The website encountered an unexpected error. Please try again later.

Exception: Only local files should be passed to _locale_parse_js_file(). in _locale_parse_js_file() (line 1141 of core/modules/locale/locale.module).
locale_js_translate(Array) (Line: 503)
locale_js_alter(Array, Object, NULL) (Line: 501)
Drupal\Core\Extension\ModuleHandler->alter('js', Array, Object) (Line: 276)
Drupal\Core\Asset\AssetResolver->getJsAssets(Object, ) (Line: 298)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 161)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 93)
Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments(Object) (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.response', Object) (Line: 184)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I have not tested this with the latest dev version or with a clean install.

ChrisSnyder’s picture

To add to this issue, It looks like Drupal is having a hard time loading https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.21.0/codemirror.js. This might be because it is an external resource and may not be loaded properly?

jrockowitz’s picture

We need to document the steps required to reproduce this issue. I suspect that the locale.module is being enabled.

What version of Drupal are you using?

An immediate work-around is to install all the needed libraries using drush (@see /admin/help/webform#libraries)

ChrisSnyder’s picture

I am using Drupal 8.2.6

ChrisSnyder’s picture

My apologies. I am having difficulties reproducing the issue on a fresh installation of webform. Installing the libraries locally, using drush webform-libraries-download, does provide a resolution and allows me to edit the webforms.

jrockowitz’s picture

@chrissnyder I think the patch in #1803330: Add file_exists() to _locale_parse_js_file() to prevent PHP warning might fix the issue.

Any chance, could you break your site by uninstalling the libraries and testing the patch.

jrockowitz’s picture

Priority: Critical » Major

Changing to 'Major' since there is a work-around and a patch.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

#1803330: Add file_exists() to _locale_parse_js_file() to prevent PHP warning will address this issue and there are two workarounds, apply the recommended patch or install all the required webform libraries.

agoradesign’s picture