The new version 5.x-1.x-dev (http://drupal.org/project/glossary) works great - good work!

But I still miss how to empty the cache_filter table. Any changes in glossary, all the same whether I edit a term or add one or change the indicator settings. The content in the node-pages still has the old data in it, and/or the old attitudes. I always must clear the filtertable manually.

In the description to glossary.module is written that it works with nicelinks.module. That is not completely is.
I found the module only for drupal 4.5. To run it in drupal 5.x I had to add an .info-file and to insert a slash at the begin of the path to nicelinks.css and nicelinks.js in nicelinks.module. And then the DHTML CSS functions tooltips only works with glossary term indicator superscript (with icon and acronym left not).

CommentFileSizeAuthor
#7 glossary14.txt8.28 KBnancydru
#3 glossary9.txt2.2 KBnancydru

Comments

nancydru’s picture

Assigned: Unassigned » nancydru

The Nicelinks module is not supported on 5.x. I may look at it after a while, but don't count on it. In my new documentation there will be no mention of it.

The cache_filter table can be emptied manually with phpMyAdmin. I don't know if the Devel module can do that one specifically, but that module has also had some problems, so I wouldn't suggest installing it if you don't need it.

I am still pondering over whether to make it a configuration option or always doing it when the configuration is changed. Having now seen this post, I'm leaning towards "always." It is not hard; I'm just concerned about possible performance impacts.

nancydru’s picture

I have definitely determined that Glossary needs to clear the cache_filter table at least when it changes the indicator type. Probably also when the taxonomy changes. It's on my todo list.

Can you send me your changes to Nicelinks?

nancydru’s picture

Status: Active » Needs review
StatusFileSize
new2.2 KB

This patch changes glossary_taxonomy to always clear the full filter cache.

It also adds checks in the input filter form to see if any of the indicator fields have changed and, if so, clears the filter cache.

This should clear up several problems.

moshe weitzman’s picture

Status: Needs review » Needs work

the idea is great, but we do not make any changes in a validate hook. thats for validating. this clear cache has to happen on a submit handler. but yes you need to know if the value changed. so to do this, do the check during validation and if true, stick a flag in the form array with form_set_value(). then check for that flag in the submit before clearing cache. this is some advanced fapi mojo.

nancydru’s picture

I would have done that, except the _submit function is not in the Glossary module. According to the Forms API there is no submission analog to the "#validate" for me to intercept it. Is the API incorrect? Yes, I could intercept the entire form, but that is really messy. Would that be preferable?

nancydru’s picture

#197277 - committed a change to clear the filter cache when the vocabulary is updated.

That still leaves the problem of clearing the cache when the options are changed.

nancydru’s picture

StatusFileSize
new8.28 KB

Okay, let's try it this way. This patch checks if there is currently any cached data and gives the admin a link to clear it. It also provides information on caching in the site.

nancydru’s picture

Status: Needs work » Needs review
moshe weitzman’s picture

that patch does not strike me as especially elegant. did you investigate my proposal above?

nancydru’s picture

See #5. I'm not a big fan of intercepting submits.

nancydru’s picture

Status: Needs review » Closed (duplicate)