Jump to content

Form Builder no longer works after moving to new server


bowenac
 Share

Recommended Posts

Moved some sites to a new server which use Form Builder and they are no longer working.

The pages that should display the form are using the easy embed option form-builder/basic-contact

Apparently the client was told by the author that they needed Swift Mailer because the forms were responding very slow. Then they installed form builder 2.5 via ftp and now the forms do not display. Anyone familiar with the below expception method? Or can point me in the right direction.

When viewing the page while not logged in it displays internal server error where the embed should be.

While logged in as a super user it shows the following exception:

Error: Exception: Method FormBuilder::setTemplateVersion does not exist or is not callable in this context (in /var/www/example/wire/core/Wire.php line 349)

#0 /var/www/example/site/templates/form-builder.php(26): Wire->__call('setTemplateVers...', Array)
#1 /var/www/example/site/templates/form-builder.php(26): FormBuilder->setTemplateVersion(2)
#2 /var/www/example/wire/core/TemplateFile.php(169): require('/var/www/garage...')
#3 [internal function]: TemplateFile->___render()
#4 /var/www/example/wire/core/Wire.php(389): call_user_func_array(Array, Array)
#5 /var/www/example/wire/core/Wire.php(344): Wire->runHooks('render', Array)
#6 /var/www/example/wire/modules/PageRender.module(356): Wire->__call('render', Array)
#7 /var/www/example/wire/modules/PageRender.module(356): TemplateFile->render()
#8 [internal function]: PageRender->___renderPage(Object(HookEvent))
#9 /var/www/example/wire/core/Wire.php(389): call_user_func_array(
This error message was shown because you are logged in as a Superuser. Error has been logged.

Like I mentioned above, they attempted to install a new version of form builder via ftp I guess, I can see two different directorys for form builder which seems odd.

site\modules\.FormBuilder\FormBuilder.module

site\modules\FormBuilder\FormBuilder.module

So one with a period before FormBuilder and one without, all of which seem to have the same files and code. I checked FormBuilder.module of both and they both say they are version 22 which I assume 2.2 so not sure what they meant by version 2.5 as apparently the latest version is 2.4. Maybe they got versions mixed up and were talking about PW being version 2.5 as they are running 2.5.3

The form-builder.php template is using this which is what is throwing the error

    <?php
    $forms->setTemplateVersion(2);
    $form = $forms->getFromURL(true);
    echo $form->styles;
    echo $form->scripts;
    ?>

Link to comment
Share on other sites

It seems some FormBuilder files are missing. Have you copied the FormBuilder files as well? They are in:

/site/modules/FormBuilder/

Also you can easily reinstall FormBuilder and export the forms from the development version to the live version using the Export tool. I would suggest uploading FormBuilder from the zip file in the Form Builder forum. You might want to post in the FormBuilder forum as well since you can expect a quicker support response by the author.

Link to comment
Share on other sites

Ok so I went into the site\modules\FormBuilder\form-builder.php and copied that template and replaced the code in site\templates\form-builder.php and now the form displays and works as I tested it and can see the entries in the Forms in the admin.

But it also shows the good ole Hello World haha under the form. Whats the deal with that? I could hide this for the time being via css but not sure why this is being spit out.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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