FormBuilder module - fatal error using 'xml form import'

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
alanchill
New Member
New Member
Posts: 5
Joined: Wed Oct 08, 2008 5:49 pm

FormBuilder module - fatal error using 'xml form import'

Post by alanchill »

Hi,

I've encountered an issue on two implementations of CMSMS and FormBuilder.  On both (on several occasions on each) I've tried to export an existing form from within FormBuilder and then import it (either into the same CMSMS implementation to create a duplicate form, or to a different CMSMS install - eg moving a project from localhost to live.  On each occasion I get the errors on screen after what appears initially to be a successful install:

Code: Select all

Warning: fbForm::require_once(<path>\modules\FormBuilder\classes/Field.class.php) [fbform.require-once]: failed to open stream: No such file or directory in <path>\modules\FormBuilder\classes\Form.class.php on line 1142

Fatal error: fbForm::require_once() [function.require]: Failed opening required '<path>\modules\FormBuilder\classes/Field.class.php' (include_path='.;C:\php5\pear') in <path>\modules\FormBuilder\classes\Form.class.php on line 1142
For reference, line 1142 of the Field.class.php file contains:

Code: Select all

require_once dirname(__FILE__).'/'.$classFile;
Any attempt to then navigate into the particular form also produces this same error on screen.  As does attempting to delete it.

I've seen a German post mentioning the same thing, but I only speak "ein bisschen deutsch" to not able to understand the full nature of what was happening.

Anyone else have any ideas?

Thanks

Alan
janb

Re: FormBuilder module - fatal error using 'xml form import'

Post by janb »

Hi

I had the same problem.
Field.class.php does not exist (and should not either i think) , so i just touch the file to create an empty one :-)

Code: Select all

touch <path>/modules/FormBuilder/classes/Field.class.php
JanB
Last edited by janb on Thu Dec 11, 2008 10:33 am, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: FormBuilder module - fatal error using 'xml form import'

Post by Dee »

Check this bugreport.

Regards,
D
alanchill
New Member
New Member
Posts: 5
Joined: Wed Oct 08, 2008 5:49 pm

[SOLVED] Re: FormBuilder module - fatal error using 'xml form import'

Post by alanchill »

Hi,

I'm happy to say the problem is solved.

I added blank file into the /modules/formbuilder/classes folder called "field.class.php" as per janb's suggestion.

This worked immediately on my localhost - so have tried uploading a blank file through FTP to do the same on my remote hosted site.  Glad to say this worked a treat too.

For consistency I then applied the change that Dee suggested - which was to use the the line

Code: Select all

require_once cms_join_path(dirname(__FILE__), $classFile);
This also works and just makes slash direction consistent, should it ever become significant again.

I realise now too that I was a bit of a numpty in not spotting the different files in the error message - the error was from form.class.php and it pertained to a file called field.class.php.  I didn't spot the difference and thought they both mentioned form - causing me to think that it was an odd error. 

Anyway, happy to set the subject to SOLVED now, many thanks for the assistance in sorting this so quickly.
Post Reply

Return to “Modules/Add-Ons”