Open cyb456 opened 1 year ago
I was able to hacky fix it by adding if($this->object_name == 'Case'){ return true; } to SugarBean.php in hasCustomFields()
For some reason hasCustomFields() is blank/false for Cases when running the elasticsearch index
I am again asking if someone could look into this, still occuring after pulling in the changes from https://github.com/salesagility/SuiteCRM/pull/10275
the root issue is $GLOBALS['dictionary']['Case']['custom_fields'] seems to always be false when run from robo or cron(command line)
So if I have custom field in my cases module, it breaks the indexing.
@JanSiero Any suggestions?
Can anyone get a stack trace at that point (function hasCustomFields), when running from the Scheduler or cron (the cases where it fails)? Knowing where it is being called from would likely provide clues about why it's failing.
Maybe it's as simple as ensuring there is an instantiation of the global variables before accessing them.
Can anyone get a stack trace at that point (function hasCustomFields), when running from the Scheduler or cron (the cases where it fails)? Knowing where it is being called from would likely provide clues about why it's failing.
Maybe it's as simple as ensuring there is an instantiation of the global variables before accessing them.
There are multiple places within/called from the SugarBean->get_list() method where it checks that to make the query, what I essentially did to patch it for myself was replace
if (isset($this->custom_fields))
with
if (isset($this->custom_fields) || $this->object_name == "Case")
(along with inside the hasCustomFields() method from my first reply)
wherever I saw it, obviously this is not a real solution
one other thing I noticed is LIMIT 1000, 1000, does that mean the first 0-1000 worked?
LIMIT
is not compatible with Microsoft SQL Server or standard SQL, so it should be changed to be compatible with the standard SQL.
For example: https://github.com/salesagility/SuiteCRM/blob/b39d9610f705807ce4b595c04031b001c2f0c819/include/database/MssqlManager.php#L433
LIMIT
is not compatible with Microsoft SQL Server or standard SQL, so it should be changed to be compatible with the standard SQL. For example:
That should probably be in a new issue then
Done! Issue #10350
Issue
I have a relate field to a custom module made in studio. This is stored in cases_cstm.mymodule_id_c
I get this error when trying to do a full index. After examing the query in suitecrm.log the join table is missing the cases_cstm join. After manually changing the query in phpmyadmin to join cases_cstm the query does not error.
Expected Behavior
no error
Actual Behavior
error
Possible Fix
detailed above
Steps to Reproduce
Context
Your Environment