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

Action errors broken with Statamic 5.26 #614

Closed
caseydwyer opened this issue Sep 26, 2024 · 3 comments
Closed

Action errors broken with Statamic 5.26 #614

caseydwyer opened this issue Sep 26, 2024 · 3 comments
Labels

Comments

@caseydwyer
Copy link
Contributor

Description

After upgrading Statmic to v5.26.0, we're seeing odd behavior with Action responses from a Resource CP page—specifically when there's an error. Pretty sure this is related/caused by changes made in Statamic PR #10264.

Did just a tiny bit of diving into this, and wondering if maybe all we need is to update Statamic & recompile assets? Runway's PublishForm.vue appears to import & use Statamic's HasActions.js, which I think might be the key, here, along with the new expectation for a thrown exception, to indicate failure. From changes to ActionController.php in the PR above:

try {
    $response = $action->run($items, $values);
} catch (Exception $e) {
    $response = empty($msg = $e->getMessage()) ? __('Action failed') : $msg;
    $successful = false;
}

Hope that helps, let me know if there's anything else I can do to assist!

Steps to reproduce

  1. Open a resource with an available Action
  2. Temporarily modify back-end code to throw exception in run method
  3. Note the toast is green, indicating a successful action response

Environment

Environment

Environment

Application Name: TF2
Laravel Version: 11.25.0
PHP Version: 8.2.5
Composer Version: 2.5.4
Environment: local
Debug Mode: ENABLED
URL: twenty-for.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Statamic

Addons: 6
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.26.0 PRO

Statamic Addons

statamic-rad-pack/runway: 7.10.0

@duncanmcclean
Copy link
Member

Thanks! Hopefully it'll be fixed when I tag the next release.

@duncanmcclean
Copy link
Member

Would you be able to let me know if it's working for you now?

@caseydwyer
Copy link
Contributor Author

caseydwyer commented Sep 27, 2024

My apologies, Duncan—should have started higher up the tree. It looks like this is actually an issue with Statamic itself (and the same PR listed above). This issue can stay closed, and here's the PR to patch this (on Statamic's end). Thanks for your help!

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

No branches or pull requests

2 participants