Jump to content

Recommended Posts

Posted

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

 

Posted

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.

Posted

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.

 

Posted

@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.

Posted

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 

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...