Download & Extend

Deleting node does not free up Glossify Keywords

Project:Glossify Internal Links Auto SEO
Version:6.x-3.0-beta3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

I am putting this as a feature request, although it may be more accurately described as a bug.

If I assign a Glossify Keyword manually to a node, and then later delete the node, Glossify still considers the keyword in use and will not let me reuse the keyword. In the attached screenshot I created a node titled "Test Two" and gave it the Keyword "TestB". I then deleted the node. When creating node "Test Three" I tried giving it the Keyword "TestB".

Upon saving I get the info message: Keyword: 'TestB' already exists for

Since the node it should link to doesn't exist anymore the name is not there. And as expected the use of the keyword "TestB" in text does not get Glossified.

It would be nice to have an ability to free up the orphaned keywords if the referenced node gets deleted. This would help reduce unneeded checks and allow for reuse of those keywords. That said, I am not sure of the best approach:

1. When a node gets deleted, the keyword table is updated. (Not sure this is even possible.)

2. When the check on whether the keyword already exists is performed, add a condition that checks if the original node still exists. If not, update the table with the new value. If not, return the error pointing to the existing node.

3. Implement an admin page that identifies and cleans out orphaned keywords. Perhaps it displays a chart that compares the keyword table to the node table and provides an option to delete orphaned key words.

AttachmentSize
Glossify_Keywords_Taken.png49.18 KB

Comments

#1

I rolled a fix for this into my patch at #917366: Performance patch, if you can test. It deletes the keywords via hook_nodeapi when the node is deleted.

#2

Status:active» needs review

Again, great work and thanks for the time and effort you spent on your patch.

#3

Well, on beta10 I no longer have this issue. Not sure if that's cause the performance patch is now part of 10 or not. Either way, deleting a keyword from a node that previously had it allows it to be reused. And deleting a node with a keyword allows the keyword to be reused.

#4

Ugh. Blackberry fail. Sorry about the multiple comments.

#5

#6

#7

so we can close the issue?