Сергій

Сергій

Был в сети 04 августа 2024, 02:33
Заказы принимаю
В папке «connectors» нужно в файле «modx.config.js.php» все содержимое заменить с:
<?php
/*
 * This file is part of MODX Revolution.
 *
 * Copyright © MODX, LLC. All Rights Reserved.
 *
 * For complete copyright and license information, see the COPYRIGHT and LICENSE
 * files found in the top-level directory of this distribution.
 */

/**
 * @package modx
 * @var modX $modx
 */
define('MODX_CONNECTOR_INCLUDED', 1);
require_once __DIR__ .'/index.php';
$modx->request->handleRequest(array('location' => 'system','action' => 'config.js'));
На:
<?php
/*
 * This file is part of MODX Revolution.
 *
 * Copyright © MODX, LLC. All Rights Reserved.
 *
 * For complete copyright and license information, see the COPYRIGHT and LICENSE
 * files found in the top-level directory of this distribution.
 */

/**
 * @package modx
 * @var modX $modx
 */
define('MODX_CONNECTOR_INCLUDED', 1);
define('MODX_REQP',false);
require_once dirname(__FILE__).'/index.php';
$_SERVER['HTTP_MODAUTH'] = $modx->user->getUserToken($modx->context->get('key'));
$modx->request->handleRequest(array('location' => 'system','action' => 'config.js'));
Заработало. Только новая проблема появилась.
Как сделать так чтобы при первой отправке tickets обновлял форму и можно было следующее сообщение отправить.
Сейчас первое уходит, хотя не передает допустим style.
Подскажите в чем может быть проблема. Может php фильтрует код?
Сделал вот так:
<script>
    tinymce.init({
        selector: '#comment-editor',
        setup: function (editor) {
        editor.on('change', function () {
            editor.save();
        });
    }
      });
    </script>
Все работает. Но если отправить комментарий то чтобы отправить повторно нужно перезагрузить страницу. Tickets заедает после отправки.