Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Removing Ophans links

Quote Reply
Removing Ophans links
I get this message when I do a "Repair Tables"
"There are 47137 links that are not in a category."

How can I remove this Ophan links? Run "Repair Cat. tree."?

Quote Reply
Re: [Sies] Removing Ophans links In reply to
The check should list the orphaned links right after that message. You will have to delete these links individually, or write some code or SQL to delete them all. I will probably add a function for a future release that will delete all the orphaned links in one go.

Adrian
Quote Reply
Re: [brewt] Removing Ophans links In reply to
How about assigning orphaned links to a category?

Sometimes links are orphaned by a glitch or crash, or other oddity, but you do not want to lose the links. Maybe in a category move the category disappeared and the links didn't.

So, offering a move or reassign the links should be an option.

I had some manual code that moved all the links to a new category by creating a CatLinks record for all the orphan ID's. not pretty, but it worked.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Removing Ophans links In reply to
It already is an option. The list of orphaned links allows you to modify or delete the links individually.

Adrian
Quote Reply
Re: [brewt] Removing Ophans links In reply to
Yeah, but I have over 43,000 Ophan link. That will take a while.
How do I move them to another category?
Quote Reply
Re: [Sies] Removing Ophans links In reply to
Move them manually (ouch!), or write some code to create the needed CatLinks entries (though that will be hard to do unless you're moving them all into the same category).

Adrian
Quote Reply
Re: [brewt] Removing Ophans links In reply to
That's the problem. A mass mover needs to be had.

The ideal would be to have a list of the links, just title/date/url with a check box, and a "all/none" option. And an option for how manylinks per page. Usually links are uploaded or grouped by ID especially during import, so that links with the same category would be next to or near each other.

By doing the mass select you can change the page size to get 50, 100, etc links so you can all/none them rather than doing box by box select. if you have 42 links to move, page size of 50 means you only have to uncheck 8 boxes, not select 42 of them.

Then, adding in a box to select the category to move them to, is just inserting catlinks entries for them.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [Sies] Removing Ophans links In reply to
If you want to move them all to a new category:

What I did (I'd have to look up the exact procedure) was to use a good text editor, take the ID's as listed in the orphan report and turn them into a list.

Then, I had a very short script that ran through the list and inserted them into the catlinks table. That automatically makes them a non-orphan.

I thought about going into the code, and just adding a few lines so that when an orphan is found a catlink record is created at the same time it's displayed.

I used a category I made up just for that purpose. "Uncategorized Links" was one of them.

For short lists of links, I used some direct SQL queries. I have the code somewhere. I also used an IN query on the list of ID's to turn "isValidated" off, so they would be hidden, and by keeping the list of ID's I could turn them back on if I needed to.

Some automated forms/scripts would have been better. But I'm not running 200,000 link directories any more. I've moved to smaller, under 20k links for the most part.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.