kayamaox / redmine-dmsf

Automatically exported from code.google.com/p/redmine-dmsf
0 stars 0 forks source link

dmsf_attrs[1] is equal to E'' #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hey Guys,

Really like this module, it is extremely useful and easy to use. Especially 
love the jquery upload box!

Finding an issue in the search, the error reads:

ActiveRecord::StatementInvalid (PGError: ERROR: invalid input syntax for integer: "" LINE 1: ...sf_files"."deleted" = 'f' AND "dmsf_files"."id" = E'')) LIM...

SELECT * FROM "dmsf_files" WHERE (("dmsf_files"."deleted" = 'f' AND "dmsf_files"."id" = E'')) LIMIT 1): vendor/plugins/redmine_dmsf/app/models/dmsf_file.rb:251:in `search'


For some reason dmsf_attrs[1] is equal to E'' (null?).

My hack is to change the line from

find_conditions =  DmsfFile.merge_conditions(limit_options[:conditions], :id => 
dmsf_attrs[1], :deleted => false )

to

find_conditions =  limit_options[:conditions]

Any ideas how to really fix the issue?

Thanks again.

Regards,
Will

Original issue reported on code.google.com by williams...@gmail.com on 7 Jun 2011 at 1:25

GoogleCodeExporter commented 8 years ago
This is caused by errors in previous versions of DMSF that creates wrong 
filenames. 

For fulltext search there is required id of db record at start of storage 
filename. DMSF prior to 0.7.x had error that caused sometimes these metadata 
weren't added.

Original comment by vit.jo...@gmail.com on 7 Jun 2011 at 5:47

GoogleCodeExporter commented 8 years ago

Original comment by vit.jo...@gmail.com on 7 Jun 2011 at 5:59

GoogleCodeExporter commented 8 years ago

Original comment by vit.jo...@gmail.com on 12 Jun 2011 at 9:08