[BUG] Disabling modules on multiverse

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [BUG] Disabling modules on multiverse

      Hi, I have two universes. The first one in the browser's address bar appears as "uni1", the second (new) as "uni4". When I want to turn off a module in uni4 after refreshing the module list, it turns out that the completely different, random module has been turned off. When I want to turn it on again, I get this error:


      Source Code

      1. WARNING
      2. Message: PHP Startup: stat failed for /cache/templates/pl^98d8cdbf4c0eb3309991482b361b91f6bfa269e4.ModulePage.tpl.php
      3. File: /includes/libs/Smarty/sysplugins/smarty_internal_cacheresource_file.php
      4. Line: 58
      5. URL: http:/********.pl/uni4/admin.php?page=module&mode=aktiv&id=9
      6. PHP-Version: 7.2.14
      7. PHP-API: uwsgi
      8. 2Moons Version: 2.0.git
      9. Debug Backtrace:
      10. #0 [internal function]: errorHandler(2, 'PHP Startup: st...', '/includes/libs/...', 58, Array)
      11. #1 /includes/libs/Smarty/sysplugins/smarty_internal_cacheresource_file.php(58): filemtime('/cache/templat...')
      12. #2 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(106): Smarty_Internal_CacheResource_File->populate(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template))
      13. #3 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(538): Smarty_Template_Cached::load(Object(Smarty_Internal_Template))
      14. #4 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(177): Smarty_Internal_Template->loadCached(true)
      15. #5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      16. #6 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      17. #7 /includes/classes/class.template.php(130): Smarty_Internal_TemplateBase->display('ModulePage.tpl')
      18. #8 /includes/pages/adm/ShowModulePage.php(55): template->show('ModulePage.tpl')
      19. #9 /admin.php(87): ShowModulePage()
      20. #10 {main}
      Display All

      (one of the modules that I wanted to turn off were records and it's not work properly in the new universe (only one player is displayed there in one place only - in astrophysics research).

      After refreshing the page, the module turns out to be turned on again.
      The problem only occurs in the new universe.

      The post was edited 4 times, last by orix ().

    • UPDATE: I found that if I turn on the modules on the first universe back then I can turn them off without a problem in the second one. However, then the error occurs when it wants to turn it off again on the first universe.
    • the admin panel itself requires a major rework. it still use old db system and some outdated code could be heavily improved. Not surprised about this error.

      if the error persists you can also change manually in uni1_config
    • Qwa wrote:

      the admin panel itself requires a major rework. it still use old db system and some outdated code could be heavily improved. Not surprised about this error.

      if the error persists you can also change manually in uni1_config
      Thanks :) I checked the module settings directly in the database and found an interesting thing.

      Uni 1 config: 1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1
      Uni 2 config: 1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;0

      It seems to me that one of them is damaged, am I right?

      The post was edited 1 time, last by orix ().

    • Each 1 or 0 are the number of modules active/disabled but stored in somekind of "implode" on database
    • Because the 2 rows have different lengths, it is possibly causing the error in 2nd universe if you access a certain page where the value is missing.

      orix wrote:

      Uni 1 config: 1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1
      Uni 2 config: 1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;0
    • in Config.class.php change

      PHP Source Code

      1. protected static $globalConfigKeys = array('VERSION', 'game_name', 'stat', 'stat_level', 'stat_last_update',
      2. 'stat_settings', 'stat_update_time', 'stat_last_db_update', 'stats_fly_lock',
      3. 'cron_lock', 'ts_modon', 'ts_server', 'ts_tcpport', 'ts_udpport', 'ts_timeout',
      4. 'ts_version', 'ts_cron_last', 'ts_cron_interval', 'ts_login', 'ts_password',
      5. 'capaktiv', 'cappublic', 'capprivate', 'mail_active', 'mail_use', 'smtp_host',
      6. 'smtp_port', 'smtp_user', 'smtp_pass', 'smtp_ssl', 'smtp_sendmail',
      7. 'smail_path', 'fb_on', 'fb_apikey', 'fb_skey', 'ga_active', 'ga_key',
      8. 'chat_closed', 'chat_allowchan', 'chat_allowmes', 'chat_allowdelmes',
      9. 'chat_logmessage', 'chat_nickchange', 'chat_botname', 'chat_channelname',
      10. 'chat_socket_active', 'chat_socket_host', 'chat_socket_ip', 'chat_socket_port',
      11. 'chat_socket_chatid', 'ttf_file', 'sendmail_inactive', 'del_user_sendmail',
      12. 'del_user_automatic', 'del_oldstuff', 'del_user_manually', 'ref_max_referals',
      13. 'disclamerAddress','disclamerPhone','disclamerMail','disclamerNotice');
      Display All

      to

      PHP Source Code

      1. protected static $globalConfigKeys = array('VERSION', 'game_name', 'stat', 'stat_level', 'stat_last_update',
      2. 'stat_settings', 'stat_update_time', 'stat_last_db_update', 'stats_fly_lock',
      3. 'cron_lock', 'ts_modon', 'ts_server', 'ts_tcpport', 'ts_udpport', 'ts_timeout',
      4. 'ts_version', 'ts_cron_last', 'ts_cron_interval', 'ts_login', 'ts_password',
      5. 'capaktiv', 'cappublic', 'capprivate', 'mail_active', 'mail_use', 'smtp_host',
      6. 'smtp_port', 'smtp_user', 'smtp_pass', 'smtp_ssl', 'smtp_sendmail',
      7. 'smail_path', 'fb_on', 'fb_apikey', 'fb_skey', 'ga_active', 'ga_key',
      8. 'chat_closed', 'chat_allowchan', 'chat_allowmes', 'chat_allowdelmes',
      9. 'chat_logmessage', 'chat_nickchange', 'chat_botname', 'chat_channelname',
      10. 'chat_socket_active', 'chat_socket_host', 'chat_socket_ip', 'chat_socket_port',
      11. 'chat_socket_chatid', 'ttf_file', 'sendmail_inactive', 'del_user_sendmail',
      12. 'del_user_automatic', 'del_oldstuff', 'del_user_manually', 'ref_max_referals',
      13. 'disclamerAddress','disclamerPhone','disclamerMail','disclamerNotice','moduls');
      Display All
      than re-create uni