Gossamer Forum
Home : Products : DBMan : Customization :

Admin View Messed Up

Quote Reply
Admin View Messed Up
I've spent several days trying to figure this out with no luck. I made some changes to my database earlier this week (including adding three new fields). I added those in right before the very last field. (The last field is a deliberately blank field because I had trouble getting the next to last field to display at times, and that seems to resolve that problem.) I also added in a new javascript routine that will display popup text on mouseover of a few of the fields. Because these were major changes, I made all the changes and uploaded and tested on a second site I keep for that purpose. Everything worked perfectly. I made the same changes to my live cfg file and uploaded it, along with the html.pl file already used successfully in the test environment. (And I've compared the cfg files line by line for any inconsistencies...the only ones that exist are server configurations.) From the user's standpoint on live, everything is fine. All records display correctly, with entries in the correct fields. When I sign on as the administrator, however, it's a different matter. If I do a search, the results are displayed correctly (I'm using the short/long view, btw). However, if I select "List All", field 2 response shows up in field 3, field 3 response in field 4, and so on. If my db file were screwed up I could understand this, but it displays fine in the test environment and it display fine in the live environment for a non-admin user or for the admin user if I do a search. The list all function is the only one that displays incorrectly and, when I select a record from the short view to view the long view of the record, it also has the entries displayed in the wrong fields. I tried creating a new admin account, but it displays the same way also.

Any clues where I should look to solve this problem? I'm at a loss at this point.

Thanks!

Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
Quote Reply
Re: Admin View Messed Up In reply to
Hi Melanie,

If you visit the topic ERROR RECORD which is a few topics below your post, you'll see in my first response a detailed explanation of what has happened.

Essentially, you have added fields to the db.cfg file but, not added place holders for the fields in your existing database. You'll need to add | characters in your database to make things display properly.

field1|field2|field3|newfield1|newfield2|newfield3|lastfield

You need to add those pipes in there.

Quote Reply
Re: Admin View Messed Up In reply to
Karen, actually, I have already added the pipes (along with a default value of 0 for each new field) to my .db file. That's why I'm so confused. It works correctly for each individual user, and it works correctly for the admin doing a search, but it does not display correctly for the admin doing a list all. If the display were incorrect for all, then I would assume I had missed a pipe or placeholder in the .db file, but that's not the case. I also chose carefully where to add the new fields so that it would be easy to add them in the .db file with little chance of an error. My initial thought was that I had messed up the .db file but then when signing in as a regular user (and signing in as several different users) and reviewing old records and creating new ones, it appears the .db file is fine. Which leaves me scratching my head as to what's causing the problem.

hmmm...another point perhaps of importance is that I have the database configured so that each user can view only his/her own entries whereas the admin can view all records.

Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
Quote Reply
Re: Admin View Messed Up In reply to
Hi Melanie,
In Reply To:
The list all function is the only one that displays incorrectly and, when I select a record from the short view to view the long view of the record, it also has the entries displayed in the wrong fields.
Is this in both user and admin that the long view is inaccurate?

Could you save your html.pl file as a text file (html.pl.txt) and upload it somewhere accessible via the web? Post the location here please if you can.



Quote Reply
Re: Admin View Messed Up In reply to
In Reply To:
In reply to:
------------------------------------------------------------------------

The list all function is the only one that displays incorrectly and, when I select a record from the short view to view the long view of the record, it also has the entries displayed in the wrong fields.

------------------------------------------------------------------------


Is this in both user and admin that the long view is inaccurate?
No, it's *only* in admin, and it's incorrect in both the short and long view. But, for the basic user, everything looks perfectly fine. I've uploaded the html.pl file and it may be viewed at http://www.somemoorecats.com/test/jhtmlpl.txt. If you would like to see the database in action to get a better feel for what it's doing, let me know and I'll send you privately information to access it.

Thanks!


Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
Quote Reply
Re: Admin View Messed Up In reply to
Despite what you say about checking your db file, my guess is that you have an error in there. This happened to me early on in development. I found a small error in one of the fields near the top of the database file.
Individual records often displayed correctly, but the List All showed the errors. This makes sense when you think of how the two look up methods differ.
It may be something as simple as a pipe delimiter being absent, or replaced by a comma (perhaps after converting the format) or a pipe replacing a "rogue" comma.
You will know exactly how many records you haven and how many pipes there are per record. Multiply these to get the total number of pipes. Using EditPlus or similar, do a global replace of the pipes with, say, a brace (which is unlikely to be used in the db text). The editor will then tell you how many pipes there were. Just use undo afterwards to replace the pipes, then look for the missing pipe if the number is incorrect.
Another way is to opne the file in Excel, which will enable you to spot incorrectly placed fields more easily.
Best of luck.


David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
Quote Reply
Re: Admin View Messed Up In reply to
Thanks, David. You're right. I found the problem last night. Actually, there were a couple. Karen helped me find a problem created by using the alternate color table in the short view, such that extraneous < tr > and < / tr> tags were being created. But that still didn't solve the display problem. I finally found two corrupted records within the .db file. There are over 2100 records, each with 84 fields, making it difficult to easily identify the problems. I found them by doing something very similar to your suggestion, searching for pipe delimiters and checking the count. Both of the corrupted records had been cut off very short, so I'm not sure what happened to them, but it wasn't a misplaced pipe. Anyway, it appears to be fixed now. And, yes, after I thought about it, I can see why it displayed correctly from the user's view and not from the admin, since I wasn't actually viewing those particular users' records when I signed on as a user.

Thanks!

Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
Quote Reply
Re: Admin View Messed Up In reply to
Glad you found it Melanie. Drives you mad, doesn't it?

I like your site. Very attractive. And it was done on a Mac. Amazing...........

(Sorry)

David



David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
Quote Reply
Re: Admin View Messed Up In reply to
In Reply To:
Glad you found it Melanie. Drives you mad, doesn't it?
Indeed it does! Glad to have finally found it.

In Reply To:
I like your site. Very attractive. And it was done on a Mac. Amazing...........
Thanks! And har! Actually, I'm used to the abuse Smile but I'm not giving up my mac. Laugh



Melanie
http://www.somemoorecats.com/
http://www.okhima.org/