Like the module. Found the following bug when upgrading to drupal 4.6 rc (4/12/05).

When running a search, the returned tabs are as follows:

<div class="tabs"><ul class="tabs primary">
<li><a href="/?q=search/contact_dir/pamp">&lt;form
action="/ideas/?q=search/node/pamp" method="post"&gt;
&lt;div class="form-item"&gt; &lt;label
for="edit-contact_name"&gt;contact name:&lt;/label&gt;&lt;br /&gt;
&lt;input type="text" maxlength="100" class="form-text"
name="edit[contact_name]" id="edit-contact_name" size="30" value=""
/&gt; &lt;div class="description"&gt;All or part of the contact
name&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-item"&gt; &lt;label
for="edit-category_code"&gt;category:&lt;/label&gt;&lt;br /&gt;
&lt;select name="edit[category_code]"
id="edit-category_code"&gt;&lt;option value="0"
selected="selected"&gt;[Select]&lt;/option&gt;&lt;option
value="2"&gt;Morris Communications Corporation&lt;/option&gt;&lt;option
value="1"&gt;Morris Digital Works&lt;/option&gt;&lt;/select&gt; &lt;div
class="description"&gt;The contact's category&lt;/div&gt;
&lt;/div&gt;
&lt;input type="submit" class="form-submit" name="op" value="Search"
/&gt;
&lt;/form&gt;
</a></li>
<li class="active"><a href="/?q=search/node/pamp" class="active">content</a></li>
<li><a href="/?q=search/user/pamp">users</a></li>
</ul>
</div>

In the case of a similar problem, the answer was "In 4.6, the function l() takes an additional argument indicating whether the title is html or not. This defaults to FALSE, meaning it is plain text."

Have not tested/attempted.

Comments

bomarmonk’s picture

Well, the contact directory just got updated in CVS with a note that it is compatible with Drupal 4.6. Unfortunately, when I run the module with 4.6 I get the following error:

warning: Invalid argument supplied for foreach() in /home/gov/alpinecounty/WWW/drupal/modules/contact_dir/contact_dir.module on line 401.

The code around that line is:

$categories = _contact_dir_get_categories();
$rows = array();
foreach ($categories as $key => $value) {
$rows[] = array(
form_textfield('', 'name]['. $key, $value, 40, 100),
l(t('delete'), 'admin/contact_dir/category/delete/'. urlencode($key)));

The line that starts with "foreach" is line 401. I'm not sure what the problem is! But thanks to whoever is working on this for 4.6. I look forward to using it.

jtite’s picture

Assigned: agentrickard » jtite

The search_hook was fixed to be compatible with Drupla 4.6.

bomarmonk’s picture

Please read my latest error report above: this error occured after the latest CVS updated module was installed (today 4/20/2005).

bomarmonk’s picture

There must have been something wrong with my installation of the module-- after deleting the database tables and reinstalling a fresh copy, everything works fine.

bomarmonk’s picture

Okay, I guess it really is a bug still! It only occurs when no categories have been created, so I'm assuming something has to be added to the code in order to handle an empty or null string from the contact_categories table.

bomarmonk’s picture

Adding new bug for latest 4.6 problem (so that it won't be mistaken for the search issue at top of this thread).

Anonymous’s picture

kennyg’s picture

Installed drupal and contact_dir from cvs. Get this error - all other modules disabled. Same on any theme,

Fatal error: Call to undefined function: theme_error() in /var/www/drupal/modules/contact_dir/contact_dir.module on line 751

Don't know if this is related to this same problem.