Topic: Agent edit by admin

Hello!
When I go to /admin/agenteditor.php under Admin account it takes me to the page where I can edit agents. Unfortunately, if I try to change e.g. password of an agent, or his name or anything else, I press "Save" button, page reload,s but nothing actually changes.
The same happens when agent himself tries to change anything in his account details at /accountedit.php
Any ideas about that?

Re: Agent edit by admin

accountedit.php
line 66:

.... WHERE id='$current_user'";

needs to be:

 WHERE agent_id = '$current_user'";

I could not duplicate the error when using admin/agenteditor.php

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: Agent edit by admin

No, didn't work.

The following errors come up after I press "Save" button:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/svoidom/public_html/db2/admin/admin_func.php on line 146

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/svoidom/public_html/db2/admin/admin_func.php on line 138

where /home/svoidom/public_html/db2 is www root of the web-server.


At the same time line "Agent #4 has been updated..." appears, as though agent has been updated, but actually nothing changes.

Last edited by antOOn (2008-03-31 21:25:42)

Re: Agent edit by admin

Are you using the very latest admin/admin_func.php and admin/agenteditor.php files?
I'm uploading a new snapshot, grab just the admin/admin_func.php file and see if that makes a difference. If it's showing the agent number, it should be inserting the changes into the database.

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: Agent edit by admin

I'm using 3.0-0.rc7  +  files from archive that you gave here: http://freerealty.rwcinc.net/snapshots/ … 072113.tgz

I'm uploading a new snapshot, grab just the admin/admin_func.php file and see if that makes a difference.

Sorry, I don't see where I can get it.

Re: Agent edit by admin

http://freerealty.rwcinc.net/snapshots/ … 081751.tgz

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: Agent edit by admin

Nope. Still doesn't work.
First I updated only admin/admin_func.php

I'm uploading a new snapshot, grab just the admin/admin_func.php file and see if that makes a difference.

As far as I can see, only line #1 has been changed and only comments were added to this file in comparison to the previous snapshot. Thus, I don't think it could change a lot.

Then I tried to update admin/agenteditor.php also.


Though it does show agent number, no changes are made.

The following errors show up:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/svoidom/public_html/db2/admin/admin_func.php on line 146

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/svoidom/public_html/db2/admin/admin_func.php on line 138

Last edited by antOOn (2008-04-07 03:01:04)

Re: Agent edit by admin

In theory if you see the "Agent #(ID) has been updated" then it should be. The script is only supposed to show that line after the update. I'm puzzled why it would not be. The other errors do not seem to be directly related, although they may indicate that the agent_id is being unset somewhere in the process. I will keep poking at it, I suspect that it could have to do with the variables - I will work on pulling them directly from the arrays. This was a problem before on your install wasn't it? Variables not being recognized?

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: Agent edit by admin

This was a problem before on your install wasn't it? Variables not being recognized?

Yes, you're right. We had some problems with variables. Don't remember exactly what it was. Probably it was something with "cur_page"...

Re: Agent edit by admin

I will keep poking at it, I suspect that it could have to do with the variables - I will work on pulling them directly from the arrays.

Hello!
Any news for that issue?

Last edited by antOOn (2008-07-07 04:12:02)

11

Re: Agent edit by admin

I made a number of changes to the development code on my laptop. I will see about pushing it up for testing. I moved lots of code from index.php, admin.php, etc. into func.php.

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

12

Re: Agent edit by admin

I pushed it up to: http://freerealty.rwcinc.net/snap.php

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: Agent edit by admin

Finally I found what was the problem. Now I have mixed feelings of joy and feeling a little stupid. Still I post it here hoping that it might help someone.

When you come to editing an agent, having changed some fileds, before you press "Save", look at the dropdown User level menu to the right. At my site each time I edit an agent, this dropdown menu is selected at empty line. This is the point! Nothing will be saved if you leave this fiels as is (just what I did all the time. I thought why should I select anything in that dropdown, if I wasn't planning to change anything there). Anyway you SHOULD select user level each time you edit an agent! Only then the changes would be saved.

Last edited by antOOn (2008-09-03 04:42:58)

14

Re: Agent edit by admin

Are you saying that the level was not selected at all or that the level is not properly displaying when you select a user? ie. if you go to edit a user does it show which level that user is or does it always show blank?

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: Agent edit by admin

If I go to edit a user it always shows blank (none level selected). It let's me select a level with dropdown, but initially shows blank.