Hi everyone,
I am facing a random and very strange problem.
sometimes, some information no longer appears in the interface, but are still present in the database. a few minutes later by refreshing the page, or sometimes by doing a quick repair, everything returns to normal ā¦
this concerns for example, the field āAssigned Toā in Calls, or UserName in the dashlet āMy activity Streamā
Have you ever seen this? where can the problem come from ?
Hi,
Nope. I have logic hooks on lead module (before saver and after save).
Iāve just reproduce few seconds ago.
go to Calls list -> on some items , assignedTo field is empty,
check DB but everything seem ok
refresh list -> same problem
go to home
go to Leads List
go to Calls List -> everything is displayed correctly ā¦
yes iāve tried some repairs (QP&R , roles, js etc ) , after that it was correct, but problem appears again few minutes later. i canāt do repairs several times a day
sometimes this appears on console when displaying Calls List
suitecrm.log on Calls list refresh
Thu Mar 18 11:45:23 2021 [13285][1][DEPRECATED] Array
(
)
Thu Mar 18 11:45:23 2021 [13285][1][WARN] CSS File Dawn/yui.css not found
Thu Mar 18 11:45:24 2021 [13285][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Trying to get property of non-object: list view data āorder byā is not defined
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Trying to get property of non-object: list view data āsort orderā is not defined
Thu Mar 18 11:45:24 2021 [13285][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:24 2021 [13285][1][WARN] Undefined data index ID for list view data.
Thu Mar 18 11:45:27 2021 [13416][1][DEPRECATED] Array
(
)
In your opinion, what are the absolutely necessary elements to create with code a link between a Call and a User for assignment ?
in fact I have an after_save hook, which will define the assignment ($callBean-> assigned_user_id) according to the zip code of the Lead connected to the Call.
i also create a relation between Call and User with :
In the database, the calls.assigned_user_id field is correct and corresponds to the correct user i want, but sometimes this link does not show up on the interface, and Assigne To is empty on list view or edit view. Maybe I forgot a link somewhere?
if not, is it possible that there is a mixture between the sessions (and therefore the rights) of the users ?
are the old relationships getting replaced by the new ones, or are they accumulating, so that one record actually has many relationship records for it?
could you be having problems due to overgrown tables and slow queries? Suppose that your hook sometimes takes a LONG time to finish. Would that possibly explain the erratic behaviours?
maybe itās a caching problem. When you change the relationships in the hook, maybe the front-end is still using an old cached bean and doesnāt recognize the change until a bit later. Iām not too sure how this works so youāll have to Google aroundā¦
and[quote=āpgr, post:10, topic:78941ā]
are the old relationships getting replaced by the new ones, or are they accumulating, so that one record actually has many relationship records for it
[/quote]
what relationships are you talking about specifically?
for me there is :
calls->assigned_user_id = user->id
calls_users->call_id = call->id and calls_users->user_id = user->id
i think this 500 error was my fault, iāve tried to save a bean in an before_save hook so I think it was looping on itself
and i had nothing in php_errors
what drives me crazy is that I just dumped the beanās data on edit view, and assigned_user_id value is the right one ā¦ I donāt understand why (sometimes) it doesnāt load with Assigned To empty, and other times everything works fine
If I were you, I would really go back to the Bean syntax. That API thing is much more complicated, you have to really understand every nuance of the relationship to get that right - and it seems youāre doing something wrong.
I left an answer on the other thread to give you another thing to try with the $bean->rel->add($relBean); syntax.
But that did not explain why the assignedTo disappears and reappears without modifying anything ā¦
In the sugarFeed dashlets, user name causes problem too, sometimes is displayed, sometimes not ā¦ and it is synchronized with the problem on assignedTo, maybe a problem in the core at user restoring from DB