PWaddict Posted January 10, 2023 Share Posted January 10, 2023 Hello and happy new year! Today, I decided to upgrade a site to 3.0.210 from 3.0.165 and so far I noticed one issue. The following hook doesn't work properly (worked fine on 3.0.165). It changes the text but it won't let the non-superuser to delete the page. Pressing the button redirects the page https://mysite.test/admin/page/edit/?id=11293 to https://mysite.test/admin/page/edit/?id=11293&s=1&c=1 /** * Rename "Move to Trash" text on Delete tab's button * */ $wire->addHookBefore('InputfieldButton::render', function(HookEvent $event) { if ($event->object->id != "submit_delete") return; if ($this->wire('user')->isSuperuser() == false) $event->object->value = "Hello World"; }); Link to comment Share on other sites More sharing options...
PWaddict Posted January 12, 2023 Author Share Posted January 12, 2023 I removed the hook as I don't need it anymore but I'm curious why this doesn't work on 3.0.210. Link to comment Share on other sites More sharing options...
wbmnfktr Posted January 12, 2023 Share Posted January 12, 2023 It doesn't work in a clean installation either. So it's not your setup. It works pretty fine without the hook though. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now