D
D
Dmitry Largovich2014-12-26 16:29:40
PHP
Dmitry Largovich, 2014-12-26 16:29:40

1s Bitrix. The attached file is not displayed. Which line of code "causes" a similar problem?

Welcome all! Help me please!
We have development. an employee has retired. Time passed, and errors surfaced.
In 1s Bitrix, it is possible to form a task in a group.
Description: The director created an issue in a group. The person in charge added comments to the task and attached the file. The director receives a notification about this with a link to the task.
Problem: if you follow this link (for example: https://nashportal.ru/workgroups/group/13/tasks/ta... ), then the director does not see the attached file.
However, if you go through the "tasks" section to the task itself, then the attached file is displayed.
In my opinion, this means an error on the page that is displayed by the linkhttps://nashportal.ru/workgroups/group/13/tasks/ta...
Probably in the file result_modifier.php I am attaching the code of the file itself. Can you help me, am I right? which line of code gives the above problem?
result_modifier.php file code

<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$file = trim(preg_replace("'[\\\\/]+'", "/", (dirname(__FILE__)."/lang/".LANGUAGE_ID."/result_modifier.php")));
__IncludeLang($file);

if ($this->__page == "user_files_menu" || $this->__page == "group_files_menu" || isset($_REQUEST['ajax_call']) || isset($_REQUEST["AJAX_CALL"]))
{
  return true;
}
elseif (strpos($this->__page, "user_files") !== false || strpos($this->__page, "group_files") !== false)
{
  $prefix = (strpos($this->__page, "user_files") !== false ? "user_files" : "group_files"); 
  $page_name = substr($this->__page, strlen($prefix) + 1); 
  
  $this->__component->__count_chain_item = count($APPLICATION->arAdditionalChain); 
  $this->__component->__buffer_template = false; 
  $this->__component->__template_html = ""; 
  
  if (in_array($page_name, array("section_edit_simple", "element_upload", "webdav_bizproc_workflow_edit", "webdav_bizproc_log")))
  {
    $sTempatePage = $this->__page;
    $sTempateFile = $this->__file;
    $this->__component->IncludeComponentTemplate($prefix."_menu");
    $this->__page = $sTempatePage;
    $this->__file = $sTempateFile;
  }
  else 
  {
    $this->__component->__socnet_page = $this->__page; 
    $this->__component->__buffer_template = true; 
    ob_start(); 
  }
}

$GLOBALS['APPLICATION']->AddHeadString('<script src="/bitrix/js/main/utils.js"></script>', true);
?>
<script type="text/javascript">
var phpVars;
if (typeof(phpVars) != "object")
  var phpVars = {};
phpVars.cookiePrefix = '<?=CUtil::JSEscape(COption::GetOptionString("main", "cookie_name", "BITRIX_SM"))?>';
phpVars.titlePrefix = '<?=CUtil::JSEscape(COption::GetOptionString("main", "site_name", $_SERVER["SERVER_NAME"]))?> - ';
phpVars.messLoading = '<?=CUtil::JSEscape(GetMessage("SONET_LOADING"))?>';
phpVars.LANGUAGE_ID = '<?=CUtil::JSEscape(LANGUAGE_ID)?>';
//phpVars.messYes = '<?=CUtil::JSEscape(GetMessage("WD_Y"))?>';
//phpVars.messNo = '<?=CUtil::JSEscape(GetMessage("WD_N"))?>';

if (typeof(phpVars2) != "object")
  phpVars2 = {};	
if (!phpVars2.messYes)
  phpVars2.messYes = '&nbsp;<?=CUtil::JSEscape(GetMessage("WD_Y"))?>&nbsp;';
if (!phpVars2.messNo)
  phpVars2.messNo = '&nbsp;<?=CUtil::JSEscape(GetMessage("WD_N"))?>&nbsp;';
  
phpVars.bitrix_sessid = '<?=bitrix_sessid()?>';
if (!phpVars.ADMIN_THEME_ID)
  phpVars.ADMIN_THEME_ID = '.default';
var photoVars = {'templatePath' : '/bitrix/components/bitrix/photogallery/templates/.default/'};
if (typeof oObjectWD != "object")
  var oObjectWD = {};
</script>

component_epilog file code
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
  die();
if ($this->__buffer_template === true)
{
  if (!in_array($this->__template->__page, array("user_files_menu", "group_files_menu")))
  {
    $this->__template_html = ob_get_clean();
    $this->IncludeComponentTemplate(strpos($this->__template->__page, "user_files") !== false ? "user_files_menu" : "group_files_menu");
  }
  else
  {
    echo $this->__template_html; 
  }
}
?>

85d3961efedb46e192e69ddd56d66301.JPG
evvdemin
Alexey Skahin

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Skahin, 2015-01-14
@pihel

The output of the link is most likely in the template itself, attach the tempalte.php code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question