Skip to content

[5.x]: Axios "CanceledError" error in entries select modal #14882

@mmikkel

Description

@mmikkel

What happened?

Description

In a multi-site install, if an Entries field is configured to use a single section for the "Sources" setting, the field's entry select modal will fire a barrage of uncaught Axios CanceledError exceptions, when opened via the "Add an entry" button in a site where that section is disabled.

When this happens, the browser tab essentially freezes and has to be closed.

CleanShot 2024-04-27 at 20 43 10@2x

Steps to reproduce

The bug can be reliably reproduced by having a single-source Entries field, and then clicking the field's "Add an entry" button in an active site that does not have that source enabled.

  1. Have at least 2 sites, "Site A" and "Site B".
  2. Create a section (e.g. "News"). Leave the section disabled for "Site A".
  3. Create an Entries field, and configure it to use the "News" section as its only source. All other settings can be left at their defaults (I had the "Show site menu" setting enabled, but it doesn't appear to matter).
  4. Create another section (e.g. "Pages"), and add the Entries field to it.
  5. Create a "Site A" entry in the "Pages" section, and click the "Add an entry" button for the entries field.

Expected behavior

Actual behavior

Craft CMS version

5.0.5

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions