Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Build Pages is over-writing my links.db

Quote Reply
Build Pages is over-writing my links.db
I am at a loss... I have 143 records, @ 100 of which I am trying to change to be considered "new." To do this quickly, I simply did a find/replace in a text editor on the links.db file. After saving and uploading the new links.db file, I can go into the links admin section and view one of the modified records. In this view, it reflects the change and shows that it is in deed a "new" record.

BUT

When I select build all, the dialog shows that no "what's new" pages are created. Furthermore, when you open links.db - it is the old version...

At first, I thought it was something with my FTP program - maybe a cached version or something, so I tried using file man. With each (ftp and fileman) - I attempted editing the file on the fly (pasting the new info and saving), and then I tried deleting the file and uploading the new (and resetting the permissions). Neither way has worked... Everything results in nothing being created in the "what's new" section and the links.db being written over with the old version.

What am I doing wrong?

Quote Reply
Re: [shiner] Build Pages is over-writing my links.db In reply to
I have done some further testing. I can add records to the db, and they stay. What appears to be happening is that the isNew field is being re-written upon executing the BUILD ALL. When I say re-written, all of the variables are being changed to NO, reguardless of what they were set at before.

Again, Thanks in advance!
Quote Reply
Re: [shiner] Build Pages is over-writing my links.db In reply to
Whether a resource "isNew" or not doesn't depend on the Yes/No option in your admin panel, but on your db_new_cutoff settings in links.cfg.
Quote Reply
Re: [Tho:mas] Build Pages is over-writing my links.db In reply to
Thomas,

Thanks for replying - I did not change the value of $db_new_cutoff

Here it is:

# Number of days a link is considered New.
$db_new_cutoff = 14; # 14 days old.

Now the dates for those that I just added are 17-Feb-2002 and 18-Feb-2002

so, with that being the case, where should I look?
Quote Reply
Re: [shiner] Build Pages is over-writing my links.db In reply to
Sorry, my misunderstanding. Apart from modifying your database, have you added any modifications recently?
Quote Reply
Re: [Tho:mas] Build Pages is over-writing my links.db In reply to
I have added Paul's "file upload" mod and that is it. I have added two fields to the data base

"file"

and

"PictureURL"

I believe everything in links.def is correct. The way I ruled this change out is the fact that when in the admin console, and if you view a record, you will see that "isNew" is reflected as "yes."

I understand that the new_cutoff has a part in the equation, BUT this is where it may be getting off -

ASSUME: Something in the script is designed to change those links marked as new to isNew="NO" after the cutoff date of 14 days is reached...

This is where I presume the problem lies. Even though the database reflects that is_New="Yes" it would still be changed when I hit "BUILD ALL" - and the assumed mechanism goes into action and checks the "date added" against "today's date." Something is causing it to think that these should no longer be new - and this the script is re-writing that field as isNew="NO."

I think we are getting closer, but I don't know links enough to say exactly what is happening, but I can at least confirm now that it is not being overwritten by an old file, instead - that particular field is being changed by the script when I execute the "build all."
Quote Reply
Re: [shiner] Build Pages is over-writing my links.db In reply to
I replied to your duplicate thread.... but here goes again.... You cannot force a link to be new (or not). A link can only be new if the date in the Date field is within the time period specified by the cutoff variable. To change a link's status back to new, simply change the date. Links will automaticly update the isNew field.

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] Build Pages is over-writing my links.db In reply to
Phil,

Sorry for the duplicate - I started the other in windows accidently - then could not figure out how to delete or edit it.

The dates for the links I want to show as new are

17-Feb-2002

and

18-Feb-2002

This is where my problem is - the dates SHOULD show up as new. I added them one at a time using the add feature in the admin console and this is the date that it pulled up. IMO that would rule out my server time/date being off.