Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ExactOnline for coreBOS
#21
Weird error when I try to save a record within my module manually:
Code:
Sorry! Attempt to access restricted file.
We are looking for this file path: modules//.php
We are looking here:
Real file path:
I must have done something stupid in my manifest file or one of the files from the Payslip example. I'm on a test server so I'm messing about quite a bit so something may have gone wrong there as well. But the absence of a file that is supposed to be missing in the error message is weird.
Reply
#22
Most probably the variable $currentModule is not set. It is looking for: "modules/$currentModule/$currentModule.php"
Joe
TSolucio
Reply
#23
I see this variable being brought in from the local scope in various files, but I can't find where it is set. If I understand correctly the $current_user and $currentModule are variables that are available always in the global scope of the system as long as you are logged in.

The thing is, my records are being saved in the database. But for some reason my $currentModule var is not set when returning to the list view. Also, the list view is not showing any of the records. Maybe there is something wrong in the database concerning tab id's..
Reply
#24
Where is this code? I mean can I see it? Where are you executing the save()?
Joe
TSolucio
Reply
#25
I see this error message from within the application, during the standard 'create' screen and by pressing the standard 'save' button. The weird thing is, I also don't see any records in the list view, even though there are records in the database table. I suspect this has something to do with a wrong entityidentifier.
Reply
#26
Activate debug log, you will most probably see some SQL errors there that may give you the clue.

For the list view, have you defined a default ALL filter?
Joe
TSolucio
Reply
#27
But the SQL error won't tell me why the $currentModule variable is not set I think?

I have only one filter, the 'all' filter, but I think I need to make sure it is setup properly.
Reply
#28
Looking at the SQL usually gives you an idea of where it is failing. Give it a try and share the SQL
Joe
TSolucio
Reply
#29
Here's the LOG part from trying to save:

Code:
2015-12-19T19:01:36+00:00 DEBUG root ########  Module -->  ExactOnline  :: Action --> Save ::  UserID --> 6 :: RecordID -->  #######
2015-12-19T19:01:36+00:00 DEBUG index Entering isPermitted(ExactOnline,Save,) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting isPermitted method ...
2015-12-19T19:01:36+00:00 DEBUG root ########### Pemitted ---> yes  ##############
2015-12-19T19:01:36+00:00 DEBUG index Entering getColumnFields(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Entering getTabid(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getTabid method ...
2015-12-19T19:01:36+00:00 DEBUG index Entering getTabid(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getTabid method ...
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : SELECT tabid, fieldname, fieldid, fieldlabel, columnname, tablename, uitype, typeofdata, presence
FROM vtiger_field WHERE tabid in (?)
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [66]
2015-12-19T19:01:36+00:00 DEBUG index Entering getTabid(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getTabid method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getColumnFields method ...
2015-12-19T19:01:36+00:00 DEBUG index Entering getTabid(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getTabid method ...
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : SELECT 1 FROM vtiger_field WHERE uitype=69 and tabid = ?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [66]
2015-12-19T19:01:36+00:00 DEBUG index Entering setObjectValuesFromRequest(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : SELECT handler_path, handler_class FROM vtiger_eventhandlers WHERE is_active=true AND event_name = ?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [corebos.filter.editview.setObjectValues]
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->ADODB fetchByAssoc return null
2015-12-19T19:01:36+00:00 DEBUG index Exiting setObjectValuesFromRequest method ...
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : SELECT handler_path, handler_class FROM vtiger_eventhandlers WHERE is_active=true AND event_name = ?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [corebos.filter.preSaveCheck]
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->ADODB fetchByAssoc return null
2015-12-19T19:01:36+00:00 DEBUG index module name is ExactOnline
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : select * from vtiger_fieldformulas where modulename=?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [ExactOnline]
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->TRANS saveentity starts ExactOnline
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->TRANS Started
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : select ownedby from vtiger_tab where name=?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [ExactOnline]
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,modifiedby,createdtime,modifiedtime) values(?,?,?,?,?,?,?,?)
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [36096,6,,ExactOnline,,6,2015-12-19 19:01:36,2015-12-19 19:01:36]
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->ADODB error  Query Failed:insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,modifiedby,createdtime,modifiedtime) values(?,?,?,?,?,?,?,?)::->[1048]Column 'smownerid' cannot be null
2015-12-19T19:01:36+00:00 INFO  index function insertIntoEntityTable ExactOnline vtiger_table name vtiger_exactonline
2015-12-19T19:01:36+00:00 DEBUG index Entering getTabid(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getTabid method ...
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : select * from vtiger_field where tabid=? and tablename=? and displaytype in (1,3,4) and vtiger_field.presence in (0,2)
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [66,vtiger_exactonline]
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : SELECT handler_path, handler_class FROM vtiger_eventhandlers WHERE is_active=true AND event_name = ?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [corebos.filter.ModuleSeqNumber.increment]
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->ADODB fetchByAssoc return null
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : select cur_id,prefix from vtiger_modentity_num where semodule=? and active = 1
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [ExactOnline]
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : UPDATE vtiger_modentity_num SET cur_id=? where cur_id=? and active=1 AND semodule=?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [0000011,0000010,ExactOnline]
2015-12-19T19:01:36+00:00 DEBUG index Entering function get_column_value (exactrecordname, , exactrecordname, 3, V='')
2015-12-19T19:01:36+00:00 DEBUG index Exiting function get_column_value
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : insert into vtiger_exactonline(exactonlineid,exactrecordno,exactrecordname,exactonlinereturn) values(?,?,?,?)
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [36096,EO-0000010,,TEST]
2015-12-19T19:01:36+00:00 INFO  index function insertIntoEntityTable ExactOnline vtiger_table name vtiger_exactonlinecf
2015-12-19T19:01:36+00:00 DEBUG index Entering getTabid(ExactOnline) method ...
2015-12-19T19:01:36+00:00 DEBUG index Exiting getTabid method ...
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : select * from vtiger_field where tabid=? and tablename=? and displaytype in (1,3,4) and vtiger_field.presence in (0,2)
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [66,vtiger_exactonlinecf]
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : insert into vtiger_exactonlinecf(exactonlineid) values(?)
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [36096]
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->TRANS  Rolled Back
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->TRANS  Completed
2015-12-19T19:01:36+00:00 INFO  VT PearDatabase ->TRANS saveentity ends
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query being executed : select setype from vtiger_crmentity where crmid=?
2015-12-19T19:01:36+00:00 DEBUG index Prepared sql query parameters : [36096]

First off the bat I see there is a problem with inserting into the crmentity table concerning smownerid. This is inserted as null, but I don't know how to change this, or if I should setup this up somewhere in my fields. I'm not even sure what this is, is it the current user?

Apart from that I don't know why the record ID is showed as '#######', and if this is the record ID for the module or the system-wide record ID.

It also says 'rolled back' at some point, but the row in the vtiger-exactonline table is still there. I'm really not sure on how to fix this.
Reply
#30
You have to set the assigned_user_id column.

https://github.com/tsolucio/Timecontrol/blob/master/modules/Timecontrol/Save.php#L30

also set the $_REQUEST['assigntype']
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)