A
A
Alexey2019-06-28 12:46:01
MODX
Alexey, 2019-06-28 12:46:01

MODX. Why does the page crash after creating a new ticket?

The site is powered by MODX Revolution 2.5.7-pl
The feedback system is implemented using the Tickets plugin. There are a certain number of tickets (companies) where reviews are comments on tickets. All this is good on the main page.
When creating and publishing a new ticket, the main template goes to hell - almost all the content of the head tag generated by the chunk (starting with {if isset($_GET["page"])} ) ends up in the body . Here is the chunk code:

<base href="{$_modx->config.site_url}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="{$_modx->resource.contentType}; charset={$_modx->config.modx_charset}" />  
<meta name="referrer" content="origin">
<meta name="robots" content="{$_modx->getPlaceholder('seoTab.robotsTag')}" />
{if isset($_GET["page"])}
<!--<link rel="canonical" href="$_modx->config.site_url}$_modx->resource.id | url}" />-->
{/if}
{if $_modx->resource.id == 1}
<title> {if !empty($_modx->resource.longtitle)}{$_modx->resource.longtitle}{else}{$_modx->resource.pagetitle}{/if}</title>
<meta name="description" content="{$_modx->resource.description | strip : true}" />
<meta name="keywords" content="" />
{else}
<title>{if !empty($_modx->resource.longtitle)}{$_modx->resource.longtitle}{else}{$_modx->resource.pagetitle}{/if}</title>
{if !empty($_modx->resource.description)}
  <meta name="description" content="{$_modx->resource.description | strip : true}" />
{/if}

{if !empty($_modx->resource.introtext)}
  <meta name="keywords" content="{$_modx->resource.introtext | strip : true}" />
{/if}
{/if}
<link rel="shortcut icon" href="assets/img/favicon/favicon.ico">
<link rel="apple-touch-icon" sizes="144x144" href="assets/img/favicon/favicon-retina-ipad.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/favicon/favicon-retina-iphone.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/favicon/favicon-standard-ipad.png">
<link rel="apple-touch-icon" sizes="57x57" href="assets/img/favicon/favicon-standard-iphone.png">

Here is the main template code:
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="ru"> <!--<![endif]-->
<head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src='https://www.googletagmanager.com/gtag/js?id=UA-ХХХХХХХХХ-1'></script>
    <script> window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }

        gtag('js', new Date());
        gtag('config', 'UA-ХХХХХХХХХ-1');</script>

    {'MetaX' | snippet : ['tpl'=>'metax-html5']}

<!-- Yandex.Metrika counter --> <script type="text/javascript" > (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounterХХХХХХХХ = new Ya.Metrika2({ id:ХХХХХХХХ, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/tag.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks2"); </script> <noscript><div><img src="https://mc.yandex.ru/watch/ХХХХХХХХ" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->

</head>
<body>
  <!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-ХХХХХХХ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
    <noscript><div><img src="https://mc.yandex.ru/watch/ХХХХХХХХ" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
{'topbar' | chunk}

{'header' | chunk}

{$_modx->getChunk('ContentType.' ~ $_modx->resource.template)}

{'footer' | chunk}

<!--[if lt IE 9]>
<script src="assets/libs/html5shiv/es5-shim.min.js"></script>
<script src="assets/libs/html5shiv/html5shiv.min.js"></script>
<script src="assets/libs/html5shiv/html5shiv-printshiv.min.js"></script>
<script src="assets/libs/respond/respond.min.js"></script>
<![endif]-->

<script type="text/javascript" src="assets/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.cookie.js"></script>
<script type="text/javascript" src="assets/js/jquery.hoverIntent.minified.js"></script>
<script type="text/javascript" src="assets/js/jquery.dcjqaccordion.2.7.min.js"></script>
<script type="text/javascript" src="assets/js/isotope.pkgd.min.js"></script>
<script type="text/javascript" src="assets/js/script.js"></script>
<script type="text/javascript" src="assets/libs/owl-carousel/owl.carousel.min.js"></script>
<script type="text/javascript" src="assets/js/html5shiv.min.js"></script>
<script type="text/javascript" src="assets/js/respond.min.js"></script>

{2 | resource : 'settingsPrebody'}

</body>
</html>

The problem occurs whether I create a new ticket or copy an existing one.
Is it really possible to give an answer according to such installation data or do you need any more info?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question