SugerCRM Warning: Creating default object from empty value - editor

when i am trying to edit field from sugerCRM editor then i am getting this issue.
even i try to use this patch as well as a solution for this error but still getting this issue.
https://github.com/sugarcrm/sugarcrm_dev/pull/143
( ! ) Warning: Creating default object from empty value in C:\xampp\htdocs\crm\trunk\modules\ModuleBuilder\views\view.modulefield.php on line 151

I found the other answer almost correct but it generated further warnings, this seemed to solve them completely for me:
if(!isset($module->mbvardefs) || is_null($module->mbvardefs)) {
$module->mbvardefs = new stdClass();
}
$module->mbvardefs->vardefs = $dictionary[$objectName];
It is kind of frustrating that SugarCRM comes with bugs like this when using modern versions of PHP..

Thanks friend but this issue is being resolved we just need to replace line number 151 in view.modulefield.php file with
if(!isset($module->mbvardefs) || is_null($module->mbvardefs)) {
$module->mbvardefs = new stdClass();
}

In order for this to work for me, I found that the inserted statement needed to come AFTER the original problem line instead of before it, but big thanks for the solution. This has solved a big headache for me that no-one else seems to have had a pill for!

Related

Planner ID seemingly not set

I am using rospy.
I have a strange situation where the output is not expected.
Here is what I tried:
self.robot.arm.moveit_group.set_planner_id = "RRTConnectkConfigDefault"
What the output that I am getting is:
(Pdb) self.robot.arm.moveit_group.get_planner_id()
*** AttributeError: 'MoveGroupInterface' object has no attribute 'get_planner_id'
Not sure what could be the reason.
I think that you should use something like this:
self.robot.arm.moveit_group.set_planner_id("RRTConnectkConfigDefault")
I hope that it will help you to move on in the interesting moveit stuff!

CSOM 2013 error: Unable to cast object of type 'System.Collections.Generic.Dictionary

I'm using this code to loop columns of a SharePoint 2013 List.
currentContext.Load(currentList.Fields);
currentContext.ExecuteQuery();
foreach (Field f in currentList.Fields) {
}
No problem with normal columns. But, when I arrive to a lookup column I have this error:
"Unable to cast object of type
'System.Collections.Generic.Dictionary`2[System.String,System.Object]'
to type 'Microsoft.SharePoint.Client.Field'."
I found for example this discussion
This issue came when we were working with TaxonomyFieldValue fields. For us changing references was not an option. This helped:
TaxonomyItem dummy = new TaxonomyItem(web.Context, null);
It will force program to load adequate libraries forcing correct type in runtime.
I had this same issue and updating the references fixed it for me. This question helped me figure it out.
I went from version 14 of "Microsoft.SharePoint.Client" and "Microsoft.SharePoint.Client.Runtime" to version 16 and no longer had the error.
Latest client download

HHVM non-deterministic behaviour of the typechecker

I've noticed that calling hh_client is not always returning correct result. For example: I have following pieces of code:
backend\ConvertMessage.hh:
<?hh // strict
namespace ApiBackend\ConvertMessage {
enum Status: int {
success = 0;
// ... error codes
};
// ... some other classes
};
other place in project:
throw new \SoapFault(
'Server',
\ApiBackend\ConvertMessage\Status::getNames()[$result->status]
);
Sometimes, after doing some changes in project I get following error message: Could not find static method getNames in type ApiBackend\ConvertMessage\Status (Typing[4090])
When I remove a semicolon after one of closing curly brackets, hh_client stops displaying error. But when I insert semicolon back on its place, typechecker still gives me No errors! message.
This is not the only file that causes this problem - it happens to all enums.
It seems to me that it is problem with some cache of either hh_client or hh_server.
Thanks in advance for helping me with solving this problem (and sorry if my english is not too good).
You are probably using an outdated version of HHVM. This problem sounds an awful lot like this race condition, which was fixed in HHVM 3.5.0 and newer (and was backported into the 3.3.3 LTS release). Notably, 3.4.x still had the bug.
What version of HHVM are you using?

SOLR: solrQuery.addDateRangeFacet(): Can't add gap %2B1DAY to value for field:

I am trying to query data (using solr) and get Counts for a Day granularity.
I am having a problem with the below piece of code:
solrQuery.addDateRangeFacet("startTimeISO", date1.toDate(), date2.toDate(), "%2B1DAY");
solrQuery.setQuery(queryString);
QueryResponse response = null;
try {
response = solrClient.getSolrServer(getCollectionName(Constants.WebPeerAnomaliesModelTuple()._1())).query(solrQuery);
} catch (Exception exp) {
LOGGER.error("Failed to get facet results: ", exp);
}
The error I am getting here is:
"Can't add gap %2B1DAY to value Fri Nov 14 06:37:30 PST 2014 for field: startTimeISO"
Can somebody help me here what is the issue?
I am not sure why "%2B1DAY" would fail. I am getting the correct result when I do the same from the browser. If I query the below from url, it works:
/select?facet=true&facet.date=startTimeISO&facet.date.start=NOW/DAY-30DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
Apologies if I am asking a trivial question. I am still trying to debug this. Any pointers will be helpful. Thanks.
UPDATE: SOLUTION:
I was able to debug this and find out why I am getting this error.
In my Java code, instead of "%2B1DAY", I should have added "+1Day".
Querying through browser worked because + is %2B (url encoding)
Sorry for the silly question.
Hope it helps someone. :)
Adding my solution as answer: As one commenter mentioned, there is a chance people miss the update I have provided on the question.
SOLUTION:
I was able to debug this and find out why I am getting this error.
In my Java code, instead of "%2B1DAY", I should have added "+1Day". Querying through browser worked because + is %2B (url encoding) Sorry for the silly question. Hope it helps someone. :)

Update Complex Fields Using Jira Rest Client 1.1-m02

Hello I'm trying to update some complex fields such as Issue Type or Status using Jira Rest Client Library for Java and I'm having some trouble. This is what I've got so far:
Issue issue = client.getIssueClient().getIssue(issueKey, null);
client.getIssueClient().update(
issue,
ImmutableList.of(new FieldInput(IssueFieldId.ISSUE_TYPE_FIELD,
issue.getIssueType())), null);
As you can see I'm only trying to update the issue type using it's own type (just to test it), however I get an Exception:
Exception in thread "main" com.atlassian.jira.rest.client.RestClientException:
org.codehaus.jettison.json.JSONException: Cannot generate value - unknown type for me:
class com.atlassian.jira.rest.client.domain.BasicIssueType
Am I missing something, is there any documentation for this library that I missed?
I managed to achieve what I was trying to do:
Issue issue = client.getIssueClient().getIssue(issueKey, null);
client.getIssueClient().update(
issue,
ImmutableList.of(new FieldInput(IssueFieldId.ISSUE_TYPE_FIELD,
ComplexIssueInputFieldValue.with("id", id))), null);
This will change the type of the issue, hope this will help anyone else who encounters this problem.

Resources