I want to use this module in cck field, so i decided, i will make it. :)
I tried this module, checkout from cvs the latest dev, applied this patches: http://drupal.org/files/issues/performance_0_0.patch http://drupal.org/files/issues/only_first.patch But i get some very interesting bug.
I have a content type with core node->body field, and a cck text field, width same input format.
I've created 3 nodes teszt1, teszt2, teszt3, and tried to reference in body and cck fields too.
The first is, i get ton's of error messages, like this:
warning: preg_replace() [function.preg-replace]: Unknown modifier 'h' in /home/szantog/public_html/drupal/sites/all/modules/glossify/glossify.module on line 383.
warning: preg_replace() [function.preg-replace]: Unknown modifier 'n' in /home/szantog/public_html/drupal/sites/all/modules/glossify/glossify.module on line 383.
warning: preg_replace() [function.preg-replace]: Unknown modifier 'a' in /home/szantog/public_html/drupal/sites/all/modules/glossify/glossify.module on line 383.
warning: preg_replace() [function.preg-replace]: Unknown modifier 'n' in /home/szantog/public_html/drupal/sites/all/modules/glossify/glossify.module on line 383.
I checked the glossify table in database, tried to print the used variables, i didn't solve it..
The next is i see, the glossify filter works "randomly".
Look at this:
http://szantogabor.com/drupal/hirek/teszt1
http://szantogabor.com/drupal/hirek/teszt2
http://szantogabor.com/drupal/hirek/teszt3
There are lots of node title in a cck field and in node->body. Sometimes works, sometimes not. I played with input filters. I tried to turn of all of filters, exept glossary, and found, the glossary filter doesn't work without linebreak filter.
And never works with more words node titles.
I tried to fix it, but the regexp is very hard for me..
Comments
Comment #1
Sean-Khan commentedI have similar issue with version 5.
# warning: preg_match() [function.preg-match]: Unknown modifier 'I' in (...) /modules/glossify/glossify.module on line 102.
# warning: preg_match() [function.preg-match]: Unknown modifier 'F' in (...) modules/glossify/glossify.module on line 102.
# warning: preg_replace() [function.preg-replace]: Unknown modifier 'I' in (...) modules/glossify/glossify.module on line 93.
# warning: preg_replace() [function.preg-replace]: Unknown modifier 'I' in (...) modules/glossify/glossify.module on line 96.
and bunch of other lines. I removed content types to be used the filter on and errors disappeared.
I realized that in function glossify_nodeapi, before
$glossary_term[$term->title] = $term->nid;
I added
$term->title=preg_quote($term->title);
$term->title=str_replace("/", "\/", $term->title);
It fixed the problem. It seems that the titles weren't checked for special characters. Seemed to work without the first and haven't checked the function thoroughly, but I guess it doesn't do harm to add it.
Comment #2
cainrus commentedsimilar issue with version 6.19
These happen, when title contains slashes( example: "TV System Phillips/Morris/Rumba"). it must be escaped if string($term_name) contains any slash. I cannot understand now whole system of module, but i belive that maintainer must check these variable only in one place( maybe one function, which generate these data).
P.s.
variable needs to be checked that way:
Comment #3
klonos@cainrus: you might wanna use
<code>tags instead of<blockquote>when posting code or warnings.<blockquote>is used to quote other peoples words.Comment #4
Ivo.Radulovski commentedThe preg_replace and preg_match functions have been rewritten in the latest beta6 and I'd like to ask you to give that one a try and see if it fixes your problems.
Comment #5
Ivo.Radulovski commentedComment #6
WorldFallz commentedqueue clean up-- reopen if this issue still exists.