Zero108 Posted January 27, 2018 Share Posted January 27, 2018 (edited) При попытке отредактировать группу в списке групп в админцетре, кликаю карандаш, получаю ошибку для любой из групп. В чем проблема и как починить? 4.2.7. PHP 7. TypeError: Argument 1 passed to IPS\downloads\extensions\core\ContentRouter\_Downloads::__construct() must be an instance of IPS\Member, instance of IPS\Member\Group given, called in /серверный путь/system/Application/Application.php on line 819 (0) #0 /серверный путь/system/Application/Application.php(819): IPS\downloads\extensions\core\ContentRouter\_Downloads->__construct(Object(IPS\Member\Group)) #1 /серверный путь/system/Application/Application.php(300): IPS\_Application->extensions('core', 'ContentRouter', true, Object(IPS\Member\Group)) #2 /серверный путь/applications/core/extensions/core/GroupForm/Content.php(35): IPS\_Application::allExtensions('core', 'ContentRouter', Object(IPS\Member\Group)) #3 /серверный путь/applications/core/modules/admin/members/groups.php(188): IPS\core\extensions\core\GroupForm\_Content->process(Object(IPS\Helpers\Form), Object(IPS\Member\Group)) #4 /серверный путь/system/Dispatcher/Controller.php(85): IPS\core\modules\admin\members\_groups->form() #5 /серверный путь/applications/core/modules/admin/members/groups.php(34): IPS\Dispatcher\_Controller->execute() #6 /серверный путь/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\admin\members\_groups->execute() #7 /серверный путь/admin/index.php(13): IPS\_Dispatcher->run() #8 {main} При попытке создания новой группы: TypeError: Argument 1 passed to IPS\downloads\extensions\core\ContentRouter\_Downloads::__construct() must be an instance of IPS\Member, instance of IPS\Member\Group given, called in /серверный путь/system/Application/Application.php on line 819 (0) #0 /серверный путь/system/Application/Application.php(819): IPS\downloads\extensions\core\ContentRouter\_Downloads->__construct(Object(IPS\Member\Group)) #1 /серверный путь/system/Application/Application.php(300): IPS\_Application->extensions('core', 'ContentRouter', true, Object(IPS\Member\Group)) #2 /серверный путь/applications/core/extensions/core/GroupForm/Content.php(35): IPS\_Application::allExtensions('core', 'ContentRouter', Object(IPS\Member\Group)) #3 /серверный путь/applications/core/modules/admin/members/groups.php(188): IPS\core\extensions\core\GroupForm\_Content->process(Object(IPS\Helpers\Form), Object(IPS\Member\Group)) #4 /серверный путь/system/Dispatcher/Controller.php(85): IPS\core\modules\admin\members\_groups->form() #5 /серверный путь/applications/core/modules/admin/members/groups.php(34): IPS\Dispatcher\_Controller->execute() #6 /серверный путь/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\admin\members\_groups->execute() #7 /серверный путь/admin/index.php(13): IPS\_Dispatcher->run() #8 {main} Edited January 27, 2018 by Zero108 Link to comment Share on other sites More sharing options...
Dmitriy427 Posted January 27, 2018 Share Posted January 27, 2018 http://ipbskins.ru/forum/topic15410.html/page__view__findpost__p__103252 1 Link to comment Share on other sites More sharing options...
Zero108 Posted January 27, 2018 Author Share Posted January 27, 2018 (edited) Точно можно сказать только после дебага на вашем сервере. Но вообще, в 4.2.6 есть ошибка в /system/Member/Member.php, проявляющаяся с версией интерпретатора php 7.0. и выше.Первый вариант не решает проблему (ошибка остается).Второй вариант приводит к An error occurred (500 Error) (php 7.0.27) Edited January 27, 2018 by Zero108 Link to comment Share on other sites More sharing options...
Dmitriy427 Posted January 27, 2018 Share Posted January 27, 2018 Вообще, попробуйте отключить Downloads и редактировать или создавать группу. Что-то там с расширением ContentRouter не ладно. дебажить это мне не на чем сейчас просто. 1 Link to comment Share on other sites More sharing options...
Zero108 Posted January 28, 2018 Author Share Posted January 28, 2018 Да, так работает. :D Спасибо. А ведь кто-то за этот продукт еще и платит... :blink: Link to comment Share on other sites More sharing options...
newbie Posted January 28, 2018 Share Posted January 28, 2018 Покажите содержимое файла\applications\downloads\extensions\core\ContentRouter\Downloads.php Может быть есть еще \applications\downloads\extensions\core\ContentRouter\downloads.php 1 Link to comment Share on other sites More sharing options...
Zero108 Posted January 28, 2018 Author Share Posted January 28, 2018 (edited) Downloads - главная страница сайта. Downloads.php - стандартный от 4.2.7. <?php /** * @brief Content Router extension: Downloads * @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a> * @copyright (c) Invision Power Services, Inc. * @license https://www.invisioncommunity.com/legal/standards/ * @package Invision Community * @subpackage Downloads * @since 26 Jun 2017 */ namespace IPS\downloads\extensions\core\ContentRouter; /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } /** * @brief Content Router extension: Downloads */ class _Downloads { /** * @brief Content Item Classes */ public $classes = array(); /** * Constructor * * @param \IPS\Member|IPS\Member\Group|NULL $memberOrGroup If checking access, the member/group to check for, or NULL to not check access * @return void */ public function __construct( $memberOrGroup = NULL ) { } } Edited January 28, 2018 by Zero108 Link to comment Share on other sites More sharing options...
Zero108 Posted January 28, 2018 Author Share Posted January 28, 2018 (edited) downloads.php - был такой файл. Я его удалил только что, так как в оригинальном дистрибутиве 4.2.7 такого файла нет, а тот, который был на сервере от декабря 2016 года. Теперь всё работает без необходимости выключения приложения Downloads. Еще оптимизировали работу мускула в my.cnf, но это может к теме не относится. Вообщем, проблема решена. Edited January 28, 2018 by Zero108 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now