Adriano Faria Posted October 20, 2023 Posted October 20, 2023 I got a missing csrf error message when trying to delete an entry. 'link' => Url::internal('app=neappupdatechecker&module=update&controller=ucresources&do=deleteResource&id=' . $row['id']), I added it on mine but then it wasn't deleting, just redirecting, due to the condition in the method. Thanks.
Nathan Explosion Posted October 20, 2023 Posted October 20, 2023 More detail please: Here is what should happen: You get a prompt to confirm the deletion (yes/no) You answer yes, the deletion is performed via Ajax Page refreshes, you get a flash notification. Are you indicating that those items aren't happening, or do happen but you then get the CSRF message? (I'm assuming you mean "The CSRF protection key did not match.....")
Adriano Faria Posted October 20, 2023 Author Posted October 20, 2023 (edited) 13 minutes ago, Nathan Explosion said: Are you indicating that those items aren't happening, or do happen but you then get the CSRF message? (I'm assuming you mean "The CSRF protection key did not match.....") Yep, I got that message. After adding the ->csrf() to the link, it redirects to the same page; no confirm stuff. Edited October 20, 2023 by Adriano Faria
Nathan Explosion Posted October 20, 2023 Posted October 20, 2023 Fixed - forgot about that annoyance. If I ever run into it on a paid application, I'll try to figure out the cause a bit more. 1
Recommended Posts