Gossamer Forum
Home : Products : DBMan : Installation :

Blank Data returned on Record Added

Quote Reply
Blank Data returned on Record Added
I have a problem similar to Mike1. Everything works, and records are added and returned in the search results. The only glitch seems to be that when I add a record, the record added success screen shows the form/fields but no data in the fields. It gives the impression that nothing was added to the person who is adding the record. It does the same thing in auto generate form mode as well. I know I'm probably missing something but I can't find it. Any help?
Quote Reply
Re: Blank Data returned on Record Added In reply to
The only time I've seen this problem is when there was something wrong with the $db_key. Either it is set to the wrong field name or there is something else with your field definitions that's causing a problem. Look to be sure your $db_key is set to *exactly* the same field name as you defined it in the field definitions. If that's correct, look through your field definitions and make sure that you have consecutive field numbers -- no skipping of numbers and no duplicates.


------------------
JPD





Quote Reply
Re: Blank Data returned on Record Added In reply to
Hi,

I am having the same problem. I have checked what you said to check here in this post and I am still having the same error. Any help would be greatly appreciated,

Kylie
Quote Reply
Re: Blank Data returned on Record Added In reply to
If you've checked over the things I suggested to Pisail, and still can't find it, you might want to make your default.cfg file available as a text file on the web. Just copy the file to the same directory as your web pages and rename it to default_cfg.txt. Then post the URL here and I'll take a look at it. Even better would be to also set $db_debug to 1 and give the URL to your database so I can see exactly what happens.

I know that your problem is connected with your $db_key somewhere. Where that somewhere is can be kinda hard to find.


------------------
JPD





Quote Reply
Re: Blank Data returned on Record Added In reply to
Since I fear we may well be dealing with my stupidity here I have done both Smile

The URL of the database is http://www.spiltmilk.net//cgi-bin/at/dbman/db.cgi

cfg has debugging set to 1.

The cfg file as a text document is at http://www.spiltmilk.net/default.txt

Please be gentle with me -- I am still learning how to modify scripts.

Thanks

Kylie
Quote Reply
Re: Blank Data returned on Record Added In reply to
Don't worry. I try to be easy on folks. But I guess I do have my moments. Smile

I've got another browser open to your site as I write, so I can enter things as I see them.

You made the most common mistake I've seen, and it could very well be causing your problem. I see that you don't have a field for the userid of the person that added the record, which is just fine. But you didn't change the $auth_user_field near the end of the script. You need to set that value to -1, since you're not using an auth_user_field.

What's happening is that, even though you only have defined fields 0 through 7, DBMan is creating a field 9 to put the userid into. (And a field 8, too.) Then, when it goes to find a record, it only looks for the fields you've defined and the ID field gets messed up.

You will probably need to delete the records you've added so far and start over. I hope you haven't added too many!

------------------
JPD





Quote Reply
Re: Blank Data returned on Record Added In reply to
I don't see the problem right off, but I have a couple of ideas. First, did you delete the entries in the database? I couldn't tell if you did.

Second, what I would suggest is that you turn "autogenerate" on in your default.cfg file. There could be a problem with your form. This way you can test out your fields to make sure they are set up right.

I did get a username and password, but I am unable to add records, so I couldn't see what is happening. Not that I don't believe you, but it's easier to figure out what's going on if I can see it for myself. Smile


------------------
JPD





Quote Reply
Re: Blank Data returned on Record Added In reply to
Jpd,

Well, I am very pleased to know that I am not the only one making this mistake. Makes me feel like less of a newbie and maybe even kinda cool to be in the company of many :-)

I did as you suggested abbove rushed into admin thinking -- cool, this will be fixed, onto big apples to fry.

No go, it did the same thing. I am sure that I have stuffed something up. I reloaded the cfg file to the same URL as above, you can play around with the database if you like -- it's not in use yet so I can always delete whatever you do.

Where to now faithful leader?

Kylie
Quote Reply
Re: Blank Data returned on Record Added In reply to
OK leader, as per the other thread re: mulitple databses I re-added the userid field and updated the $auth_user_field to 8.

It still did the same thing, I was hoping it would miraculously work but I was disappointed -- that's OK, I never did belive in miracles anyway. ha, ha

I turned debuggng back on, loaded the new cfg file as text to the URL I quoted above.

Over to you.....

:-)

Kylie

------------------
info@spiltmilk.net
Quote Reply
Re: Blank Data returned on Record Added In reply to
Yee ha! That worked.
I did as you said and turned on the autogenerate and the fields and it worked which just proves that it was indeed my stupidity that caused it :-)

Just in case someone else has the same problem what I found when I went back and check the HTML was that I had not updated the name of the textarea field in the form and also that the text area sizes/line no's did not match what I had in the config file.

I am not sure which is was that caused it but they are the two things I changed so it had to be one of them.

Thank you so much for your help jpd, now onto multiple databases -- I hope you wore your bullet proof vest today!

Kylie
Kylie
Quote Reply
Re: Blank Data returned on Record Added In reply to
Yay!!!

I'm sure the problem was that your text field had the wrong name. That's a common error.

I'm in the midst of writing a little tutorial which I'll put up on my website for folks to use -- sort of a "DBMan for the Absolute Beginner." Not that it'll help you any. You're already past that point. Smile


------------------
JPD