ottogal Posted Monday at 12:37 PM Posted Monday at 12:37 PM Hi all, in a live Processwire site I had installed the FormBuilder module, but there was no need for it. So I tried to get rid of it - and didn't follow the correct steps. I uninstalled it in the admin, before a few others depending on it. And, to take the cake, I deleted a file and even a database table directly. Hence full desaster (I have no complete backup). When I now call the site in the browser, I get messages like this: Deprecated: Return type of ProcessWire\FormBuilderMain::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/htdocs/XXXXXXXX/site/modules/FormBuilder/FormBuilderMain.php on line 428 and a similar one; and several of this kind (referring to different line numbers): Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /www/htdocs/XXXXXXXX/wire/core/Session.php on line 287 Is there anything I could try to do before redoing the whole from scratch? Thanks a lot! ottogal
BrendonKoz Posted Monday at 04:37 PM Posted Monday at 04:37 PM Have you tried to re-add the module files, and recreate the table schema (hopefully the data wasn't necessary) to see if it would be enough to provide a state that removes the errors? The ini_set errors are likely showing simply because errors are being output to the browser prior to a header() call being made; standard issue when errors are displayed in PHP. Fixing the errors should fix the ini_set warning.
ottogal Posted 13 hours ago Author Posted 13 hours ago Hi @BrendonKoz, thank you for your reply. The module files are in place and complete. To recreate the table schema - I'd not know how to do. I looked up some documentation to the return type warning and found informations on a certain #[\ReturnTypeWillChange] attribute: https://www.php.net/manual/en/class.returntypewillchange.php and https://stackoverflow.com/questions/71133749/reference-return-type-of-should-either-be-compatible-with-or-the-re Obviously these are for handling problems with an update of the PHP version - which didn't change... Should I try to use this attribute? It's said that would supress the warning but seems prone to issues in the future.
Robin S Posted 13 hours ago Posted 13 hours ago @ottogal, my suggestion is to delete the /site/modules/FormBuilder/ folder and everything inside it. It's not the ideal way to uninstall a module but PW will handle it okay. This should stop any fatal errors and then you'll be able to log in and do a Modules > Refresh. There will probably be some FormBuilder-related items on the "Missing" tab of the Modules section. For any item listed on this tab, click on it and then choose the "Remove this module from the database?" option.
ottogal Posted 3 hours ago Author Posted 3 hours ago Hi @Robin S, thank you so much - you saved my day! It worked flawlessly. ProcessWire is so well built that it's hardly possible to get lost - given you don't do stupid things. And big hugs to this community of friendly and helpful people! ottogal 1
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