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

Uncaught TypeError: terms.filter is not a function #5439

Closed
2 tasks
bobbingwide opened this issue Mar 6, 2018 · 3 comments
Closed
2 tasks

Uncaught TypeError: terms.filter is not a function #5439

bobbingwide opened this issue Mar 6, 2018 · 3 comments
Labels
[Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.

Comments

@bobbingwide
Copy link
Contributor

Issue Overview

Sometimes the editor fails because it can't handle unexpected responses from the server.

This is another example, where an unresolved, repeatable, but randomly occurring bug can cause the editor to fail.

When editing a post in my local development Windows server environment, which uses symlinked plugins, I sometimes encounter situations where a symlinked plugin's realpath has not been determined; the value stored in global $wp_plugin_paths is null. This can lead to the following

Warning: strpos(): Empty needle in C:\apache\htdocs\hm\wp-includes\plugin.php on line 658.

This unexpected text is returned to the browser and the editor fails.

Steps to Reproduce (for bugs)

It's not easily reproducible I'm afraid.

Expected Behavior

Current Behavior

This unexpected text is returned to the browser which then fails with
the "The editor has encountered an unexpected error." message box.

The following appears in the console

TypeError: terms.filter is not a function
    at FlatTermSelector.<anonymous> (https://qw/hm/wp-content/plugins/gutenberg/editor/build/index.js?ver=1520285415:28269:57)
    at getStateFromUpdate (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:6564:21)
    at processUpdateQueue (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:6646:23)
    at updateClassInstance (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:7125:18)
    at updateClassComponent (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:8390:22)
    at beginWork (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:8767:16)
    at performUnitOfWork (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:10766:16)
    at workLoop (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:10830:26)
    at HTMLUnknownElement.callCallback (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:580:14)
    at Object.invokeGuardedCallbackDev (https://qw/hm/wp-content/plugins/gutenberg/vendor/react-dom.d3299c8d.js:619:16)

other variations are

Uncaught TypeError: l.map is not a function
    at r (index.js?ver=1520096660:11)
    at updateFunctionalComponent (react-dom.d3299c8d.js:8361)
    at beginWork (react-dom.d3299c8d.js:8765)
    at performUnitOfWork (react-dom.d3299c8d.js:10766)
    at workLoop (react-dom.d3299c8d.js:10830)
    at HTMLUnknownElement.callCallback (react-dom.d3299c8d.js:580)
    at Object.invokeGuardedCallbackDev (react-dom.d3299c8d.js:619)
    at invokeGuardedCallback (react-dom.d3299c8d.js:476)
    at renderRoot (react-dom.d3299c8d.js:10908)
    at performWorkOnRoot (react-dom.d3299c8d.js:11556)

Possible Solution

Fix the underlying core bug.

Screenshots / Video

Related Issues and/or PRs

#4936

Todos

  • Tests
  • Documentation
@bobbingwide
Copy link
Contributor Author

@jeffpaul jeffpaul added the [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked. label Mar 8, 2018
@youknowriad
Copy link
Contributor

What can we do here? Thinking about closing this issue as it doesn't seem related to Gutenberg.

@danielbachhuber
Copy link
Member

What can we do here? Thinking about closing this issue as it doesn't seem related to Gutenberg.

Generally, I think Gutenberg needs to be more fault-tolerant about API responses. However, we can handle this more broadly. I don't think this particular issue is actionable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.
Projects
None yet
Development

No branches or pull requests

4 participants