Gossamer Forum
Home : Products : DBMan : Customization :

Unable to Modify Record

Quote Reply
Unable to Modify Record
I go the strangest error! This is what happened...

I was trying to modify a record. I inputted the record number and then it showed me a list of records to choose from. I check the radio box of the record that I wanted and then clicked accept. After that, it brought up my record and I began modifying it. When I was done, I clicked "Modify" so that the changes would be written to the database, and then this error popped up.

Code:

Error: Unable to Modify Record

There were problems modifying the record: (can't find requested record)
Please fix any errors and submit the record again.

The only change that I have made that could affect this is...
$db_key = 'Userid';

would this be making my error?

Please help me!!!

Greg
Quote Reply
Re: Unable to Modify Record In reply to
You need to re-format your database after making that change to show that the Userid is the db_key, like the following:

elee|field1|field2|field3

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Unable to Modify Record In reply to
Eliot,
The error still occurs even when I am using an empty database.

Even stranger is that the last letter of the user name in the database changes with each new record. The pattern seems to be alphabetical, but I have not done enough to conclude that as a fact.

This is an example of what I have in my "new" Database.db

1|1|1|heritage
2|2|2|heritagf
3|3|3|heritagg

Where the last input in the database is the "userid" which should be "heritage".


Any thoughts???

Greg

Quote Reply
Re: Unable to Modify Record In reply to
Please copy your default.cfg file as a text file, upload it in a publicly accessible directory, and then post the URL where we can view the file.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Unable to Modify Record In reply to
Eliot, Check out the following link:

http://www.heritageantiquemaps.com/jpdeni/default.txt
Quote Reply
Re: Unable to Modify Record In reply to
i have tried to do a clean sweep and start fresh to see if it was something in the "old" code that I was using. However, I still receive the error even when I do not have any modifications to the scritp. Could you please check my defaul.cfg to make sure that it is ok, and that I have changed the setting correctly.

I have reposted the "new" script without any of my mods at:
http://www.heritageantiquemaps.com/jpdeni/default.txt

Thanks
Greg
Quote Reply
Re: Unable to Modify Record In reply to
No luck, my data is still entered as follows

5|Montana|http://|Web|26-Oct-1999|Project Management|Map of Hawaii|Yes|Yes|author

6|5|http://|Mailing List|26-Oct-1999|General|5|Yes|Yes|authos

7|7|http://|Mailing List|26-Oct-1999|General|7|Yes|Yes|authot
Quote Reply
Re: Unable to Modify Record In reply to
Fred,
What is the point of setting
$db_key = 'userid';

$db_key = 'ID'; should work don't you think? I will try it, and if there are no more posts then it worked.

Greg
Quote Reply
Re: Unable to Modify Record In reply to
Hi Greg,
Just a thought, but you might try and change
Code:
$auth_view_own = 0;
to
Code:
$auth_view_own = 1;
to try and isolate the problem.

That way, only the auth user will see and modify their own records.

It seems that
Quote:
1|1|1|heritage
2|2|2|heritagf
3|3|3|heritagg

may have something to do with
$db_key_track = 1

Quote Reply
Re: Unable to Modify Record In reply to
Thanks,
It seems that you help has solved my first problem. I am now going to start working on the second little problem..

1|1|1|heritage
2|2|2|heritagf
3|3|3|heritagg
Quote Reply
Re: Unable to Modify Record In reply to
PLEASE HELP ME!!!!

Now I am in a real pickle!

I can not change the $db_key_track = 1 because it is vital to my users... BUT my database is corrupt because the last letter of the user name changes in an alphebetical fashion... I have no idea.

PLEASE HELP ME!!!!
Quote Reply
Re: Unable to Modify Record In reply to
Can you post your .cfg and a sample of your .db file

Use the same directory, but name the files cfg.txt db.txt
Quote Reply
Re: Unable to Modify Record In reply to
Sure thing
You can find each at:

http://207.96.11.60/jpdeni/default.txt

http://207.96.11.60/jpdeni/default.db

Greg

Quote Reply
Re: Unable to Modify Record In reply to
Please note that in the above, I have modified the database so that the last letters would be correct...

This is not the actual database that is generated by the scipts, but one that I modified to make work.
Quote Reply
Re: Unable to Modify Record In reply to
Greg,
If you're able to modify it to make it work, that's great!

You should probably review the "Readme" file and check the Authorization options section of your .cfg with respect to permissions. These don't seem to make sense to me. I thought that you wanted the auth user to be the only one who could modify.
Fred
Quote Reply
Re: Unable to Modify Record In reply to
I have not actually fixed the problem... I just edited the text file to make the database "look" like it should. I still need help on it.

I do want the auth user to be the only one to be able to modify the record... I will have to go back and check my default.cfg. But if you can point me in the right direction, I would appreciate it!

Greg

Quote Reply
Re: Unable to Modify Record In reply to
try these changes and see if it works.

Code:
# Authorization Options
# ---------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;

# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)

# Enable (1) or disable (0) logging.
$auth_logging = 1;

# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 0;

# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,1,1,1,0);

# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;

# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);

# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;

# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 1;


# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 9;
Quote Reply
Re: Unable to Modify Record In reply to
I think:
1) you'll continue to have trouble unless you reconcile the default user / permissions with the auth user permissions,
and
2) you won't be able to have the record owner be the only one allowed to modify.

Good Luck
Fred

[This message has been edited by Fred (edited October 26, 1999).]