Frontpage

Drupal 7: delete orphaned comment data

Submitted by Erik Wegner on Sat, 11/10/2012 - 15:17

These commands will delete records from the tables field_data_comment_body and field_data_revision_comment_body, so be advised to make a backup first!

DELETE t1.*
FROM field_data_comment_body t1
    LEFT JOIN comment t2 ON t1.entity_id = t2.cid
WHERE t2.cid IS NULL

DELETE t1.*
FROM field_revision_comment_body t1
    LEFT JOIN comment t2 ON t1.entity_id = t2.cid
WHERE t2.cid IS NULL

OPTIMIZE TABLE `field_data_comment_body` ,
`field_revision_comment_body`

Ratings deleted

Submitted by Erik Wegner on Sun, 07/03/2011 - 14:43
Aufmacherbild

The tips on this page can be rated with the fivestar widget. It now happend that more and more entries got a very bad rating. As a result, the list of good rated articles on the front page shortened and became just on entry.

Package glossaries: Create a glossary, a list of symbols, acronyms and abbreviations

Submitted by Erik Wegner on Wed, 04/21/2010 - 16:25
With the help of the package glossaries one can easily create a glossary and/or lists of symbols, acronyms and abbreviations. The package utilizies the makeindex command that is already included in any latex environment. The glossaries package is the successor to the package glossary from the same author.