I created a new Similarity Object, with the title 'Similar by terms - news' but on the admin page which lists all the similarity objects at /admin/build/similarity, it is truncated to 'Similar by terms - n'. That makes it hard for me to identify all my objects. Also, there is no way to edit the title once it has been created.

Comments

Scott Reynolds’s picture

Title is no editable on purpose. it is going to pave the way for exportable objects. so the name has to be unique an non-changing. Perhaps a title size limit is in order though. to make the table view behave.

mrfelton’s picture

but when creating the object, I have to give it a machine readable name, and a human readable name... surely it's the machine name that needs to be non-changeable, not the human one.

Scott Reynolds’s picture

Priority: Normal » Minor

o duh sry. will take a look later

mrfelton’s picture

also... on a related note... the machine readable name is trimmed also. And what I have ended up with, is a database table called similar_news_by_terms_similarity, but calculate() is trying to insert data into a table named similar_news_by_term_similarity, and failing since that table doesn't exist.

( I set the machine name to 'similar_news_by_terms', not 'similar_news_by_term' )

Scott Reynolds’s picture

Title: Title truncated in admin list, and no way to edit it » Name lengths - Long names causing issues with inseration
Priority: Minor » Critical

Need to enforce the length then at the fapi layer then.

Scott Reynolds’s picture

Title: Name lengths - Long names causing issues with inseration » Name lengths - Long names causing issues with insertion

fix up the form stuff. now on to reproducing your problem

Scott Reynolds’s picture

Status: Active » Fixed
Scott Reynolds’s picture

forgot to mention you need to uninstall and reinstall. not providing update hooks for a -dev release

patchak’s picture

Hello, just installed the module, and I get the following error no matter what name I try to use to add a new similarity :

"Similarity type cannot be longer than 10 characters but is currently 13 characters long."

I uninstalled the module (using drupal uninstall feature) and reinstalled it and still get the same error....weird!

Using latest drupal6 and latest dev of this module.

thanks!
Patchak

Scott Reynolds’s picture

yep, small mistake, forgot to update the form definition for the new schema. Nothing to do with the db schema

Scott Reynolds’s picture

I created a similarity object just like mrfelton described and it saved away fine. The table is name properly, the human readable title is the proper size as well.

Status: Fixed » Closed (fixed)

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