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

"Failed to save link" toast but still saves #349

Open
2 tasks done
purplespider opened this issue Nov 14, 2024 · 2 comments
Open
2 tasks done

"Failed to save link" toast but still saves #349

purplespider opened this issue Nov 14, 2024 · 2 comments

Comments

@purplespider
Copy link

Module version(s) affected

4.0.8

Description

Upon clicking "Save" when adding any link, a toast appears stating "Failed to save link" and the modal stays on screen.

However, upon refreshing the page, the link appears in the list, so it was saved.

Screenshot 2024-11-14 at 11 39 53

Works fine locally, issue only occurs once deployed.

No errors in console and no fetch errors.

The only thing different I can see, between when it works locally, and doesn't work on production is locally, after the fetch request to admin/linkfield/linkForm/0 there are two more fetch requests (to admin/linkfield/linkForm/13/field/PageID/tree and admin/linkfield/data) netiher of which appear when doing a save on production.

Things tried:

  • Different PHP versions
  • Flushing & dev/build

How to reproduce

private static $has_many = [
     'HeaderButtons' => Link::class . '.Owner',
];

//...
    $fields->addFieldToTab('Root.Main', MultiLinkField::create('HeaderButtons'));
//...

Possible Solution

No response

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
@GuySartorelli
Copy link
Member

GuySartorelli commented Nov 14, 2024

Works fine locally, issue only occurs once deployed.

Can you please try to find a way to reproduce this locally? If we can't reproduce it, we can't fix it. Clearly the information you provided in "How to reproduce" won't be sufficient on its own.

@purplespider
Copy link
Author

Yeah, I appreciate that, Guy. With no errors in the console, I'm a bit stumped, though. I was hoping someone familiar with the module may have some ideas for areas to investigate that could be causing the "Failed" message to trigger. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants