matecat / MateCat

MateCat is an AI driven translation tool for language industry professionals. Matecat makes machine translation post-editing and project outsourcing easy.
http://www.matecat.com
GNU Lesser General Public License v3.0
368 stars 179 forks source link

where is conversion_enabled? #1638

Closed cidrugHug8 closed 3 years ago

cidrugHug8 commented 4 years ago

Hi there,

I found the following message in /home/matecat/cattool/storage/log_archive/fatal_errors.txt

{"log":{"token_hash":"5e43b7c791fef","context":{"ip":"xxx.xxx.xxx.xx","line":null},"time":1581496263,"date":"2020-02-12T09:31:03+01:00","content":{"error":"Unable to find variable 'conversion_enabled' in current scope","trace":[{"file":"\/home\/matecat\/cattool\/inc\/PHPTAL\/PHPTAL.php(841) : eval()'d code","line":38,"function":"get","class":"PHPTAL_Context","type":"->","args":["conversion_enabled"]},{"file":"\/home\/matecat\/cattool\/inc\/PHPTAL\/PHPTAL.php","line":667,"function":"tpl_5e3bd3d7_uploadvfdz2zfVNnYDrGSzzm6OwQ","args":[{},{"repeat":{},"_xmlDeclaration":null,"_docType":"<!DOCTYPE html>","basepath":"\/","hostpath":"http:\/\/localhost","build_number":"2.9.8","use_compiled_assets":false,"supportedBrowser":-2,"platform":"linux","enabledBrowsers":["applewebkit","chrome","safari"],"maxFileSize":62914560,"maxTMXFileSize":314572800,"dqf_enabled":false,"analysis_enabled":true,"footer_js":[],"config_js":[],"css_resources":[]}]},{"file":"\/home\/matecat\/cattool\/lib\/Controller\/AbstractControllers\/viewController.php","line":141,"function":"execute","class":"PHPTAL","type":"->","args":[]},{"file":"\/home\/matecat\/cattool\/index.php","line":17,"function":"finalize","class":"viewController","type":"->","args":[]}]}}}

Should I set conversion_enabled? Where?

Thank you.

Ostico commented 4 years ago

@cidrugHug8 have you removed the FILTERS_ADDRESS directive in your config.ini?

Anyway, this flag is set here https://github.com/matecat/MateCat/blob/develop/lib/Controller/newProjectController.php#L267

cidrugHug8 commented 4 years ago

@Ostico hmm, although FILTERS_ADDRESS was removed then matecat doesn't start.

{"log":{"token_hash":"5e44e79f07461","context":{"ip":"xxx.xxx.xxx.xx","line":null},"time":1581574047,"date":"2020-02-13T07:07:27+01:00","content":{"error":"Unable to find variable 'conversion_enabled' in current scope","trace":[{"file":"\/tmp\/tpl_5e3bd3d7_uploadvfdz2zfVNnYDrGSzzm6OwQ.php","line":37,"function":"get","class":"PHPTAL_Context","type":"->","args":["conversion_enabled"]},{"file":"\/home\/matecat\/cattool\/inc\/PHPTAL\/PHPTAL.php","line":667,"function":"tpl_5e3bd3d7_upload__vfdz2zfVNnYDrGSzzm6OwQ","args":[{},{"repeat":{},"_xmlDeclaration":null,"_docType":"<!DOCTYPE html>","basepath":"\/","hostpath":"http:\/\/localhost","build_number":"2.9.8","use_compiled_assets":false,"supportedBrowser":1,"platform":"linux","enabledBrowsers":["applewebkit","chrome","safari"],"maxFileSize":62914560,"maxTMXFileSize":314572800,"dqf_enabled":false,"analysis_enabled":true,"footer_js":[],"config_js":[],"css_resources":[]}]},{"file":"\/home\/matecat\/cattool\/lib\/Controller\/AbstractControllers\/viewController.php","line":141,"function":"execute","class":"PHPTAL","type":"->","args":[]},{"file":"\/home\/matecat\/cattool\/index.php","line":17,"function":"finalize","class":"viewController","type":"->","args":[]}]}}}

Ubuntu 18.04 is supported?

Ostico commented 4 years ago

@cidrugHug8 yes of course ubuntu 18 is supported, which version of php do you installed, at moment 5.4 < PHP < 5.6 is supported. Anyway, you solved the issue?

sazenis commented 4 years ago

I'm facing the same issue with php 5.6.14. Log's also outputted same error but for different variable pageTitle:

 {"log":{"token_hash":"5e988b6f43d8e","context":{"ip":"172.19.0.1","line":null},"time":1587055471,"date":"2020-04-16T18:44:31+02:00","content":{"error":"Unable to find variable 'pageTitle' in current scope","trace":[{"file":"\/tmp\/tpl_5e92ce5e_index__OHwrg5B0ABHxBZVq26aDTA.php","line":18,"function":"__get","class":"PHPTAL_Context","type":"->","args":["pageTitle"]},{"file":"\/var\/www\/html\/inc\/PHPTAL\/PHPTAL.php","line":667,"function":"tpl_5e92ce5e_index__OHwrg5B0ABHxBZVq26aDTA","args":[{},{"repeat":{},"_xmlDeclaration":null,"_docType":"<!DOCTYPE html>","basepath":"\/","hostpath":"http:\/\/localhost","build_number":"2.14.18","use_compiled_assets":false,"supportedBrowser":1,"platform":"linux","enabledBrowsers":["applewebkit","chrome","safari"],"maxFileSize":62914560,"maxTMXFileSize":314572800,"dqf_enabled":false,"analysis_enabled":true,"footer_js":[],"config_js":[],"css_resources":[]}]},{"file":"\/var\/www\/html\/lib\/Controller\/AbstractControllers\/viewController.php","line":141,"function":"execute","class":"PHPTAL","type":"->","args":[]},{"file":"\/var\/www\/html\/index.php","line":17,"function":"finalize","class":"viewController","type":"->","args":[]}]}}}

I might also add that FILTERS_ADDRESS is present.

EDIT The issue was not fixed with recent changes where PHPTAL was moved to composer dependencies. Also the latest master is as well throwing this error

KamilChlodek commented 3 years ago

I have the same problem as @LukasSaz and @cidrugHug8 . Have you guys found a solution to this problem? Does anyone know how to resolve this?

Ostico commented 3 years ago

Hi all, we found that this issue could be related to the (non-)existence of a file in the ./inc/ ( config ) folder. Please be sure that this file exists: oauth_config.ini

KamilChlodek commented 3 years ago

Hi all, we found that this issue could be related to the (non-)existence of a file in the ./inc/ ( config ) folder. Please be sure that this file exists: oauth_config.ini

Thanks, that did the trick.

Ostico commented 3 years ago

Perfect. Thank you.