1
mackingspain
Fatal Error in edituser.php

Greetings -

I am using Formulize to add necessary fields to user registration on a new site. After creating a simple registration form (consists of 7 text or select boxes, none of the select boxes are linked to other forms) I get the following error when I select 'Edit User':

Fatal error: Call to a member function on a non-object in /usr/home/zaviation/www/htdocs/modules/formulize/include/formdisplay.php on line 1331

the line in question is this:

$value = $myts->undoHtmlSpecialChars($value);

I'm relatively new to PHP so this is the barest of clues. From poking around on forums it appears to have something to do with the text sanitizer, but knowing what to actually do with it is beyond me.

Anyway, the error occurs at the webmaster level and at the registered user level (I can create an account just fine with the reg code). I have tried the following -

* checking access permission to the form (Webmasters have all rights, Reg. users can view_form, add_own_entry, update_own_entry, delete_own_entry)

* updating the Formulize module (using 2.2RC1) after my form was created. I am using the Regcodes module version 2.2RC1 so that I can add fields to registration. I have Pageworks and I-Menu installed as well but have not created any templates or menus yet.

My hunch is that the solution is a simple one, but I've been stuck on this one for a day now. Does anybody see what I'm missing?

- John M.


Website URL:
http://zaviation.com

XOOPS Version:
XOOPS 2.0.15

XOOPS Theme:
default

XOOPS Template Set:
default

PHP Version:
4.4.4

MySQL Version:
4.1.21

Server Software:
Apache/1.3.37 (Unix) FrontPage/5.0.2.2635 mod_ssl/2.8.28 OpenSSL/0.9.7i

User's Browser:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8

2
JCDunnart
Re: Fatal Error in Formulize 2.2RC1 module
  • 2006/11/15 19:58

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


Excellent bug report Unfortunately I don't know the module, so I'm changing the title of this thread and hope someone more knowledgeable sees it.

Otherwise I suggest following the link to the formulize development site in the news post (or was it in the comments?...) where you should be able to find someone to help.

3
JCDunnart
Re: Fatal Error in Formulize 2.2RC1 module
  • 2006/11/15 20:04

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


The title change didn't show on the front page, trying again...

4
jensclas
Re: Fatal Error in Formulize 2.2RC1 module

already asked and answered iin FAQ - a search would have found you this FAQ with the search term 'Call to a member function on a non-object'. Please use the search

5
JCDunnart
Re: Fatal Error in Formulize 2.2RC1 module
  • 2006/11/15 20:14

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


That FAQ is a bit old, it looks like it was written when php 4.3.10 was just released. I don't think it's useful these days - it would be quite unlikely that someone still uses those old versions of php and the zend optimiser together.

This particular error is a bug with the Formulize module, you can see it in the path of the error message.

6
m0nty
Re: Fatal Error in edituser.php
  • 2006/11/15 20:21

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


have you used the form.php from the 2.0.16 package when you installed 2.0.15? there's a bug in the XOOPS 2.0.15 version of form.php. not gonna say much more on that as it's written all over xoops.org if you require more info.

might not be the issue, but if you haven't used the fixed form.php then it's a likely candidate.

7
mackingspain
Re: Fatal Error in edituser.php

thanks for the replies . . . I did read the post about Zend Optimizer in the FAQ before posting my question but didn't think it applied - as far as I can tell Optimizer is not enabled and the main engine is the only Zend process running. I'll ask the host about installing it, but am not hopeful as the last version of Zend Optimizer for the OS they use (FreeBSD 4.10) is 2.5.3.

8
mackingspain
Re: Fatal Error in Formulize 2.2RC1 module

Is Zend Optimizer a requirement of XOOPS?

9
tripmon
Re: Fatal Error in Formulize 2.2RC1 module
  • 2006/11/17 18:35

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


re: Zend,
No, it is not.

10
jegelstaff
Re: Fatal Error in edituser.php
  • 2006/11/20 15:26

  • jegelstaff

  • Module Developer

  • Posts: 518

  • Since: 2004/7/2 2


Hello, sorry for the delay in replying.

This is curious, since such a basic error ought to have appeared long before now. Perhaps it has to do with the particular configuration of your site. Nonetheless, we may be able to compensate for it in the edituser.php file. Find line 159 in edituser.php, it should look like this:

global $xoopsDB, $xoopsUser;

Immediately after it, add this line of code:

$myts =& MyTextSanitizer::getInstance();

On a test site I've tried, edituser.php works fine with and without that line (ie: we don't get the problem you're having), but I think this line will safeguard against the $myts object never being instantiated at all.

Please let us know how it goes. Thanks,

--Julian
Technical Architect - Freeform Solutions
Formulize - custom registration forms, ad hoc forms and reports

Login

Who's Online

422 user(s) are online (312 user(s) are browsing Support Forums)


Members: 0


Guests: 422


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits