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

Sean-Khan’s picture

I 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.

cainrus’s picture

similar issue with version 6.19

preg_replace() [function.preg-replace]: Unknown modifier 'M' в файле /home1/adavaru/public_html/sites/all/modules/glossify/glossify.module в строке 379.

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:

if (strpos($term_name, '/')) $term_name = preg_quote($term_name, '/');

klonos’s picture

@cainrus: you might wanna use <code> tags instead of <blockquote> when posting code or warnings. <blockquote> is used to quote other peoples words.

Ivo.Radulovski’s picture

Status: Active » Needs review

The 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.

Ivo.Radulovski’s picture

Version: 6.x-3.x-dev » 6.x-3.0-beta8
WorldFallz’s picture

Status: Needs review » Closed (cannot reproduce)

queue clean up-- reopen if this issue still exists.