After activating the module and creating a node with a hashtag in, the module successfully creates a term with the same name (although it includes the "#" as well), but the node itself is not associated with the term

CommentFileSizeAuthor
#1 hashtags_bug1.JPG109.4 KBradamiel

Comments

radamiel’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new109.4 KB

Cannot reproduce a bug:
My steps:
1)Install D7.9 version.
2)Install Hashtags.
3)Add Content > Articles > Name:Art1; Body: adsasd asd asd #asd asda sdasd as d; submit form.
Can see created #asd which is associated with created node.
See file attached

adamgerthel’s picture

I tried reproducing it again using vanilla D7.9 like you, and got the same results as you did, but when I added another content type it didn't work. The content type I created was a basic default content type that had a title and a default body field.

The tag-field doesn't show up on node edit either (on the new content type).

Update: the term itself is created, but the reference to the term isn't being created.

alechko’s picture

ok, here's my 5 cents:
When installing Standart installation, all good, hashtags recorded as terms and associated with the article node.
When creating new content type, it not always works, so I've started looking around.

I'm using a Minimal installation, and when installing the hashtag module, the tags were created but not associated with my custom content type.

When installing the Standart install, Hashtags module uses the existing Tags vocabulary that created with the installation, but in minimal install the module creating new vocabulary "Hashtags", and the field it's creating for the use of this vocab is taxonomy_hashtags
and that's where the problem:
hashtags.module:235

/**
 * Check whether a content type can be used in a hashtag. 
 */
function _hashtags_node_check_node_type($node) {
  // Fetch information about the forum field.
  $field = field_info_instance('node', 'field_hashtags', $node->type);
  return is_array($field);

the field module looking is field_hashtags, while the one exists called taxonomy_hashtags
so, what you have to do, is to replace it with taxonomy_hashtags

another problem:
I'm using prefixes for my DB, and all the time I've got SQL errors, so I had to manually add the prefixes to
hashtag.module:206

function hashtags_node_get_terms($nid) {
  $terms = array();
  $output_type = variable_get('hashtags_output_type', 2);
  if ($output_type == HASHTAGS_ALL_TAGS_AS_LINKS || $output_type == HASHTAGS_ONLY_HASHTAGS_AS_LINKS) {
    $vid = variable_get('hashtags_vocabulary', '');
    $only_hashtags_condition = '';
    if ($output_type == HASHTAGS_ONLY_HASHTAGS_AS_LINKS) {
      $only_hashtags_condition = " AND LEFT(ttd.name,1) = '#'";
    }
    $sql = "SELECT ttd.tid, ttd.name FROM `tx_taxonomy_term_data` ttd
    INNER JOIN `tx_taxonomy_index` ti ON ttd.tid = ti.tid
    WHERE ttd.vid = :vid AND ti.nid = :nid $only_hashtags_condition";
    $result = db_query($sql, array(':vid' => $vid, ':nid' => $nid));
    foreach ($result as $term) {
      $terms[$term->name] = $term->tid;
    }
  }

  return $terms;
}

plz fix this one...
EDIT:
I think you want to look into that one
http://api.drupal.org/api/drupal/includes--database--database.inc/functi...

jacobpov’s picture

just installed this and noticed that it doesn't work . I am having the same issues

jacobpov’s picture

I did what you said now it can gather the tags but the tags do not turn into links when I view the node.

alechko’s picture

I've noticed that symptom, when the DB has taxonomy_hashtags field set up, while the module is looking for field_hashtags.

if you have taxonomy_hashtags field set, you could alter moudle code to get that field, or you could add new field called field_hashtags from drupal admin, and it will insert this field into DB.

also, if you created custom content type, you have to point the exsiting hashtag field to that content type. I did that by phpmyadmin, in table field_config_instance in bundle column.

the goal is to get the field setup in DB to be identical to the module code.

rickharington’s picture

Hey guys the module isn;t working for me at all and I just don't know enough about databases to get this going. Is there a patch that I can apply?

rickharington’s picture

Ok I can confirm on a fresh install that the tags are being associated with a core node. In my case article. However the body is not displaying the tag as a link. Any idea how we can get this working through the module?

rickharington’s picture

Any one else finding this alechko is spot on. I was just being a noob. Make sure there is a tags (term reference) field in your content type and change the module code to field_tags or field_hashtags or whatever.

This doesn't fix the module though.

radamiel’s picture

Status: Postponed (maintainer needs more info) » Fixed

fixed in 7.x-1.4 release.. sorry for late feedback

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.