Quicksearch problems revisited - ca_storage_locations.is_enabled

Once a long time ago....I was working to try to figure out why quicksearch vs normal search were not returning storage locations. After many trials with search indexing, etc I have found the problem to be that:

ca_storage_locations.is_enabled is NOT defined, so it will always fail in QuickSearchController.php

ca_storage_locations.Is_enabled IS defined.

changing:

return $o_storage_location_search->search(($ps_search == '*') ? '(ca_storage_locations.is_enabled:1)' : '('.$ps_search.') AND (ca_storage_locations.is_enabled:1)', $search_opts);

to

return $o_storage_location_search->search(($ps_search == '*') ? '(ca_storage_locations.Is_enabled:1)' : '('.$ps_search.') AND (ca_storage_locations.Is_enabled:1)', $search_opts);


If I change ca_storage_locations.is_enabled to ca_storage_locations.Is_enabled then it works just fine.

I do not see any place where Is_enabled is defined. /app/models/ca_storage_locations.php has it as 'is_enabled', the ca_storage_locations mysql table has it as 'is_enabled', search_index.conf has it as 'is_enabled'


Any idea? I am so close to solving this!


Thanks

Bruce

Comments

  • almost forgot:

    1523 x 670 - 298K
  • It works on my test systems and the demo as-is. Did you change anything in your configuration or code?

  • not that I know of. This has been a long evolving database, so errors could have crept in over time and revisions.

    I do have use a custom profile, but that's mostly for print templates.

    I just dont see where Is_enabled is mentioned anywhere within a file. Unless there is something within the database that could redefine is_enabled to Is_enabled. Localization?

  • Might this be a MySQL thing? I see 'lower case file system' is set to OFF, and 'lower case table name' is set to 0.


    The demo works with both .is_enabled and .Is_enabled. My system ONLY works with .Is_enabled.

  • Where is 'lower case file system' set? Can you do a DESC on the ca_storage_locations table in your system and post the output. Eg. in MySQL run this query:


    DESC ca_storage_locations;

  • They are displayed (I cant change them) in the Variables tab of the mySQL server in mysqladmin.


    Field Type Null Key Default Extra

    location_id int(10) unsigned NO PRI NULL auto_increment

    parent_id int(10) unsigned YES MUL NULL

    type_id int(10) unsigned YES MUL NULL

    idno varchar(255) NO MUL NULL

    idno_sort varchar(255) NO MUL NULL

    is_template tinyint(3) unsigned NO 0

    source_id int(10) unsigned YES MUL NULL

    source_info longtext NO NULL

    color char(6) YES NULL

    icon longblob NO NULL

    hier_left decimal(30,20) NO MUL NULL

    hier_right decimal(30,20) NO MUL NULL

    access tinyint(3) unsigned NO 0

    status tinyint(3) unsigned NO 0

    deleted tinyint(3) unsigned NO 0

    rank int(10) unsigned NO 0

    is_enabled tinyint(3) unsigned NO 1

    view_count int(10) unsigned NO 0

    submission_user_id int(10) unsigned YES MUL NULL

    submission_group_id int(10) unsigned YES MUL NULL

    submission_status_id int(10) unsigned YES MUL NULL

    submission_via_form varchar(100) YES MUL NULL

    submission_session_id int(10) unsigned YES MUL NULL

    idno_sort_num bigint(20) unsigned NO MUL 0

Sign In or Register to comment.