Modal windows are implemented on the site using the jqModal plugin, below is a section of code that initializes the login form:

$('.'+name+'_frame').jqm({ trigger: open_trigger, onLoad: function( hash ){ onLoadjqm( name , hash , requestData, selector); }, ajax: arMShopOptions["SITE_DIR"]+'ajax/auth.php' }); 

ie, an element is searched for where $ ('. form_frame') checked, all parameters are passed normally. Below is the jqm call code:

  $(document).ready(function(){ jqmEd('enter', 'auth', '.avtorization-call.enter'); }); 

jqmEd is a wrapper function, it accepts only additional parameters.

Here is the code of the auth.php file to which the request is made:

 <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?> <? global $USER; if($_GET["auth_service_error"]){ LocalRedirect(SITE_DIR.'auth/'); } if(!$USER->IsAuthorized()){?> <div id="wrap_ajax_auth"> <a href="#" class="close jqmClose"><i></i></a> <div class="popup-intro"> <div class="pop-up-title">Вход в личный кабинет</div> </div> <? $APPLICATION->IncludeComponent( "bitrix:system.auth.form", "mshop", Array( "REGISTER_URL" => SITE_DIR."auth/registration/", "PROFILE_URL" => SITE_DIR."personal/", "FORGOT_PASSWORD_URL" => SITE_DIR."auth/forgot-password/", "AUTH_URL" => SITE_DIR."ajax/show_auth_popup.php", "SHOW_ERRORS" => "Y", "POPUP_AUTH" => "Y", "AJAX_MODE" => "Y" ) );?> </div> <?} elseif(strlen($_REQUEST["backurl"])){ LocalRedirect($_REQUEST["backurl"]); } else{ if(strpos($_SERVER['HTTP_REFERER'], '/auth/') === false && strpos($_SERVER['HTTP_REFERER'], '/ajax/auth.php') === false){ $APPLICATION->ShowHead(); ?> <script> jsAjaxUtil.ShowLocalWaitWindow( 'id', 'wrap_ajax_auth', true ); BX.reload(false) </script> <? } else{ LocalRedirect(SITE_DIR.'personal/'); } } 

and when we click on an element, the form pops up empty, that is, the data from auth.php is not inserted. If you try to upload another file, for example test.php with hello test, everything works fine, the text is displayed in a modal window. But as soon as you connect <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?> Then the void is loaded, i.e. there is nothing there.

Tell me what could be wrong? The interesting thing is that on another site the similar code works fine.

    0