cant upload document

hello

as admin user all working nice
as standard user while in opportunity -> Documents sub-panel ->create -> Browse -> save
in GUI i dont see any record added
in log i see this :

Tue May 22 16:15:30 2018 [28583][c5f808e4-8650-44d6-c54a-5784b402f18f][ERROR] Unable to load related bean by id
Tue May 22 16:15:30 2018 [28583][c5f808e4-8650-44d6-c54a-5784b402f18f][FATAL] Exception handling in /var/www/crm/include/MVC/Controller/SugarController.php:402
Tue May 22 16:15:30 2018 [28583][c5f808e4-8650-44d6-c54a-5784b402f18f][FATAL] Exception in Controller: Subpanel was not defined
Tue May 22 16:15:30 2018 [28583][c5f808e4-8650-44d6-c54a-5784b402f18f][FATAL] backtrace:
#0 /var/www/crm/include/SubPanel/SubPanelViewer.php(61): sugar_die('Subpanel was no...')
#1 /var/www/crm/include/MVC/Controller/SugarController.php(1081): require_once('/var/www/crm...')
#2 /var/www/crm/include/MVC/Controller/SugarController.php(465): SugarController->handleActionMaps()
#3 /var/www/crm/include/MVC/Controller/SugarController.php(373): SugarController->process()
#4 /var/www/crm/include/MVC/SugarApplication.php(109): SugarController->execute()
#5 /var/www/crm/index.php(52): SugarApplication->execute()
#6 {main}

i also run this in instance directory:

sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

Which version of SuiteCRM are you running?

Is that error in the logs showing at the same time that you attempt the upload? It doens’t appear to be related…

What do you see in the other log, your web server log? Usually it’s called php_errors.log or errors.log

When setting file permissions, why are you not setting file ownerships also? (the chown command)

Hi

Version 7.10.4
after your comment i did run chown -R www-data:www:-data .

the other log as standard user :

[Wed May 23 11:20:04.943386 2018] [:error] [pid 4718] [client x.x.x.x:53181] PHP Notice:  Undefined index: doc_type in /var/www/crm/include/SugarFields/Fields/File/SugarFieldFile.php on line 153, referer: http://x.x.x.x/index.php?module=Opportunities&offset=1&stamp=1527063486034687000&return_module=Opportunities&action=DetailView&record=6bc6b716-7906-df46-42b3-5b0414e0ff3a

[Wed May 23 11:20:05.152209 2018] [:error] [pid 4718] [client x.x.x.x:53181] PHP Notice:  iconv(): Detected an illegal character in input string in /var/www/crm/modules/AOD_Index/Lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 77, referer: http://x.x.x.x0/index.php?module=Opportunities&offset=1&stamp=1527063486034687000&return_module=Opportunities&action=DetailView&record=6bc6b716-7906-df46-42b3-5b0414e0ff3a

so from this log i can see it has a problem with the doc type
if using the sub panel i dont have option to chose doc type
if i click on full form i do have the Document Type filed i can chose save and the file is uploaded

log as admin user:

Apache log


[Wed May 23 11:33:29.408668 2018] [:error] [pid 4681] [client x.x.x.x:53382] PHP Notice:  Undefined index: doc_type in /var/www/crm/include/SugarFields/Fields/File/SugarFieldFile.php on line 153, referer: http://crm.local/index.php?module=Opportunities&offset=1&stamp=1527064135039155700&return_module=Opportunities&action=DetailView&record=11cc587f-a4c5-1209-254f-5a855ca313a2

crm log:

Wed May 23 11:36:17 2018 [4718][1][ERROR] Unable to load related bean by id

and the ducument is uploaded and saved

Perhaps you can try this on the online demo

suitecrm.com/demo

and if it’s broken there, open an issue on Github describing this.

Hi

in my test instance it worked fine
in demo it also worked good
as admin user its also works good
it make me understand its permissions \ roles problem

it does work if i set role -> document -> list -> ALL

now i also see all the “failed” documents upload attempts

1 Like