Comments (17)
I'd say it is a workflow. Do you have any active?
I opened my corebos webservice development tool, pointed it to the corebos demo and loaded the create product test script:
https://github.com/tsolucio/coreBOSwsDevelopment/blob/master/testcode/026_createProduct.php
http://corebos.org/demos/corebos/
The product was created correctly.
Try activating DEBUG log, to see if there is some error reported there that could give us some clue.
from corebos.
Not AFAIAA.
Note I am cheating here - using a corebos install to access the original vtiger DB. Note I am only after modifying some basic bits in vTiger via webservices as I know there are lots of other enhancements that I am avoiding.
I added in the RESTChange files to the vtiger DB plus some files in include/Webservices.
Everything else seems quite happy. Just this Product issue.
The error seems to follow from CRMEntity:
$em->triggerEvent("vtiger.entity.aftersave", $entityData);
I just installed the corebos testsuite (Nice !!!!!) and got exactly the same error as I did with my own code:
If I use the corebos DB it is OK. Hmmmmm. How odd. ANy bright ideas ?
from corebos.
The aftersave confirms my suspicions, it is an event handler that is launched after saving the record.
That can be a workflow or any other aftersave event. So that takes you to two places:
- vtiger_eventshandlers, look for the aftersave events, it is one of those that is failing
- DEBUG log, there must be some error in there, no?
Glad you like it, I find it VERY useful and use it every time I do something with webservice.
from corebos.
Logging - ahhh, you changed that so it won't run on my existing DB. Tried reverting back t the original DB but still no logging so must be another issue there someplace on my test install
Regarding the Create error, I guess it is checking for a key in the DB which is not in the old DB but is in the new.
It's very close, but not quite close enough !
from corebos.
Logging is the same and not database dependent. The variable that triggers logging, $LOG4PHP_DEBUG is now in config.inc.php. config.performance has been eliminated.
from corebos.
Sorry - missed your reply !
Yes, I figured the after_save, but I'm not sure what event handlers (workflows) there would actually be that might affect it. I can't think I have anything much that isn't stock in there.
from corebos.
There is no product related workflow in that list. What is in the list of aftersave events?
Have you been able to activate debugging?
from corebos.
I think you can check the list of aftersave events in the db. I've had a lot of trouble debugging things I created and then forgot about...
from corebos.
Yes I've got debugging running now.
I'll paste some logs later as I'm out and about this morning.
from corebos.
Here''s a log of the Create transaction.
I added a bit of logging in CRMEntity.php to show field names and values like this:
if ($cachedModuleFields) {
foreach ($cachedModuleFields as $fieldname => $fieldinfo) {
$fieldcolname = $fieldinfo['columnname'];
$tablename = $fieldinfo['tablename'];
$fieldname = $fieldinfo['fieldname'];
$adb->println("FieldcolName $fieldcolname FieldName $fieldname tablename $tablename");
// To avoid ADODB execption pick the entries that are in $tablename
// (ex. when we don't have attachment for troubletickets, $result[vtiger_attachments]
// will not be set so here we should not retrieve)
if (isset($result[$tablename])) {
$fld_value = $adb->query_result($result[$tablename], 0, $fieldcolname);
} else {
$adb->println("There is no entry for this entity $record ($module) in the table $tablename");
$fld_value = "";
}
$adb->println("Fld_value $fld_value");
$this->column_fields[$fieldname] = $fld_value;
}
}
if ($module == 'Users') {
for ($i = 0; $i < $noofrows; $i++) {
$fieldcolname = $adb->query_result($result1, $i, "columnname");
$tablename = $adb->query_result($result1, $i, "tablename");
$fieldname = $adb->query_result($result1, $i, "fieldname");
$fld_value = $adb->query_result($result[$tablename], 0, $fieldcolname);
$this->$fieldname = $fld_value;
}
}
$this->column_fields["record_id"] = $record;
$this->column_fields["record_module"] = $module;
$adb->println("Record $record Module $module");
I appreciate the assistance... I realise it isn't a bug in corebos per se.... !
from corebos.
It is all full of these errors:
ADODB error Query Failed:select 1 FROM vtiger_globalvariable INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_globalvariable.globalvariableid where vtiger_crmentity.deleted=0 and gvname=? limit 1::->[1146]Table 'crm.vtiger_globalvariable' doesn't exist
It is because you are missing base coreBOS tables in your vtiger CRM database.
As a quick test you could try adding the vtiger_globalvariable and vtiger_globalvariablecf tables, just the tables to see if it works or not... but you may run into some other mandatory tables.
Add those two tables and try again. If you still get an error, send the debug log again.
from corebos.
OK - I did wonder :-) Let you know.
from corebos.
Bingo ! That seems to have fixed it.
I took the create vtiger_globalvariable, vtiger_globalvariablecf tables out of corebos_justinstalled_empty.sql in to their own sql file and then imported to my DB.
Seems to run error free now !
Thanks for the help. Looks like I am slowly heading down the CoreBOS path :-)
Joe, is it better if I fork and do pull requests or just paste fixes if I find stuff ?
from corebos.
PRs are preferred, but mostly to keep a register of where the change came from and give proper credits. I prefer that you send me the fix by whatever means is easier for you than to not have it because I impose some formal path.
Glad that worked :-)
from corebos.
No probs - I try to keep the lead dev happy ;-)
Once I have this mess out of the way I'll take a longer look at things.
Thanks again Joe.
from corebos.
Quick one on your comment:
"Logging is the same and not database dependent. The variable that triggers logging, $LOG4PHP_DEBUG is now in config.inc.php. config.performance has been eliminated."
I have forked to my own repo and notice that config.performance is still in master, and there are no settings in config.inc.php ?
Just wondered why?
from corebos.
config.inc.php is empty until you install, so the new contents of this file is in config.template.php:
https://github.com/tsolucio/corebos/blob/master/config.template.php
If you are updating, git doesn't modify config.inc.php, you have to do that one manually.
I haven't eliminated config.performance.php yet because the updater needs it to get the values of each install when it creates the equivalent global variables. I have an event to eliminate that file in about a year when I expect everyone to have updated.
I would like to invite you to join gitter, that is were the developers and some implementors dwell. I think that will be a better environment for your profile:
https://gitter.im/corebos/discuss
from corebos.
Related Issues (20)
- Set a row with hidden fields to height = 0 HOT 1
- Advanced search stuck HOT 14
- Impossible to turn off ClickHouse Activation HOT 7
- Upgrade json editor to improve ui for developer :enhancement HOT 2
- workflow "use function" button on workflow condition not working HOT 25
- TUI grid inline edit does not respect currency format
- Zebra_Session: No MySQL connection vendor/stefangabos/zebra_session/Zebra_Session.php:334 HOT 2
- Settings for auto numbering give database error HOT 4
- xss vulnerability
- taxclass values don't show on products filters HOT 2
- Smtp outgoing server and individual smtp server
- Quote Email PDF not work after last update coreBOS 8.0 (baf8d5c8420230209) HOT 3
- Disable Sendgrid detailview email fields by adding global variable... set default disabled #enhancement HOT 4
- Listview details Fields overlap HOT 1
- Send Individual Emails not works in Campaing HOT 1
- Campaign -> Contact Status not work HOT 2
- Bypass check length at Add Folder feature lead to XSS vulnerability in module=evvtgendoc HOT 1
- To Do Activity Type Email non editable HOT 2
- popup list lookup HOT 2
- xampp 7.4 on windows cann't import module HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corebos.