Ostico / docker_matecat

Docker configuration for MateCat web cattool https://github.com/matecat/MateCat
20 stars 22 forks source link

got "Unable to find variable 'pageTitle' in current scope" after installation #17

Open sherllochen opened 3 years ago

sherllochen commented 3 years ago

Once I install matecat following the readme. I got this error in /var/www/matecat/local_storage/log_archive/fatal_errors.txt Any idea for debugging? Thanks a lot!

{"log":{"token_hash":"avm7i89joafm5","context":{"ip":"59.57.171.242","line":null},"time":1617192991,"date":"2021-03-31T14:16:31+02:00","content":{"error":"Unable to find variable 'pageTitle' in current scope","trace":[{"file":"\/tmp\/tpl_6062fef7_index__LKFReqgAE2FXY7yKD3RgGw.php","line":18,"function":"__get","class":"PHPTAL_Context","type":"->","args":["pageTitle"]},{"file":"\/var\/www\/matecat\/vendor\/phptal\/phptal\/classes\/PHPTAL.php","line":667,"function":"tpl_6062fef7_index__LKFReqgAE2FXY7yKD3RgGw","args":[{},{"repeat":{},"_xmlDeclaration":null,"_docType":"<!DOCTYPE html>","basepath":"\/","hostpath":"http:\/\/matecat.cloudtranslation.com","build_number":"2.17.15","use_compiled_assets":false,"supportedBrowser":1,"platform":"mac","enabledBrowsers":["applewebkit","chrome","safari"],"maxFileSize":"104857600","maxTMXFileSize":"104857600","dqf_enabled":false,"analysis_enabled":true,"footer_js":[],"config_js":[],"css_resources":[]}]},{"file":"\/var\/www\/matecat\/lib\/Controller\/AbstractControllers\/viewController.php","line":127,"function":"execute","class":"PHPTAL","type":"->","args":[]},{"file":"\/var\/www\/matecat\/index.php","line":17,"function":"finalize","class":"viewController","type":"->","args":[]}]}}}

Ostico commented 3 years ago

Please refer to this:

https://github.com/matecat/MateCat/issues/1638

sherllochen commented 3 years ago

Thanks for your reply. I copy oauth_config.ini from oauth_config.ini.sample. Change client id and secret. Just like below:

[OAUTH_CONFIG]
OAUTH_CLIENT_ID       = 370996200740-880as042tgfg80eriphhs1oh0d0ipxxxxxx
OAUTH_CLIENT_SECRET   = Q4XvoLIhoIRZpjxxxxx
OAUTH_CLIENT_APP_NAME = Matecat

After that, I test again. Finally, there is a page Matecat that appeared, but with the error message "Sorry, we can't find the project you're looking for." I check /var/www/matecat/local_storage/log_archive/fatal_errors.txt for error log.

{"log":{"token_hash":"avm7i89joafm5","context":{"ip":"59.57.172.203","line":null},"time":1617367456,"date":"2021-04-02T14:44:16+02:00","content":{"error":"Record Not found error for URI: \/ - Job Not Found. ","trace":[{"file":"\/var\/www\/matecat\/lib\/Controller\/AbstractControllers\/viewController.php","line":110,"function":"setTemplateVars","class":"catController","type":"->","args":[]},{"file":"\/var\/www\/matecat\/index.php","line":17,"function":"finalize","class":"viewController","type":"->","args":[]}]}}}

Am I lost sth else?? Thanks.

sherllochen commented 3 years ago

Files in inc directory list below:

root@4464b9dbd0f8:/var/www/matecat/inc# ll
total 120
drwxrwxr-x  4 www-data 1001  4096 Apr  2 14:46 ./
drwxrwxr-x 17     1001 1001  4096 Mar 31 15:25 ../
-rw-rw-r--  1 www-data 1001 19355 Mar 30 12:35 Bootstrap.php
-rw-r--r--  1 www-data root   997 Mar 31 03:17 config.ini
-rw-rw-r--  1 www-data 1001  5092 Mar 30 12:35 config.ini.sample
drwxrwxr-x  3 www-data 1001  4096 Mar 30 12:35 dqf/
-rw-r--r--  1 www-data root   240 Mar 31 03:17 Error_Mail_List.ini
-rw-rw-r--  1 www-data 1001   352 Mar 30 12:35 Error_Mail_List.ini.sample
-rw-rw-r--  1 www-data 1001   253 Mar 30 12:35 .globalmessage.ini.sample
-rw-rw-r--  1 www-data 1001    32 Mar 30 12:35 .htaccess
-rw-rw-r--  1 www-data 1001 17826 Mar 30 12:35 INIT.php
-r--------  1 www-data root   512 Mar 31 02:48 login_secret.dat
-rw-r--r--  1 root     root   193 Apr  2 14:46 oauth_config.ini
-rw-rw-r--  1 www-data 1001   182 Mar 30 12:35 oauth_config.ini.sample
-rw-rw-r--  1 www-data 1001   437 Mar 30 12:35 phinx.php
drwxrwxr-x  2 www-data 1001  4096 Mar 30 12:35 PHPTAL/
-rw-rw-r--  1 www-data 1001  1138 Mar 30 12:35 qa_model.json
-rw-r--r--  1 www-data root  3997 Mar 31 02:41 task_manager_config.ini
-rw-rw-r--  1 www-data 1001  6940 Mar 30 12:35 task_manager_config.ini.sample
-rw-rw-r--  1 www-data 1001    35 Mar 30 12:35 version.ini